I'm using Tomcat 5.5 and want to setup JAAS based authentication. I'm using
jbosssx for the LoginModule implementations.
The jboss implementation is activated when I try to login, but throws a
NameNotFoundException:
javax.security.auth.login.LoginException: javax.naming.NameNotFoundException:
Name QrmDS is not bound in this Context
Thanx for your help,
Ittay
my server.xml is:
....
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
<Resource name="QrmDS" auth="Container" type="javax.sql.DataSource"
maxActive="30" maxIdle="5" maxWait="15"
username="qrm" password="qrm_99"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/qrm"
zeroDateTimeBehavior="convertToNull" useServerPrepStmts="false"
autoReconnect="true" failOverReadOnly="false"
/>
</GlobalNamingResources>
....
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.JAASRealm" debug="99"
appName="qrm"
userClassNames="org.jboss.security.SimplePrincipal"
roleClassNames="org.jboss.security.SimpleGroup"
/>
....
and this is my jaas.config:
qrm
{
org.jboss.security.auth.spi.DatabaseServerLoginModule required
debug=true
dsJndiName="java:/QrmDS"
principalsQuery="select user_password from qrm_users where user_name=?"
rolesQuery="select qrm_roles.role_name, 'Roles' from
qrm_users,qrm_roles,qrm_users_roles where user_name=? and qrm_users.id =
qrm_users_roles.user_id and qrm_roles.id = qrm_users_roles.role_id"
unauthenticatedIdentity="guest";
};
client-login {
org.jboss.security.ClientLoginModule required;
};
--
===================================
Ittay Dror ([EMAIL PROTECTED])
Application Team Leader, R&D
Qlusters Inc.
+972-3-6081994 Fax: +972-3-6081841
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]