tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Eric Miller" <>
Subject Bug in basic HTTP authentication/resource protection in Tomcat 3.1?
Date Wed, 19 Jul 2000 20:03:53 GMT
It may just be the case that I don't know what I'm doing, but, I noticed
something that I think may be a bug with regard to protecting resources in

I was playing around witht he web.xml file used for the ROOT Web application
trying to see if I could make it so that users would have to authenticate
via basic HTTP authentication in order to access the SnoopServlet. The
web.xml file that I'm using is listed below.

It seems to work fine (i.e. it prompts me for a password) if I access it
using the following URL.


However, I noticed that if I append a slash after it (entered it on
accident), I'm able to access the servlet without having to authenticate.


Also, I noticed that it works correctly for URLs like the following.



P.S. I'm not actually subscribed to this list, so, please CC with any responses. Thanks.

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"

         <web-resource-name>Protected Area</web-resource-name>
  <!-- Define the context-relative URL(s) to be protected -->
  <!-- If you list http methods, only those methods are protected -->
         <!-- Anyone with one of the listed roles may access this area -->

    <!-- Default login configuration uses BASIC authentication -->
      <realm-name>Example Basic Authentication Area</realm-name>

View raw message