Hi all,

I have a problem with my custom security realm.

I get deploy my web-app with my custom security-realm (including dependencies, ...). It work fine, but when in my code I run HttpServletRequest.isUserInRole("role"), always return false.

I debugged my code ... userPrincipal had the correct name and subjects but roles is null (is a JAASTomcatPrincipal).

Then, I debugged with geronimo source and I saw that my web-app used the org.apache.geronimo.tomcat.realm.TomcatGeronimoRealm and should use org.apache.geronimo.tomcat.realm.TomcatJAASRealm to assign the roles to JAASTomcatPrincipal whit the subject, doesn't it?

Looking for wiki I saw http://wiki.apache.org/geronimo/Tomcat and I put this code in my geronimo-web.xml plan:

....
   <container-config container="Tomcat">
<config-param name="TomcatJAASRealm">TomcatJAASRealm</config-param> </container-config>
....
<gbean name="TomcatJAASRealm" class="org.apache.geronimo.tomcat.RealmGBean"> <attribute name="className">org.apache.geronimo.tomcat.realm.TomcatJAASRealm</attribute>
       <attribute name="initParams">
           userClassNames=com.ias.ibms.auth.IBMSUser
           roleClassNames=com.ias.ibms.auth.IBMSRole
       </attribute>
   </gbean>

But don't work :(

Somebody Know how I can assign to use TomcatJAASRealm instead of TomcatGeronimoRealm

   Thanks

   Yeray Cabrera!

Reply via email to