codice / acdebugger

Purpose-built debugger for determining missing OSGi bundle security permissions
Apache License 2.0
7 stars 10 forks source link

Acdebugger behaves incorrectly when working with bundle fragments #40

Closed brjeter closed 5 years ago

brjeter commented 5 years ago

Description

Acdebugger appears to look at the bundle's symbolic name for deciding what permissions it has, displaying that bundle's info, etc. This does not align with how the security manager works. The security manager uses that bundle's artifactId as the key.

Steps to Reproduce

  1. Debug an operation with a call stack that includes:
    • bundle A which does not have the necessary permission (thus triggering the acdebugger) and
    • bundle B which has the necessary permission, but has a symbolic name that's different than the artifactId Example

Note: If it's easier than artificially creating this scenario, this will happen on DDF 2.13.x as of commit. Steps:

Actual behavior:

The acdebugger will provide output saying that both bundles A and B need the permission

Reproduces how often:

Every time

Version

1.7

paouelle commented 5 years ago

It turns out that the issue was actually related to the fact that the bundle was a fragment and the logic to compute the list of domains was coming up with the host bundle as opposed to the fragment bundle as does the security manager.