-
1. Re: DatabaseServerLoginModule Can't Find DataSource
lrem Sep 18, 2001 9:38 AM (in response to ksteo1)Do you look up netlifePool or java:/netlifePool?
-
2. Re: DatabaseServerLoginModule Can't Find DataSource
ksteo1 Sep 18, 2001 9:37 PM (in response to ksteo1)Hi,
I looked up java:/netlifePool
Here is my auth.conf ( Client Side )
other {
// Put your login modules that work without jBoss here
// jBoss LoginModule
org.jboss.security.ClientLoginModule required debug=true;
// Put your login modules that need jBoss here
org.jboss.security.auth.spi.DatabaseServerLoginModule required
dsJndiName="java:/netlifePool"
principalsQuery="select Password from NLF_RealmUsers where UserName=?"
rolesQuery="select GMGroup from NLF_RealmGroupMembers where GMMember=?"
unauthenticatedIdentity=nobody
;
};
Here is my auth.conf, server side.
// The default server login module
other {
// A simple server login module, which can be used when the number
// of users is relatively small. It uses two properties files:
// users.properties, which holds users (key) and their password (value).
// roles.properties, which holds users (key) and a comma-separated list of their roles (value).
// The unauthenticatedIdentity property defines the name of the principal
// that will be used when a null username and password are presented as is
// the case for an unuathenticated web client or MDB. If you don't want to
// allow such users to be authenticated remove the property.
org.jboss.security.auth.spi.UsersRolesLoginModule required
unauthenticatedIdentity="nobody";
org.jboss.security.ClientLoginModule required;
org.jboss.security.auth.spi.DatabaseServerLoginModule required
dsJndiName="java:/netlifePool"
principalsQuery="select Password from NLF_RealmUsers where UserName=?"
rolesQuery="select GMGroup from NLF_RealmGroupMembers where GMMember=?"
unauthenticatedIdentity=nobody
;
};
And here is the extract from my jboss.jcml, which points to the MSSQL 7.0 database which I am trying to connect to. I am using ThinWeb's DB Driver for JDBC access.
org.hsql.jdbcDriver,com.thinweb.tds.Driver,org.enhydra.instantdb.jdbc.idbDriver
<!-- Free TWdts JDBC driver configuration for netlife pool obtained from www.thinweb.com-->
org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
netlifePool
3
10
jdbc:twtds:sqlserver://psdemo/millennia10;user=millennia10devdbusr;password=passw0rd
Can anyone spot whether I am doing anything wrong here? I've been trying it for more then a day, and it still doesn't work. I am convinced I am missing something here, but I just can't spot what it is! Frustrating. :) -
3. Re: DatabaseServerLoginModule Can't Find DataSource
starksm64 Sep 19, 2001 12:38 PM (in response to ksteo1)The client side cannot access the java:/netlifePool as the java: context is only available inside of the server VM. You'll have to write your own client side login module that communicates with a server side component if you want to authenticate the client at login.
-
4. Re: DatabaseServerLoginModule Can't Find DataSource
ksteo1 Sep 19, 2001 10:23 PM (in response to ksteo1)Hi,
But I am using the DatabaseServerLoginModule, and I think it is this module that is giving me the NameNotBound exception. On the client side, I am just calling a login method.
Something like this..
AppCallbackHandler handler = new AppCallbackHandler(name, password);
LoginContext lc = new LoginContext("other", handler);
System.out.println("Created LoginContext");
lc.login();
It is at lc.login(), that the exception is encountered. I don't understand what I am doing wrong. I thought the DatabaseServerLoginModule is a server side component, which executes within the app server VM? Or am I wrong to assume that?
Thanks Stark. -
5. Re: DatabaseServerLoginModule Can't Find DataSource
starksm64 Sep 19, 2001 10:36 PM (in response to ksteo1)But you have the DatabaseServerLoginModule in your client side auth.conf file and this is gaurenteed not to work. The DatabaseServerLoginModule can only be used in the server auth.conf file.