geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Platonov" <real...@gmail.com>
Subject Re: TomcatJAASRealm instead of TomcatGeronimoRealm
Date Sat, 25 Mar 2006 03:47:27 GMT
I spent a lot of time myself trying to change Realm, but didn't succeed.

On 3/24/06, Yeray Cabrera <yeray.cabrera@integraas.com> wrote:
>
> 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!
>

Mime
View raw message