There is no permissions listener to be notified when permissions change.  A
DS runtime is not going to notice that a service is no longer visible when
permissions change.  Similarly a ServiceTracker is also not going to be
notified (with the adding or removed methods) that a service is now visible
or not to the BundleContext used by the ServiceTracker.  This means that
optional non-static service dependencies will not be dynamically injected
when security changes.

Also, there will be issues when taking away service permissions.  A
component Y that got injected with service X but then later service
permission for X got revoked for the bundle with the component Y will not
result in unbinding the service X from component Y.  If this is a concern
then I think you would have to detect which bundles are using the service X
and restart them to make sure they use the new permission policy.

Tom





From:   <[email protected]>
To:     "[email protected]" <[email protected]>,
Date:   12/03/2013 08:13 AM
Subject:        [osgi-dev] Declarative Services and Conditional permission
            Admin
Sent by:        [email protected]



Hi all,

I'm working with Declarative Service and I've just started to add security
to our development using Conditional Permission Admin.

There is a case where I'm not sure what is the expected behavior : I have a
component which declares an optional and dynamic reference to a service,
for which it's bundle does not have the necessary permissions : the
component is activated but the service is not injected in the component (as
specified in the security section of Declarative Services specifications).
Now, what should happen if the permission are dynamically changed and the
bundle can access the service : should the service be injected immediately
(as it has the dynamic policy) ? I do not find anything in the
specification about this question.

This raises another question : is it possible for a bundle (SCR or not) to
be notified when permissions have been changed ? Configuration Admin
defines a ConfigurationListener to be notified of configuration changes,
but I don't find anything similar for permissions.

Any ideas about these issues ?

regards,

Pierre Rust
_________________________________________________________________________________________________________________________


Ce message et ses pieces jointes peuvent contenir des informations
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu
ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou
falsifie. Merci.

This message and its attachments may contain confidential or privileged
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and
delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been
modified, changed or falsified.
Thank you.
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

<<inline: graycol.gif>>

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to