You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by ngcutura <ng...@gmail.com> on 2006/07/16 00:45:02 UTC

Re: LDAP Authorization

Hi all,

I followed James' advice and created simple LDAPAuthorizationMap. It has no
support for wildcards or composite destinations at the moment.

Attached is a zip archive with 4 files:
LdapAuth.zip 
- LDAPAuthorizationMap.java (module code)
- LDAPAuthorizationMapTest.java (module test)
- LDAPAuthorizationMap.properties (list of module properties)
- AMQAuth.ldif (sample directory used for testing)

Module works through JUnit tests. To run the tests you need to setup a
directory. I used ApacheDS; export of my sample directory is in the file
AMQAuth.ldif. Contents of this file is also present in
LDAPAuthorizationMapTest.java.

I am not familiar with Spring and I was not able to deduce how to specify
module properties in AMQ XML config file. I need help with this and I would
very much appreciate the following:
- given the LDAPAuthorizationMap.properties file produce XML file
- given the LDAPAuthorizationMap.java add code changes to accept properties
from XML file above

I am pretty much sure that my choice of constructor taking Map as argument
is inappropraite but having no knowledge of Spring one choice was as good as
another for me.

Regards,
NGC

James.Strachan wrote:
> 
> On 6/29/06, ngcutura <ng...@gmail.com> wrote:
>>
>> Thank you for reply.
>>
>> There is no <bean class="com.acme..." ... > in security example but this
>> is
>> quite important.
> 
> Thats just a way to instantiate some JavaBean using regular Spring style
> syntax.
> 
>> Is there some default class like DefaultAuthorizationMap?
> 
> Yes -  by all means derive from that if you want.
> 
>> What would this declaration be exactly for the security example you
>> referred
>> to?
>>
>> I think I can manage AuthorizationEntry by subclassing it or adding
>> another
>> parse() method.
> 
> You could ignore the DefaultAuthorizationMap/AuthorizationEntry
> entirely and just walk JNDI/LDAP and create a set of GroupPrincipal
> POJOs for each group for a given role & destination). It might be
> simpler than trying to understand how the DefaultAuthorizationMap.
> 
> Note that DefaultAuthorizationMap is essentially an in-memory cache of
> the results; you probably want to look at JNDI/LDAP at runtime to
> ensure up to date values.
> 
>> I'll be on vacation next week but I'll continue with the work after the
>> WC
>> finals. ;-)
> 
> Great! :)
> 
> (Here's hoping England actually start playing football soon...  :-)
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 
-- 
View this message in context: http://www.nabble.com/LDAP-Authorization-tf1851705.html#a5344494
Sent from the ActiveMQ - Dev forum at Nabble.com.


Re: LDAP Authorization

Posted by James Strachan <ja...@gmail.com>.
On 7/21/06, ngcutura <ng...@gmail.com> wrote:
>
> (hyperlinked file below)
> http://www.nabble.com/user-files/72/LdapAuth.zip LdapAuth.zip
>
> This is the best I could come up with. Please take a look at
> LDAPAuthorizationMap.java and LDAPAuthorizationMap.xml. If they seem OK
> please tell em the next steps to actually use it in AMQ.

I'll take a look

> I was not able to use JIRA to upload this archive. It says that more
> operations are available if I were logged in. How do I (should I) log in to
> JIRA?

So you need to register and login to JIRA then you are able to report
new issues, comment on issues or attach patches/files to issues etc

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: LDAP Authorization

Posted by ngcutura <ng...@gmail.com>.
(hyperlinked file below)
http://www.nabble.com/user-files/72/LdapAuth.zip LdapAuth.zip 

This is the best I could come up with. Please take a look at
LDAPAuthorizationMap.java and LDAPAuthorizationMap.xml. If they seem OK
please tell em the next steps to actually use it in AMQ.

I was not able to use JIRA to upload this archive. It says that more
operations are available if I were logged in. How do I (should I) log in to
JIRA?

Regards,
NGC

-- 
View this message in context: http://www.nabble.com/LDAP-Authorization-tf1851705.html#a5440827
Sent from the ActiveMQ - Dev forum at Nabble.com.


Re: LDAP Authorization

Posted by James Strachan <ja...@gmail.com>.
On 7/17/06, ngcutura <ng...@gmail.com> wrote:
>
> Thanks!
>
> The patch is not coomplete yet. I still need help with integration into AMQ
> (Spring style properties) to be able to use it.
>
> (copied from previous post)
> I am not familiar with Spring and I was not able to deduce how to specify
> module properties in AMQ XML config file. I need help with this and I would
> very much appreciate the following:
> - given the LDAPAuthorizationMap.properties file produce XML file
> - given the LDAPAuthorizationMap.java add code changes to accept properties
> from XML file above
>
> Is there any documentation on this that I can read?

Up until now no there wasn't a whole lot of documentation on this
area. I've just created a little guide on configuring things in
ActiveMQ which hopefully will help some...

http://activemq.org/site/developing-plugins.html

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: LDAP Authorization

Posted by ngcutura <ng...@gmail.com>.
Thanks!

The patch is not coomplete yet. I still need help with integration into AMQ
(Spring style properties) to be able to use it.

(copied from previous post)
I am not familiar with Spring and I was not able to deduce how to specify
module properties in AMQ XML config file. I need help with this and I would
very much appreciate the following:
- given the LDAPAuthorizationMap.properties file produce XML file
- given the LDAPAuthorizationMap.java add code changes to accept properties
from XML file above

Is there any documentation on this that I can read?

Thanks and regards,
NGC


James.Strachan wrote:
> 
> On 7/17/06, James Strachan <ja...@gmail.com> wrote:
>> On 7/17/06, ngcutura <ng...@gmail.com> wrote:
>> > > I saw an entry in JIRA "AMQ-376". Would this be appropriate or
>> another one
>> > > is required?
>> > > Can I create entry in JIRA as unprivileged user? I didn't try, to be
>> > > honest, I thought that someone from the development team is
>> authorized to
>> > > manage entries in JIRA. :-)Anyone who registers with JIRA can create
>> new JIRA issues.
>>
>> Anyone can create JIRA issues...
>>
>> http://incubator.apache.org/activemq/support.html
>>
>> Though we need to assign karma to you if someone wants to assign an
>> issue to themselves
>>
>> http://incubator.apache.org/activemq/contributing.html
> 
> I've created a JIRA for you so we can track the patch's progress etc.
> 
> http://issues.apache.org/activemq/browse/AMQ-826
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 
-- 
View this message in context: http://www.nabble.com/LDAP-Authorization-tf1851705.html#a5367147
Sent from the ActiveMQ - Dev forum at Nabble.com.


Re: LDAP Authorization

Posted by James Strachan <ja...@gmail.com>.
On 7/17/06, James Strachan <ja...@gmail.com> wrote:
> On 7/17/06, ngcutura <ng...@gmail.com> wrote:
> > > I saw an entry in JIRA "AMQ-376". Would this be appropriate or another one
> > > is required?
> > > Can I create entry in JIRA as unprivileged user? I didn't try, to be
> > > honest, I thought that someone from the development team is authorized to
> > > manage entries in JIRA. :-)Anyone who registers with JIRA can create new JIRA issues.
>
> Anyone can create JIRA issues...
>
> http://incubator.apache.org/activemq/support.html
>
> Though we need to assign karma to you if someone wants to assign an
> issue to themselves
>
> http://incubator.apache.org/activemq/contributing.html

I've created a JIRA for you so we can track the patch's progress etc.

http://issues.apache.org/activemq/browse/AMQ-826

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: LDAP Authorization

Posted by James Strachan <ja...@gmail.com>.
On 7/17/06, ngcutura <ng...@gmail.com> wrote:
>
>
> James.Strachan wrote:
> >
> >> Sounds great! I didn't see an attachment - I wonder it might be easier
> >> if you raised a JIRA and attached your zip to the JIRA issue?
> >
> >
> > Attachment is hyperlinked below sentnece "Attached is a zip archive with 4
> > files:" in original post.
> > ("LdapAuth.zip" is hyperlinked; clicking this link opens file download.)

Ah - it seems to have got stripped from the emails (or at least gmail
stripped it) but its visible on nabble.com.


> > I saw an entry in JIRA "AMQ-376". Would this be appropriate or another one
> > is required?
> > Can I create entry in JIRA as unprivileged user? I didn't try, to be
> > honest, I thought that someone from the development team is authorized to
> > manage entries in JIRA. :-)Anyone who registers with JIRA can create new JIRA issues.

Anyone can create JIRA issues...

http://incubator.apache.org/activemq/support.html

Though we need to assign karma to you if someone wants to assign an
issue to themselves

http://incubator.apache.org/activemq/contributing.html

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: LDAP Authorization

Posted by ngcutura <ng...@gmail.com>.

James.Strachan wrote:
> 
>> Sounds great! I didn't see an attachment - I wonder it might be easier
>> if you raised a JIRA and attached your zip to the JIRA issue?
> 
> 
> Attachment is hyperlinked below sentnece "Attached is a zip archive with 4
> files:" in original post.
> ("LdapAuth.zip" is hyperlinked; clicking this link opens file download.)
> 
> I saw an entry in JIRA "AMQ-376". Would this be appropriate or another one
> is required?
> Can I create entry in JIRA as unprivileged user? I didn't try, to be
> honest, I thought that someone from the development team is authorized to
> manage entries in JIRA. :-)
> 
> Regards,
> NGC
> 
> On 7/15/06, ngcutura <ng...@gmail.com> wrote:
>>
>> Hi all,
>>
>> I followed James' advice and created simple LDAPAuthorizationMap. It has
>> no
>> support for wildcards or composite destinations at the moment.
>>
>> Attached is a zip archive with 4 files:
>> LdapAuth.zip
>> - LDAPAuthorizationMap.java (module code)
>> - LDAPAuthorizationMapTest.java (module test)
>> - LDAPAuthorizationMap.properties (list of module properties)
>> - AMQAuth.ldif (sample directory used for testing)
>>
>> Module works through JUnit tests. To run the tests you need to setup a
>> directory. I used ApacheDS; export of my sample directory is in the file
>> AMQAuth.ldif. Contents of this file is also present in
>> LDAPAuthorizationMapTest.java.
>>
>> I am not familiar with Spring and I was not able to deduce how to specify
>> module properties in AMQ XML config file. I need help with this and I
>> would
>> very much appreciate the following:
>> - given the LDAPAuthorizationMap.properties file produce XML file
>> - given the LDAPAuthorizationMap.java add code changes to accept
>> properties
>> from XML file above
>>
>> I am pretty much sure that my choice of constructor taking Map as
>> argument
>> is inappropraite but having no knowledge of Spring one choice was as good
>> as
>> another for me.
>>
>> Regards,
>> NGC
>>
>> James.Strachan wrote:
>> >
>> > On 6/29/06, ngcutura <ng...@gmail.com> wrote:
>> >>
>> >> Thank you for reply.
>> >>
>> >> There is no <bean class="com.acme..." ... > in security example but
>> this
>> >> is
>> >> quite important.
>> >
>> > Thats just a way to instantiate some JavaBean using regular Spring
>> style
>> > syntax.
>> >
>> >> Is there some default class like DefaultAuthorizationMap?
>> >
>> > Yes -  by all means derive from that if you want.
>> >
>> >> What would this declaration be exactly for the security example you
>> >> referred
>> >> to?
>> >>
>> >> I think I can manage AuthorizationEntry by subclassing it or adding
>> >> another
>> >> parse() method.
>> >
>> > You could ignore the DefaultAuthorizationMap/AuthorizationEntry
>> > entirely and just walk JNDI/LDAP and create a set of GroupPrincipal
>> > POJOs for each group for a given role & destination). It might be
>> > simpler than trying to understand how the DefaultAuthorizationMap.
>> >
>> > Note that DefaultAuthorizationMap is essentially an in-memory cache of
>> > the results; you probably want to look at JNDI/LDAP at runtime to
>> > ensure up to date values.
>> >
>> >> I'll be on vacation next week but I'll continue with the work after
>> the
>> >> WC
>> >> finals. ;-)
>> >
>> > Great! :)
>> >
>> > (Here's hoping England actually start playing football soon...  :-)
>> >
>> >
>> > --
>> >
>> > James
>> > -------
>> > http://radio.weblogs.com/0112098/
>> >
>> >
>> --
>> View this message in context:
>> http://www.nabble.com/LDAP-Authorization-tf1851705.html#a5344494
>> Sent from the ActiveMQ - Dev forum at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 
-- 
View this message in context: http://www.nabble.com/LDAP-Authorization-tf1851705.html#a5359733
Sent from the ActiveMQ - Dev forum at Nabble.com.


Re: LDAP Authorization

Posted by James Strachan <ja...@gmail.com>.
Sounds great! I didn't see an attachment - I wonder it might be easier
if you raised a JIRA and attached your zip to the JIRA issue?

On 7/15/06, ngcutura <ng...@gmail.com> wrote:
>
> Hi all,
>
> I followed James' advice and created simple LDAPAuthorizationMap. It has no
> support for wildcards or composite destinations at the moment.
>
> Attached is a zip archive with 4 files:
> LdapAuth.zip
> - LDAPAuthorizationMap.java (module code)
> - LDAPAuthorizationMapTest.java (module test)
> - LDAPAuthorizationMap.properties (list of module properties)
> - AMQAuth.ldif (sample directory used for testing)
>
> Module works through JUnit tests. To run the tests you need to setup a
> directory. I used ApacheDS; export of my sample directory is in the file
> AMQAuth.ldif. Contents of this file is also present in
> LDAPAuthorizationMapTest.java.
>
> I am not familiar with Spring and I was not able to deduce how to specify
> module properties in AMQ XML config file. I need help with this and I would
> very much appreciate the following:
> - given the LDAPAuthorizationMap.properties file produce XML file
> - given the LDAPAuthorizationMap.java add code changes to accept properties
> from XML file above
>
> I am pretty much sure that my choice of constructor taking Map as argument
> is inappropraite but having no knowledge of Spring one choice was as good as
> another for me.
>
> Regards,
> NGC
>
> James.Strachan wrote:
> >
> > On 6/29/06, ngcutura <ng...@gmail.com> wrote:
> >>
> >> Thank you for reply.
> >>
> >> There is no <bean class="com.acme..." ... > in security example but this
> >> is
> >> quite important.
> >
> > Thats just a way to instantiate some JavaBean using regular Spring style
> > syntax.
> >
> >> Is there some default class like DefaultAuthorizationMap?
> >
> > Yes -  by all means derive from that if you want.
> >
> >> What would this declaration be exactly for the security example you
> >> referred
> >> to?
> >>
> >> I think I can manage AuthorizationEntry by subclassing it or adding
> >> another
> >> parse() method.
> >
> > You could ignore the DefaultAuthorizationMap/AuthorizationEntry
> > entirely and just walk JNDI/LDAP and create a set of GroupPrincipal
> > POJOs for each group for a given role & destination). It might be
> > simpler than trying to understand how the DefaultAuthorizationMap.
> >
> > Note that DefaultAuthorizationMap is essentially an in-memory cache of
> > the results; you probably want to look at JNDI/LDAP at runtime to
> > ensure up to date values.
> >
> >> I'll be on vacation next week but I'll continue with the work after the
> >> WC
> >> finals. ;-)
> >
> > Great! :)
> >
> > (Here's hoping England actually start playing football soon...  :-)
> >
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
> >
> --
> View this message in context: http://www.nabble.com/LDAP-Authorization-tf1851705.html#a5344494
> Sent from the ActiveMQ - Dev forum at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/