You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Vidar Ramdal <vi...@idium.no> on 2009/03/06 14:21:18 UTC

Using a custom AccessManager

I'm in a situation where I want to write my own Jackrabbit
AccessManager (I think).

However, to do so, I must implement
org.apache.jackrabbit.core.security.AccessManager, and none of the
org.apache.jackrabbit.core.* packages are exported by any of the
Jackrabbit bundles provided by Sling, so I'm unable to provide my
AccessManager in a bundle.

I have got my stuff running by hacking/extending the jackrabbit-server
bundle, but this is hardly optimal.
Does anyone have any suggestions for a better approach?

Or maybe we could provide some extension point in Sling, to plug-in a
custom AccessManager bundle into the supplied jackrabbit-server
bundle?

-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway
+47 21 531941, ext 2070

Re: Using a custom AccessManager

Posted by Rory Douglas <ro...@oracle.com>.
Sorry...here it is (early morning here) [1].  Unfortunately, it doesn't 
say much more than my first post ;-)

[1] http://markmail.org/message/bea62gkwcknkw3hp

Vidar Ramdal wrote:
> On Fri, Mar 6, 2009 at 3:44 PM, Rory Douglas <ro...@oracle.com> wrote:
>   
>> Prior to Jackrabbit 1.5, I did similar work for an ACL-based AccessManager
>> (see [1]).  The difference was I hacked the server bundle to export the
>> desired classes & created an AccessManagerFacade that would load up
>> implementations from bundles.
>>
>> You can look at o.a.s.jcr.jackrabbit.server.security.LoginModulePlugin and
>> o.a.s.jcr.jackrabbit.server.impl.security.PluggableDefaultLoginModule for
>> another approach that doesn't require exporting core Jackrabbit classes, but
>> does require providing delegate classes for any core API you want to expose
>> outside the jackrabbit-server bundle.
>>     
>
> Interesting, thanks!
>
> So, maybe the best approach would be a PluggableAccessManager. What do
> you guys think?
> I could have a shot at implementing it, if you think it's a good idea.
>
> BTW, I think you forgot the link [1] - I'd really like to see it :)
>
>   

-- 




Rory Douglas | Senior Principal Consultant
Fax: +1-201-604-6428 | Mobile: +1-917-498-5344
Oracle North America Consulting
ORACLE United States | | San Diego, CA
"Please consider your environmental responsibility before printing this 
e-mail"


Re: Using a custom AccessManager

Posted by Vidar Ramdal <vi...@idium.no>.
On Fri, Mar 6, 2009 at 3:44 PM, Rory Douglas <ro...@oracle.com> wrote:
> Prior to Jackrabbit 1.5, I did similar work for an ACL-based AccessManager
> (see [1]).  The difference was I hacked the server bundle to export the
> desired classes & created an AccessManagerFacade that would load up
> implementations from bundles.
>
> You can look at o.a.s.jcr.jackrabbit.server.security.LoginModulePlugin and
> o.a.s.jcr.jackrabbit.server.impl.security.PluggableDefaultLoginModule for
> another approach that doesn't require exporting core Jackrabbit classes, but
> does require providing delegate classes for any core API you want to expose
> outside the jackrabbit-server bundle.

Interesting, thanks!

So, maybe the best approach would be a PluggableAccessManager. What do
you guys think?
I could have a shot at implementing it, if you think it's a good idea.

BTW, I think you forgot the link [1] - I'd really like to see it :)

-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway
+47 21 531941, ext 2070

Re: Using a custom AccessManager

Posted by Rory Douglas <ro...@oracle.com>.
Prior to Jackrabbit 1.5, I did similar work for an ACL-based 
AccessManager (see [1]).  The difference was I hacked the server bundle 
to export the desired classes & created an AccessManagerFacade that 
would load up implementations from bundles.

You can look at o.a.s.jcr.jackrabbit.server.security.LoginModulePlugin 
and 
o.a.s.jcr.jackrabbit.server.impl.security.PluggableDefaultLoginModule 
for another approach that doesn't require exporting core Jackrabbit 
classes, but does require providing delegate classes for any core API 
you want to expose outside the jackrabbit-server bundle.

Regards,
Rory

Vidar Ramdal wrote:
> I'm in a situation where I want to write my own Jackrabbit
> AccessManager (I think).
>
> However, to do so, I must implement
> org.apache.jackrabbit.core.security.AccessManager, and none of the
> org.apache.jackrabbit.core.* packages are exported by any of the
> Jackrabbit bundles provided by Sling, so I'm unable to provide my
> AccessManager in a bundle.
>
> I have got my stuff running by hacking/extending the jackrabbit-server
> bundle, but this is hardly optimal.
> Does anyone have any suggestions for a better approach?
>
> Or maybe we could provide some extension point in Sling, to plug-in a
> custom AccessManager bundle into the supplied jackrabbit-server
> bundle?
>
>   

-- 




Rory Douglas | Senior Principal Consultant
Fax: +1-201-604-6428 | Mobile: +1-917-498-5344
Oracle North America Consulting
ORACLE United States | | San Diego, CA
"Please consider your environmental responsibility before printing this 
e-mail"