Emerson,
Thanks for your advice. I ended up creating MyDatabaseServerLoginModule 
which gets a DB connection using DriverManager and not JNDI.
And this works nicely. I suppose the fully correct way would be to have 
the client LoginModule connect to the EJB server, and call a session bean 
to authenticate the user and password.
This way, we can prevent client access to the DB. The authentication 
session bean can be allowed to be run by anyone, and all other beans can 
insist on an authenticated user.

However, for my unit tests, I don't need to worry about access to the DB.
Ciao,
Jonathan O'Connor
Ph: +353 1 872 3305
Mob: +353 86 824 9736
Fax: +353 1 873 3612




Emerson Cargnin - SICREDI Servi�os <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
25.11.2002 20:26
Please respond to jboss-user

 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        Re: [JBoss-user] What should be in client auth.conf to enable 
login at 
server?


> Symptoms:
> On the client side, lc.getSubject().getPrincipals().size() is always 0, 
> meaning we aren't logged on.
> On the client side, lc.login() with a bad password returns silently.
> On the server side, context.getCallerPrincipal() gives the correct name, 

> even if the client thinks I'm logged in.
> 
> Questions:
> 1. How can I trigger my DatabaseServerLoginModule authentication for my 
> client?
You must explicitly tell that you want the DatabaseServerLoginModule to 
be used, the ClientLoginModule just keeps the user/pass to be used in 
subsequent calls

> 2. I thought that lc.login() should throw a LoginException if the 
username 
> and password are bad. Why does this not happen?

the same answer from 1

> 3. I thought about putting the DatabaseServerLoginModule declaration 
into 
> the client auth,conf file, but I presume as this is a client, it can't 
do 
> the JNDI lookup on the DS name. Is this correct?

We use LDap login and it works right, but the client have access to the 
ldap server. Any idea at how to solve this using a datasource?


> Ciao,
> Jonathan O'Connor
> Ph: +353 1 872 3305
> Mob: +353 86 824 9736
> Fax: +353 1 873 3612
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Get the new Palm Tungsten T 
> handheld. Power & Color in a compact size! 
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 


-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
| Emerson Cargnin          |
| Analista de Sistemas Sr. |
| Tel : (051) 3358-4959    |
| SICREDI Servi�os         |
| Porto Alegre - Brasil    |
|xxxxxxxxxxxxxxxxxxxxxxxxxx|



-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to