You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by LERBSCHER Jean-Pierre <je...@cofiroute.fr> on 2004/09/22 16:26:44 UTC

RE : too many JAAS...

Why do you have a ClassCastException exception ?
Could you give us more detail on your realm configuration ?
Do you configured a jass realm with custom userClassNames and roleClassNames
attributes ? or any thing else.

-----Message d'origine-----
De : Rene Paulokat [mailto:rene@so36.net] 
Envoyé : mercredi 22 septembre 2004 16:18
À : Tomcat Users List
Objet : Re: too many JAAS...

On Wed, Sep 22, 2004 at 03:47:08PM +0200, Michiel Toneman wrote:

> You can have a look at 
> http://www.kopz.org/public/documents/tomcat/jaasintomcat.html
> 
> It contains a "known-good" approach so it may be of some use to you.

hi michiel,
yes, i found that already, but i thought this is not *very* different
from my approach:

in this example 'SecurityFilter' does the same thing like my
Login-servlet:

creates new LoginContext - passes over the CallBackhandler - here
'HttpAuthCallBackhandler' and finally calls login-method of loginModule.

additionally it puts 'Subject' into user's Session, to be reused when
needed. fine thing.

i think i am missing some more basic thing - cause of my beloved
ClassCastException, when my loginModule starts to act...

or - is it the only way to accomplish the task with that kind of
'SecurityFilter' - which in the example acts upon every request?

thanks for your hint, i'am gonna implement it test-wise...

greetings
rene












-- 
gpg-key 8FC78254 http://www.so36.net/keys/rene.asc
fingerprint: E883 D359 3F56 51AF 0294  8BEB 16B3 15BD 8FC7 8254

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: RE : too many JAAS...

Posted by Rene Paulokat <re...@so36.net>.
On Wed, Sep 22, 2004 at 04:26:44PM +0200, LERBSCHER Jean-Pierre wrote:
> Why do you have a ClassCastException exception ?
> Could you give us more detail on your realm configuration ?
> Do you configured a jass realm with custom userClassNames and roleClassNames
> attributes ? or any thing else.


okay, my context configuration looks like:

<Realm className="org.apache.catalina.realm.JAASRealm"
        verbosity="99"
        appName="dabRealm"
        debug="99"
        useContextClassLoader="true"
        userClassNames="com.warenform.ima_frontend.auth.DabPrincipal"
        roleClassNames="com.warenform.ima_frontend.auth.DabRole"/>

my login.conf shows:

dabRealm {
      com.warenform.ima_frontend.interf.DabLoginModule  REQUIRED;
};

loginModule/Role/Principal-classes are visible to $CATALINA_HOME/common/lib

and the way i invoke the whole thing is via 

servlet which is called by url /login.do - 

creates my DabCallBackHandler ,
pushes this into new LoginContext
module gets invoked - and creates exception like described in the
thread-start.

hm - am i lost?

rene




-- 
gpg-key 8FC78254 http://www.so36.net/keys/rene.asc
fingerprint: E883 D359 3F56 51AF 0294  8BEB 16B3 15BD 8FC7 8254

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org