Get the Spring Context or a Spring bean inside the JAAS LdapLoginModule
Daniel Fisher
dfisher at vt.edu
Wed Apr 23 10:34:24 EDT 2014
On Wed, Apr 23, 2014 at 10:20 AM, Vasile Alin <alinachegalati at gmail.com> wrote:
>
>
>
>
> On 23 April 2014 17:06, Daniel Fisher <dfisher at vt.edu> wrote:
>>
>> On Wed, Apr 23, 2014 at 9:14 AM, Vasile Alin <alinachegalati at gmail.com>
>> wrote:
>> > This is the scenario:
>> >
>> > The user logs in using an email address. We have a problem with special
>> > characters in email addresses in our LDAP server so we want to translate
>> > transparently the email address to another field, such as uid. This will
>> > be
>> > done by changing the JAAS context with the associated uid and use it in
>> > the
>> > actual LDAP bind.
>> >
>>
>> That is the default behavior of the LDAP JAAS module.
>>
>> ShibUserPassAuth {
>> edu.vt.middleware.ldap.jaas.LdapLoginModule required
>> ldapUrl="ldap://my.ldap.org"
>> baseDn="ou=people,dc=example,dc=org"
>> userFilter="mail={0}"
>> ;
>> };
>>
>> This will resolve the user's entry DN using the mail attribute and
>> then bind as that entry.
>
>
>
> Correct, this is what we had so far.
>
> Right now we still have the mail from the user but the bind has to be done
> using uid. Something like this:
>
> ShibUserPassAuth {
> edu.vt.middleware.ldap.jaas.LdapLoginModule required
> ldapUrl="ldap://my.ldap.org"
> baseDn="ou=people,dc=example,dc=org"
> userFilter="uid={0}"
> ;
> };
>
> The aim is to transform the mail into uid, so that the user's DN is resolved
> using that uid.
>
Ok, that sounds doable.
Can you briefly describe your DIT?
I'm curious where you are storing the mail the attribute and why it's
not accessible on the entry you want to bind as.
--Daniel Fisher
More information about the dev
mailing list