[JBoss Portal] - Re: Can not get user role from LDAP server
by saigon_man
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#4090079
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090079
17Â years, 3Â months
[JBoss Seam] - Re: m:subject always HTML encodes strings
by jarkkoï¼ jab.fi
FaceletsRendered$Context.wrap() calls facesContext.setResponseWriter with null character encoding. This causes HtmlRenderKitImpl.createResponseWriter to default to ISO-8859-1 encoding which further causes the usage of UnicodeEncoder (delegate.write(String) in MailResponseWriter.write(String)) later on which translates äää -->
| // Wrap the ResponseWriter
| originalResponseWriter = facesContext.getResponseWriter();
| facesContext.setResponseWriter(facesContext.getRenderKit().createResponseWriter(writer,
| null, null));
|
| Class org.apache.myfaces.shared_impl.renderkit.html.HtmlResponseWriterImpl.java:
|
| public void write(String str) throws IOException
| {
| closeStartTagIfNecessary();
| // empty string commonly used to force the start tag to be closed.
| // in such case, do not call down the writer chain
| if (str.length() > 0)
| {
| // Don't bother encoding anything if chosen character encoding is UTF-8
| if (UTF8.equals(_characterEncoding)) _writer.write(str);
| else _writer.write(UnicodeEncoder.encode(str) );
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090075#4090075
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090075
17Â years, 3Â months