How to use org.jboss.security.ProxyLoginModule in the auth.c
dtan Sep 17, 2001 5:24 PMHi,
I wrote my custom MyUserNamePasswordLoginModule(which extends AbstractServerLoginModule) and MyDatabaseServerLoginModule(which extends MyUserNamePasswordLoginModule).
I tried to modify auth.conf as :
example2 {
/* A JDBC based LoginModule
LoginModule options:
dsJndiName: The name of the DataSource of the database containing the Principals, Roles tables
principalsQuery: The prepared statement query equivalent to:
"select Password from Principals where PrincipalID=?"
rolesQuery: The prepared statement query equivalent to:
"select Role, RoleGroup from Roles where PrincipalID=?"
*/
com.myproject.jaas.MyDatabaseServerLoginModule required
dsJndiName="java:/OracleDB"
principalsQuery="select Password from Principals where PrincipalID=?"
rolesQuery="select Role, RoleGroup from Roles where PrincipalID=?"
;
};
I found out that the JBoss server could not read this
loginmodule when I made a jar of these loginmodules and
put them in the JBoss/lib/ext directory.
Then I made the jboss-jaas.jar including these files in it(I changed the package of these files to org.jboss.security.auth.spi). It worked.
I read in JBoss 2.2 - Tomcat 3.2 bundle documentation that JBoss uses ProxyLoginModule to bootstrap the non-classpath LoginModule. I tried adding
org.jboss.security.ProxyLoginModule = "com.myproject.jaas.MyDatabaseServerLoginModule" required
to my auth.conf file. But it didn't help.
example2 {
/* A JDBC based LoginModule
LoginModule options:
dsJndiName: The name of the DataSource of the database containing the Principals, Roles tables
principalsQuery: The prepared statement query equivalent to:
"select Password from Principals where PrincipalID=?"
rolesQuery: The prepared statement query equivalent to:
"select Role, RoleGroup from Roles where PrincipalID=?"
*/
org.jboss.security.ProxyLoginModule = "com.myproject.jaas.MyDatabaseServerLoginModule" required
dsJndiName="java:/OracleDB"
principalsQuery="select Password from Principals where PrincipalID=?"
rolesQuery="select Role, RoleGroup from Roles where PrincipalID=?"
;
};
Can anyone please tell me how I can use the ProxyLoginModule for JBoss2.2-Tomcat3.2 Bundle or the way I get use my custom UserNamePasswordLoginMOdule and databaseserverLoginMOdule without putting them into the jboss-jaas.jar
Thank you very much.