You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by anupamb82 <an...@gmail.com> on 2012/09/24 15:22:55 UTC

Re: LDAP Authentication with different userDnTemplate value

Hello Les,

I was successfully able to authenticate my users by separately defining
each unique userDnTemplate.

Although its not possible to authenticate all users in the organization
because it will be difficult to define the userDnTemplate each time time a
new users from different OU needs to be authenticates additionally from
maintenance point of view deploying the application each time will be not
be accepted.

Anyhow i can authenticate all users in one go ?

Regards
Anupam

On Sat, Apr 28, 2012 at 1:49 AM, Les Hazlewood-2 [via Shiro User] <
ml-node+s582556n7507313h13@n2.nabble.com> wrote:

> Can you not use two different LdapRealms, each with its own configured
> UserDnTemplate?
>
> Cheers,
>
> --
> Les Hazlewood
> CTO, Stormpath | http://stormpath.com | 888.391.5282
> twitter: @lhazlewood | http://twitter.com/lhazlewood
> blog: http://leshazlewood.com
> stormpath blog: http://www.stormpath.com/blog
>
> On Fri, Apr 27, 2012 at 5:30 AM, anupamb82 <[hidden email]<http://user/SendEmail.jtp?type=node&node=7507313&i=0>>
> wrote:
>
> > I need to authenticate users with my LDAP url. Since each user is from a
> > different country it has a different User Distinguished name in my LDAP
> > system.
> > e.g.
> > CN=userid1234,OU=User Accounts,OU=India,DC=example,DC=com
> > CN=userid4567,OU=User Accounts,OU=USA,DC=example,DC=com
> >
> > How can I get the User distinguished name before getting the
> > UsernamePasswordToken using the below java code ?
> >
> > UsernamePasswordToken token = new UsernamePasswordToken(username,
> password);
> >
> > --
> > View this message in context:
> http://shiro-user.582556.n2.nabble.com/LDAP-Authentication-with-different-userDnTemplate-value-tp7506063.html
> > Sent from the Shiro User mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://shiro-user.582556.n2.nabble.com/LDAP-Authentication-with-different-userDnTemplate-value-tp7506063p7507313.html
>  To unsubscribe from LDAP Authentication with different userDnTemplate
> value, click here<http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7506063&code=YW51cGFtYjgyQGdtYWlsLmNvbXw3NTA2MDYzfDM3NDQ3MzAyNw==>
> .
> NAML<http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Thanks & Regards
Anupam Bhattacharya




--
View this message in context: http://shiro-user.582556.n2.nabble.com/LDAP-Authentication-with-different-userDnTemplate-value-tp7506063p7577810.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: LDAP Authentication with different userDnTemplate value

Posted by Les Hazlewood <lh...@apache.org>.
I'm not sure I understand the issue.  If your baseDN is different for the
two user collections, won't you have to try both?  It is either this or
your AuthenticationToken contains some information that 'directs' which one
of the two to use at runtime...

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk


On Mon, Sep 24, 2012 at 6:31 AM, Anupam Bhattacharya <an...@gmail.com>wrote:

> Hello Les,
>
> I was successfully able to authenticate my users by separately defining
> each unique userDnTemplate.
>
> Although its not possible to authenticate all users in the organization
> because it will be difficult to define the userDnTemplate each time time a
> new users from different OU needs to be authenticates additionally from
> maintenance point of view deploying the application each time will be not
> be accepted.
>
> Anyhow i can authenticate all users in one go ?
>
> Regards
> Anupam
>
>
>>
>> On Sat, Apr 28, 2012 at 1:49 AM, Les Hazlewood-2 [via Shiro User] <
>> ml-node+s582556n7507313h13@n2.nabble.com> wrote:
>>
>>> Can you not use two different LdapRealms, each with its own configured
>>> UserDnTemplate?
>>>
>>> Cheers,
>>>
>>> --
>>> Les Hazlewood
>>> CTO, Stormpath | http://stormpath.com | 888.391.5282
>>> twitter: @lhazlewood | http://twitter.com/lhazlewood
>>> blog: http://leshazlewood.com
>>> stormpath blog: http://www.stormpath.com/blog
>>>
>>> On Fri, Apr 27, 2012 at 5:30 AM, anupamb82 <[hidden email]<http://user/SendEmail.jtp?type=node&node=7507313&i=0>>
>>> wrote:
>>>
>>> > I need to authenticate users with my LDAP url. Since each user is from
>>> a
>>> > different country it has a different User Distinguished name in my
>>> LDAP
>>> > system.
>>> > e.g.
>>> > CN=userid1234,OU=User Accounts,OU=India,DC=example,DC=com
>>> > CN=userid4567,OU=User Accounts,OU=USA,DC=example,DC=com
>>> >
>>> > How can I get the User distinguished name before getting the
>>> > UsernamePasswordToken using the below java code ?
>>> >
>>> > UsernamePasswordToken token = new UsernamePasswordToken(username,
>>> password);
>>> >
>>> > --
>>> > View this message in context:
>>> http://shiro-user.582556.n2.nabble.com/LDAP-Authentication-with-different-userDnTemplate-value-tp7506063.html
>>> > Sent from the Shiro User mailing list archive at Nabble.com.
>>>
>>>
>>> ------------------------------
>>>  If you reply to this email, your message will be added to the
>>> discussion below:
>>>
>>> http://shiro-user.582556.n2.nabble.com/LDAP-Authentication-with-different-userDnTemplate-value-tp7506063p7507313.html
>>>  To unsubscribe from LDAP Authentication with different userDnTemplate
>>> value, click here<http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7506063&code=YW51cGFtYjgyQGdtYWlsLmNvbXw3NTA2MDYzfDM3NDQ3MzAyNw==>
>>> .
>>> NAML<http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>> Anupam Bhattacharya
>>
>>
>>
>
>
> --
> Thanks & Regards
> Anupam Bhattacharya
>
>
>

Re: LDAP Authentication with different userDnTemplate value

Posted by Anupam Bhattacharya <an...@gmail.com>.
Hello Les,

I was successfully able to authenticate my users by separately defining
each unique userDnTemplate.

Although its not possible to authenticate all users in the organization
because it will be difficult to define the userDnTemplate each time time a
new users from different OU needs to be authenticates additionally from
maintenance point of view deploying the application each time will be not
be accepted.

Anyhow i can authenticate all users in one go ?

Regards
Anupam


>
> On Sat, Apr 28, 2012 at 1:49 AM, Les Hazlewood-2 [via Shiro User] <
> ml-node+s582556n7507313h13@n2.nabble.com> wrote:
>
>> Can you not use two different LdapRealms, each with its own configured
>> UserDnTemplate?
>>
>> Cheers,
>>
>> --
>> Les Hazlewood
>> CTO, Stormpath | http://stormpath.com | 888.391.5282
>> twitter: @lhazlewood | http://twitter.com/lhazlewood
>> blog: http://leshazlewood.com
>> stormpath blog: http://www.stormpath.com/blog
>>
>> On Fri, Apr 27, 2012 at 5:30 AM, anupamb82 <[hidden email]<http://user/SendEmail.jtp?type=node&node=7507313&i=0>>
>> wrote:
>>
>> > I need to authenticate users with my LDAP url. Since each user is from
>> a
>> > different country it has a different User Distinguished name in my LDAP
>> > system.
>> > e.g.
>> > CN=userid1234,OU=User Accounts,OU=India,DC=example,DC=com
>> > CN=userid4567,OU=User Accounts,OU=USA,DC=example,DC=com
>> >
>> > How can I get the User distinguished name before getting the
>> > UsernamePasswordToken using the below java code ?
>> >
>> > UsernamePasswordToken token = new UsernamePasswordToken(username,
>> password);
>> >
>> > --
>> > View this message in context:
>> http://shiro-user.582556.n2.nabble.com/LDAP-Authentication-with-different-userDnTemplate-value-tp7506063.html
>> > Sent from the Shiro User mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://shiro-user.582556.n2.nabble.com/LDAP-Authentication-with-different-userDnTemplate-value-tp7506063p7507313.html
>>  To unsubscribe from LDAP Authentication with different userDnTemplate
>> value, click here<http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7506063&code=YW51cGFtYjgyQGdtYWlsLmNvbXw3NTA2MDYzfDM3NDQ3MzAyNw==>
>> .
>> NAML<http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> Thanks & Regards
> Anupam Bhattacharya
>
>
>


-- 
Thanks & Regards
Anupam Bhattacharya