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.

Reply via email to