tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Return from getRemoteUser and isUserInRole Inconsistent
Date Mon, 25 Jan 2010 20:46:22 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Doug,

On 1/25/2010 3:35 PM, Fulford, William wrote:
> I'm using Tomcat 6.0 with Firefox 3.0.12 and JNDIRealm for
> authentication.  When I call HttpServletRequest.getRemoteUser() and
> HttpServletRequest.isUserInRole(), I get inconsistent results.
> Sometimes I get null for user and other times I get the user name.
> Sometimes I get false for isUserInRole() and other times I get true.
> More often than not I get null and false, but there is no discernable
> pattern.  I always check after the user has been authenticated.  Any
> ideas?

What form of credential gathering are you using? FORM? BASIC? CLIENT-CERT?

Can you post the <security-constraint> sections of your web.xml file?

Can you post some specific examples? The return value for
HttpServletRequest.isUserInRole depends highly on the parameter passed
to it and the roles held by the currently-logged-in user.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkteAx4ACgkQ9CaO5/Lv0PBZRACeJWpje2H/EkTF2Vv4LWKAt7xQ
qPgAoL0DaUgH/PIXqc53WioMACs9X7TQ
=2HZp
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message