tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject authenticated but not authorized -- blank page
Date Fri, 02 May 2008 15:55:32 GMT
I have a webapp 'guest', with two subfolders 'guest1' and 'guest2'.    
These are protected by security constraints.

/guest/guest1 has a security constraint requiring role 'guest1'
/guest/guest2 has a security constraint requiring role 'guest2'

Users 'guest1' and 'guest2' map to roles of the same names, and each  
user has its own distinct password.

1.  User 'guest1' logs in successfully and is able to view /guest/ 

2.  Now user guest1 tries to access /guest/guest2.  Since s/he is not  
authorized to access this area, one can expect a failure.

PROBLEM:  the server returns a 404 error when 'guest1' accesses a non- 
authorized area (/guest/guest2).  This results in a blank page in the  
browser-very confusing.  In this case I don't really care, but I have  
other more important situations coming.

QUESTION: shouldn't some kind of "not authorized" error be returned by  
Tomcat?  A 404 error is very confusing for the user.

The web.xml configuration is shown below.


<!-- Define reference to the user database for looking up roles -->
     <description>blah blah blah</description>

   <!-- Define a Security Constraint on this Application -->
       <web-resource-name>Guest 1 access</web-resource-name>

       <web-resource-name>Guest 2 access</web-resource-name>

   <!-- Define the Login Configuration for this Application -->
     <realm-name>Guest Realm</realm-name>

   <!-- Security roles referenced by this web application -->

Lloyd Chambers

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message