There is no standardized solution for this. In general, Bundle Activators are called on the thread the start method is called but this is not guaranteed and for DS you’er out of luck.
That said, I am a bit puzzled by the model. JAAS is based on the same (terrible) security model the VM gave us. Why not use Conditional Permission admin to just manage the required permission for that bundle, that you can do standardized and quite easy? Kind regards, Peter Kriens > On 28 feb. 2016, at 12:09, Christian Schneider <ch...@die-schneider.net> > wrote: > > When working with JAAS based authentication it is necessary to run the code > as a certain subject. > > For code that is called from the outside as well as from the karaf shell > there are existing solutions to do the login. > I wonder if there is an OSGi mechanism to do the same for code that is > started inside a bundle. (Activator, blueprint or DS). > What I would like to have is some way to say: The startup code for this > bundle should run as a certain user. > > Is this already possible or would I have to create such a mechanism myself? > > Christian > > -- > Christian Schneider > http://www.liquid-reality.de > > Open Source Architect > http://www.talend.com > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev