Get the Spring Context or a Spring bean inside the JAAS LdapLoginModule

Daniel Fisher dfisher at vt.edu
Wed Apr 23 10:06:22 EDT 2014


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.

--Daniel Fisher


More information about the dev mailing list