[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Tutorial for setup of Authentication in JBoss?

dickson1888 do-not-reply at jboss.com
Thu Jun 4 04:57:27 EDT 2009


Thanks Peter.

I install jxplorer and can browse the ldap server; get the my DN as below. And list the ldap auth config as below. I still get 403 error code. Peter, please help to point out what's wrong. Thanks.


DN: uid=dickson,ou=people,o=my.com

********************************************
login-config.xml
--------------------------
<application-policy name = "testLdapExample1">

<login-module code="org.jboss.security.auth.spi.LdapLoginModule"
flag="required">
<module-option name="java.naming.factory.initial">
com.sun.jndi.ldap.LdapCtxFactory
</module-option>
<module-option name="java.naming.provider.url">
ldap://ldap.my.com/
</module-option>
<module-option name="java.naming.security.authentication">
simple
</module-option>
<module-option name="principalDNPrefix">uid=</module-option>
<module-option name="principalDNSuffix">,ou=people,o=my.com</module-option>
<module-option name="rolesCtxDN">,ou=people,o=my.com</module-option>
<module-option name="uidAttributeID">uid</module-option>
<module-option name="matchOnUserDN">true</module-option>
<module-option name="roleAttributeID">userClass</module-option>
<module-option name="roleAttributeIsDN">true</module-option>
<module-option name="searchTimeLimit">5000</module-option>
<module-option name="searchScope">ONELEVEL_SCOPE</module-option>
</login-module>
</application-policy>

*********************************************

web.xml
-----------------
   <security-constraint>
   <web-resource-collection>
   <web-resource-name>HtmlAdaptor</web-resource-name>
   An example security config that only allows users with the
   role JBossAdmin to access the HTML JMX console web application
   
   <url-pattern>/*</url-pattern>
   <http-method>GET</http-method>
   <http-method>POST</http-method>
   </web-resource-collection>
   <auth-constraint>
   <role-name>staff</role-name>
   </auth-constraint>
   </security-constraint>


   <login-config>
      <auth-method>BASIC</auth-method>
      <realm-name>JBoss</realm-name>
   </login-config>

   <security-role>
      <role-name>staff</role-name>
   </security-role>


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4235200#4235200

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4235200



More information about the jboss-user mailing list