Sunday, August 28, 2011

Ldap Realm configuration on Jboss AS7

In Jboss 6 and lower the ldap Realm was configured in the login-config.xml file like :
 


com.sun.jndi.ldap.LdapCtxFactory
simple
....



On jboss 7 the ldap Realm configuration has a little changed, it become on the standalone.xml (or in domain.xml) as a security domain under :
 
As bellow:







...




Note that the xml parser has changed in Jboss 7, so you should convert every module-option tag so that the lowest level data element for the module-option tag was replaced by the attribute value= and the tag was converted to a self-closing tag, for example:


com.sun.jndi.ldap.LdapCtxFactory

Become:




For our blog ldap directory, the wall configuration become :



















also,




needs to be changed to:







else ModuleClassLoader won't load the com.sun.jndi.ldap.LdapCtxFactory which is needed in ldap authentication modules, and obviously you ll need org.jboss.security.auth.spi.LdapLoginModule on classpath.

1 comment:

  1. Hi,

    I do have a problem with LDAP Authentication.

    Could you please help me to solve?

    http://www.coderanch.com/t/602100/Security/LDAP-Server-configuration-JBoss-Migration

    ReplyDelete