Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

another problem with JAAS

Beloglazov Maksim

2004-04-22

Replies:

Hello,

I've written a JAAS LoginModule and my web application successfully
authorizes with it. But! While the authorization is successful, Tomcat
does not recognize user Principals and roles which I assign in login
module and returns that I have logged as a *null* user with no roles
assigned to it.

server.xml:
....
 <Realm className="org.apache.catalina.realm.JAASRealm"
      appName="merx"
      userClassNames="ru.mb.security.jaas.RdbmsPrincipal"
      roleClassNames="ru.mb.security.jaas.RdbmsRole"
      debug="99"/>
....

ru.mb.security.jaas.RdbmsPrincipal and ru.mb.security.jaas.RdbmsRole are
implementations of java.security.Principal interface. How can I force
Tomcat recognize these Principals in a proper way? Can be the problem
with moving javax.security.Principal of earlier JDKs to
java.security.Principal in modern ones?

Any help is greatly appreciated.

Beloglazov Maksim.
©2008 junlu.com - Jax Systems, LLC, U.S.A.