> From: shahab [mailto:[EMAIL PROTECTED] 
> Subject: how to set role for JAASRealm
> 
> I have also made entries in server.xml as follows (i set 
> debug to 0 hoping for more debug info,

The value "0" provides minimal diagnostic information; "99" is what you
really want.  Check all the logs to make sure there's not a problem
initializing the Realm and your LoginModule.

> <Realm className="org.apache.catalina.realm.JAASRealm"        
>     appName="TMSLogin"       
>     userClassNames="tms.core.authentication.TMSPrincipal" 
>     roleClassNames="tms.core.authentication.TMSRoles" 
>     debug="0"/> 

In what element of server.xml did you put this?  It normally goes inside
the <Engine> area.

> However, I am still getting HTTP 403. 

One thing I had to do for our environment was implement an equals()
method for the PrincipalRole class:

    public boolean equals(Object o) {
        if (o == null) return false;
        if (this == o) return true;
        if (!(o instanceof OurPrincipalRole)) return false;
        OurPrincipalRole that = (OurPrincipalRole) o;
        return this.getName().equals(that.getName());
    }

Not sure if it's required, but it's part of the Principal interface.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to