The documentation describes an external client that has its own auth.conf
login configuration file. To perform a client login within the same VM as the
application server you need to either change the server's auth.conf file to
have the "other" configuration section equal to that of the default client, or
create a "TestClient"(or whatever name you pass to LoginContext) to authenticate
against the org.jboss.security.ClientLoginModule, for example, 

TestClient {
    org.jboss.security.ClientLoginModule  required;
};

----- Original Message ----- 
From: "Grim Shieldsson" <[EMAIL PROTECTED]>
To: "JBOSS USER" <[EMAIL PROTECTED]>
Sent: Tuesday, May 29, 2001 12:33 PM
Subject: [JBoss-user] Losing principal from tomcat servlet, and yet authenticated


> This seems like the same problem that Lewis Henderson was having a bit
> ago.  He didn't appear to receive any on-list help, so I'm hoping for
> better results :)
> Here's what I'm getting:
> [] Base setup.. really need to move these into the setup for the EJB
> stuff.
> [] login( Anonymous, anonymous)
> [] Creating AppCallbackHandler.
> [] Creating LoginContext.
> [] Logging in.
> [UserDatabasePool] No transaction right now.
> [UserDatabasePool] Pool UserDatabasePool [1/1/Unlimited] gave out
> pooled object:
> org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl@678fc6
> [UserDatabasePool] Pool UserDatabasePool [0/1/Unlimited] returned
> object org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl@678fc6 to
> the pool.
> [JAASSecurity] User 'Anonymous' authenticated.
> [UserDatabasePool] No transaction right now.
> [UserDatabasePool] Pool UserDatabasePool [1/1/Unlimited] gave out
> pooled object:
> org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl@678fc6
> [UserDatabasePool] Pool UserDatabasePool [0/1/Unlimited] returned
> object org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl@678fc6 to
> the pool.
> [] connectToEJB( Anonymous)
> [] Connected, now trying to create the local copy
> [UserData] Authentication exception, principal=null
> [] java.rmi.RemoteException: checkSecurityAssociation; nested exception
> is: 
> java.lang.SecurityException: Authentication exception
> 
> As you can see, I am getting auhtenticated, however shortly after I'm
> losing the principal.... what's annoying is that this is happening
> within 10 lines of code inside the bean I'm using... first it
> authenticates then it tries to access the EJB bean... and that's when I
> get the principal = null bit.  
> I'm attaching my code, and ejb-jar.xml files.  Most of this is straight
> out of the documentation too!!!!
> In the User.java file.. you'll notice that the principal is being lost
> within several lines of code, and so this can't be a thread issue, or a
> loss of cookie issue or anything else.  I get authenticated, then lose
> the principal.
> I'm pretty sure I'm doing something stupid.. but I'll be hanged if I
> can figure out what.. 
> Thanks for any help in advance!
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to