tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shashank Rachamalla <>
Subject Re: Authentication without Authorization ( JNDI Realm )
Date Fri, 04 Dec 2009 10:34:07 GMT

The following is the Realm configuration being used:

<Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"

The following is the security constraint specified in web.xml




The following is an entry added to LDAP for testing:

dn: uid=ccpadmin, dc=wipro,dc=com
uid: ccpadmin
userPassword:: YWRtaW4xMjM=
objectClass: inetOrgPerson
givenName: Cloud
sn: Administrator
cid: cloud
cn: Cloud Administrator

I am able to authenticate but authorization seems to fail ( error 403
forbidden )


On Wed, 2009-12-02 at 19:16 -0800, Robert Koberg wrote:
> On Dec 2, 2009, at 6:01 PM, Christopher Schultz wrote:
> > Hash: SHA1
> > 
> > Chuck,
> > 
> > On 12/2/2009 5:15 PM, Caldarale, Charles R wrote:
> >>> From: Christopher Schultz []
> >>> Subject: Re: Authentication without Authorization ( JNDI Realm )
> >>> 
> >>> Technically speaking, this will require authentication but then let
> >>> anyone holding any role defined in web.xml to access any page on your
> >>> site.
> >> 
> >> But the valid roles still have to be listed in web.xml to be compliant with
the spec.
> > 
> > Yes. That's why I said "technically" and "practically".
> > 
> >>> Practically speaking, you don't even need to define the roles in
> >>> web.xml because (last time I checked), Tomcat treats '*' as
> >>> "authenticated, regardless of roles".
> >> 
> >> That was a bug, now fixed:
> >>
> > 
> > I'll have to look elsewhere in the code, then. What I saw in
> > GenericPrincipal clearly takes, ahem, liberties with the spec.
> (don't know if this has been mentioned)
> There is the @PermitAll (and @DenyAll, @RolesAllowed) annotations. It requires a servlet
3.0 container or some framework that allows it (I like Jersey).
> best,
> -Rob
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are
intended for the exclusive use of the addressee(s) and may contain proprietary, confidential
or privileged information. If you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and destroy all copies
of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email
and any attachments for the presence of viruses. The company accepts no liability for any
damage caused by any virus transmitted by this email.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message