Menu

How to exclude single files from protection?

Help
2005-09-14
2013-04-15
  • Marcus Franke

    Marcus Franke - 2005-09-14

    Hello,

    in my security-constraint I have the following definition:

          <web-resource-collection>
             <web-resource-name>SecJSP</web-resource-name>
             <url-pattern>/jsp/*.jsp</url-pattern>
          </web-resource-collection>

    Now I have the problem, that I need one file below the
    /jsp/ path, that should not be protected by the filter, as
    this file will be accessed by an automated process.

    So, can I exclude a single file from the protection without
    moving the file to another location?

     
    • powyr

      powyr - 2005-11-18

      Hi, did you manage to sort this out, as i have a similar problem.

      iam using constraint below
      \ \&lt;?xml version="1.0" encoding="ISO-8859-1"?>

      <!DOCTYPE securityfilter-config PUBLIC
          "-//SecurityFilter.org//DTD Security Filter Configuration 1.1//EN"
          "http://www.securityfilter.org/dtd/securityfilter-config_1_1.dtd">

      <securityfilter-config>

         <security-constraint>
            <web-resource-collection>
               <web-resource-name>Artemis Application</web-resource-name>
               <url-pattern>/*</url-pattern>
            </web-resource-collection>
            <auth-constraint>
               <role-name>AllAuthenticatedUsersAllowed</role-name>
            </auth-constraint>
         </security-constraint>

         <login-config>
            <auth-method>FORM</auth-method>
            <form-login-config>
               <form-login-page>/login.jsp</form-login-page>
               <form-error-page>/loginerror.jsp</form-error-page>
               <form-default-page>servlet/artemispm.triton.PageRender?page=admin</form-default-page>
            </form-login-config>
         </login-config>

         <realm className="ArtRealm">
         </realm>

      </securityfilter-config>

      --------------------------------

      however i would like to add an exceprion to this. i.e an exception to a paticular servlet call.

      any suggestion or help would be welcone

       
      • jguru99

        jguru99 - 2005-11-21

        You would add the following after your security-constraint tag.

        <security-constraint>
             <web-resource-collection>
               <web-resource-name>Test</web-resource-name>
                <url-pattern>/jsp/Test.jsp</url-pattern>
             </web-resource-collection>
        </security-constraint>

        For every file that you want to exclude, you would add a security-constraint tag as above.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.