dev@glassfish.java.net

Re: OSGi Services in GlassFish 3.1

From: Richard S. Hall <heavy_at_ungoverned.org>
Date: Wed, 16 Feb 2011 10:00:28 -0500

On 2/16/11 3:22, PostMasteR wrote:
> On 02/16/2011 12:59 AM, Richard S. Hall wrote:
>> On 2/15/11 5:19 PM, PostMasteR wrote:
>>> Hi *,
>>>
>>> I just installed the latest Felix WebConsole to have a look inside the
>>> OSGi stuff and what is possible to eventually make up additional tools
>>> that might help during development of OSGi bundles.
>>>
>>> So, I noticed that some services are not (yet) available and I would
>>> like to have some pointers to available implementations (if there are
>>> any):
>>>
>>> * Permission Admin
>>> * Conditional Permission Admin
>>> * Wire Admin
>>> * Log Service
>> Since GlassFish just runs on top of an OSGi framework, you should just
>> be able to install implementations of the services you want to use. The
>> permission-related ones might be a little trickier, but technically they
>> should work I believe.
>>
>> -> richard
>>
>>> Thanx for any hints,
>>>
>>> PMR
> Thanx for the answer. As I am also looking forward to implement access
> restrictions into our services and bundles I already looked at Felix to
> see if there is any implementation available, but apparently I didn't
> see any.
>
> Do you recommend some?

You are referring to (Conditional) Permission Admin? If so, you need the
Framework Security Provider bundle from Apache Felix.

> In addition, is there a concept that allows me to limit access to a
> service based on classes/packages/bundles it gets invoked from? I
> already saw some example using the install location of a bundle, but
> that's inappropriate if you use different installation techniques.

You can prevent a bundle from using a service based on its location or
bundle JAR signer by default. It is also possible for you to create your
own conditions for which you can grant or deny permissions.

-> richard

> Thanx
>