JBoss-Tomcat JASS - env not bound
gzugic Aug 19, 2001 11:47 AMI have difficulties trying to resolve my JBoss-Tomcat JASS "env not bound" problem. My environment is:
Jboss2.2.2-Tomcat3.2.2
Oracle RDBMS 8.1.7
I am trying to test basic and form based authentication on my application. I am using DatabaseServerLoginModule with Principals and Roles tables created in an Oracle database. My user is "test" with "TestAdministrator" role and group Roles. This information is inserted in Principals and Roles tables. I also added <security-domain> to jboss.xml and jboss-web.xml as
<security-domain>java:/jass/test</security-domain>
My auth.conf file in ${jboss.dist}/conf/tomcat/auth.con looks like this:
test {
org.jboss.security.auth.spi.DatabaseServerLoginModule required
dsJndiName="java:/DefaultDS"
principalsQeuery="select Password from Principals where PrincipalID=?"
rolesQuery="select Role, RoleGroup, from Roles where principalID=?"
;
}
DefaultDS is Oracle and it is defined in ${jboss.dist}/conf/tomcat/jboss.jcml:
...
DefaultDS
org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
jdbc:oracle:thin:@localhost:1521:testdb
1200000
test
50
test
false
false
false
true
120000
1800000
false
false
1.0
10
...
web.xml security part is
...
<security-role>
<role-name>TestAdministrator</role-name>
</security-role>
<!--
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/login.html</form-error-page>
</form-login-config>
</login-config>
-->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Security test</realm-name>
</login-config>
<security-constraint>
<web-resource-collection>
<web-resource-name>Restricted</web-resource-name>
<url-pattern>/index.html</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>TestAdministrator</role-name>
</auth-constraint>
<user-data-constraint>
no description
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
When I try to login as user "test" JBoss gives me this error all the time:
[EmbeddedTomcatSX]Error during authentication
[EmbeddedTomcatSX]javax.naming.NameNotFoundException: env not bound
Could you please help me to resolve this problem. I obviously missing something in JBoss-JASS configuration.
Thanks,
Goran Zugic