[jboss-user] [Security & JAAS/JBoss] - Re: Strange think!

kourkk do-not-reply at jboss.com
Wed Sep 13 00:27:29 EDT 2006


Thanks for the response fhh. 
My jboss-web.xml is OK 

<?xml version="1.0"?>

<jboss-web>
	<security-domain>java:/jaas/myPolicy</security-domain>
</jboss-web> 

and is pointing to the correct policy inside login-conf.xml. 

    <application-policy name="myPolicy">
		
			<login-module code="org.jboss.security.ClientLoginModule" flag="required">
			</login-module>
			<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
				<module-option name="managedConnectionFactoryName">
					jboss.jca:service=LocalTxCM,name=MySqlDS
				</module-option>
				<module-option name="dsJndiName">
					java:/MySqlDS
				</module-option>
				<module-option name="principalsQuery">
					SELECT PASSWD FROM PRINCIPALS WHERE USERID=?
				</module-option>
				<module-option name="rolesQuery">
					SELECT ROLEID 'Roles', ROLEGROUP 'RoleGroups' FROM ROLES WHERE USERID=?
				</module-option>
			</login-module>
         
    </application-policy> 

I am not sure though if my database realm is need it also. i.e  the following is needed in login-conf.xml?

    <application-policy name = "MySqlDbRealm">
       
          <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
             flag = "required">
             <module-option name = "principal">root</module-option>
             <module-option name = "userName">root</module-option>
             <module-option name = "password">root</module-option>
             <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
          </login-module>
       
    </application-policy>

 Yes the problem is that can not find the my application policy when i try to login with the loginContext.login. But when i am redirected to the login page (FORM based security) and the j_security_check executed everything works ok, it find everything. But with loginContext.login no. And also remember that IT Was working.

Another good is that I changed to jboss 4.05 cr1 and now is working again. 

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

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



More information about the jboss-user mailing list