Hi,
I changed the code in the login-config.xml a little bit to match the instruction in the
wiki
http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingAnLDAPSourceForPortalAuthen...
I did not modify the identity-config.xml. The login-config.xml is the only place that I
made changes to
| <login-module code="org.jboss.portal.identity.auth.IdentityLoginModule"
flag="sufficient">
| <module-option
name="unauthenticatedIdentity">guest</module-option>
| <module-option
name="userModuleJNDIName">java:/portal/UserModule</module-option>
| <module-option
name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
| <module-option
name="additionalRole">Authenticated</module-option>
| <module-option
name="password-stacking">useFirstPass</module-option>
| </login-module>
| <login-module
code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required"
>
| <module-option
name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
| <module-option
name="java.naming.provider.url">ldap://localhost:389/</module-option>
| <module-option
name="java.naming.security.authentication">simple</module-option>
| <module-option
name="baseCtxDN">ou=People,o=test,dc=portal,dc=example,dc=com</module-option>
| <module-option
name="baseFilter">(uid={0})</module-option>
| <module-option
name="rolesCtxDN">ou=Roles,o=test,dc=portal,dc=example,dc=com</module-option>
| <module-option
name="roleFilter">(member={1})</module-option>
| <module-option
name="roleAttributeID">member</module-option>
| <module-option
name="roleRecursion">-1</module-option>
| <module-option
name="roleNameAttributeID">cn</module-option>
| <module-option
name="roleAttributeIsDN">true</module-option>
| <module-option
name="searchTimeLimit">5000</module-option>
| <module-option
name="searchScope">SUBTREE_SCOPE</module-option>
| </login-module>
|
but I still get the same error when trying to get the user role with the same codes as
posted above. This time when I enter username/password and hit enter key, there are some
errors at first
anonymous wrote :
| 21:55:30,343 ERROR [STDERR] java.lang.NullPointerException
| 21:55:30,343 ERROR [STDERR] at javax.naming.InitialContext.getURLScheme(Init
| ialContext.java:269)
| 21:55:30,343 ERROR [STDERR] at javax.naming.InitialContext.getURLOrDefaultIn
| itCtx(InitialContext.java:318)
| 21:55:30,343 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialCon
| text.java:392)
| 21:55:30,343 ERROR [STDERR] at org.jboss.portal.identity.auth.IdentityLoginM
| odule.getUserProfileModule(IdentityLoginModule.java:127)
| 21:55:30,343 ERROR [STDERR] at org.jboss.portal.identity.auth.IdentityLoginM
| odule$1.run(IdentityLoginModule.java:220)
| 21:55:30,343 ERROR [STDERR] at org.jboss.portal.common.transaction.Transacti
| ons.apply(Transactions.java:219)
| 21:55:30,343 ERROR [STDERR] at org.jboss.portal.common.transaction.Transacti
| ons.required(Transactions.java:289)
| .....
|
I am really confused about the instruction in the reference guide as I went through those
few times but haven't gained any success of connecting to LDAP server (in my case,
OpenDS).
I picked the solution in the wiki because it worked for me but now, I am stuck in getting
user role straight out from the LDAP. Is there a way to get those roles?
Thanks,
SGM
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090079#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...