You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Han Hong Fang (JIRA)" <ji...@apache.org> on 2010/09/07 19:11:34 UTC

[jira] Created: (GERONIMO-5578) incorrect behaviour of security-constraint configuration in web.xml

incorrect behaviour of security-constraint configuration in web.xml 
--------------------------------------------------------------------

                 Key: GERONIMO-5578
                 URL: https://issues.apache.org/jira/browse/GERONIMO-5578
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: Tomcat
    Affects Versions: 3.0
            Reporter: Han Hong Fang
            Assignee: Han Hong Fang


When have following configuration in web.xml, GET and POST can be accessed by both "RoleA" and "RoleB".

<security-constraint>
        <web-resource-collection>
            <web-resource-name>resource2</web-resource-name>
            <url-pattern>/SampleServlet2</url-pattern>
            <http-method>GET</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>RoleA</role-name>
        </auth-constraint>
    </security-constraint>
    
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>resource3</web-resource-name>
            <url-pattern>/SampleServlet2</url-pattern>
            <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>RoleB</role-name>
        </auth-constraint>
    </security-constraint>



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (GERONIMO-5578) incorrect behaviour of security-constraint configuration in web.xml

Posted by "Ivan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan reassigned GERONIMO-5578:
------------------------------

    Assignee: Ivan  (was: Han Hong Fang)

> incorrect behaviour of security-constraint configuration in web.xml 
> --------------------------------------------------------------------
>
>                 Key: GERONIMO-5578
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5578
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Tomcat
>    Affects Versions: 3.0
>            Reporter: Han Hong Fang
>            Assignee: Ivan
>         Attachments: GERONIMO-5578.patch, web7.xml
>
>
> When have following configuration in web.xml, GET and POST can be accessed by both "RoleA" and "RoleB".
> <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource2</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>GET</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleA</role-name>
>         </auth-constraint>
>     </security-constraint>
>     
>     <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource3</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>POST</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleB</role-name>
>         </auth-constraint>
>     </security-constraint>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-5578) incorrect behaviour of security-constraint configuration in web.xml

Posted by "Han Hong Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Han Hong Fang updated GERONIMO-5578:
------------------------------------

    Attachment: GERONIMO-5578.patch

A WebResourcePermission must be added to the corresponding role for each distinct combination in the cross-product of url-pattern and role-name occurring in the security-constraint elements that contain an auth-constraint naming roles.  (ref to chapter 3.1.3.2 of JACC v1.4 spec). 

The problem existed becaused all role-name shared a WebResourcePermission for each url-pattern.

The patch is provided together with junit test case.

Please help to review. Thanks!

> incorrect behaviour of security-constraint configuration in web.xml 
> --------------------------------------------------------------------
>
>                 Key: GERONIMO-5578
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5578
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Tomcat
>    Affects Versions: 3.0
>            Reporter: Han Hong Fang
>            Assignee: Han Hong Fang
>         Attachments: GERONIMO-5578.patch
>
>
> When have following configuration in web.xml, GET and POST can be accessed by both "RoleA" and "RoleB".
> <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource2</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>GET</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleA</role-name>
>         </auth-constraint>
>     </security-constraint>
>     
>     <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource3</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>POST</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleB</role-name>
>         </auth-constraint>
>     </security-constraint>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-5578) incorrect behaviour of security-constraint configuration in web.xml

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915102#action_12915102 ] 

Ivan commented on GERONIMO-5578:
--------------------------------

Commit the patch to trunk At revision: 1001578.

> incorrect behaviour of security-constraint configuration in web.xml 
> --------------------------------------------------------------------
>
>                 Key: GERONIMO-5578
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5578
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Tomcat
>    Affects Versions: 3.0
>            Reporter: Han Hong Fang
>            Assignee: Ivan
>         Attachments: GERONIMO-5578.patch, web7.xml
>
>
> When have following configuration in web.xml, GET and POST can be accessed by both "RoleA" and "RoleB".
> <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource2</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>GET</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleA</role-name>
>         </auth-constraint>
>     </security-constraint>
>     
>     <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource3</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>POST</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleB</role-name>
>         </auth-constraint>
>     </security-constraint>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GERONIMO-5578) incorrect behaviour of security-constraint configuration in web.xml

Posted by "Ivan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan resolved GERONIMO-5578.
----------------------------

    Fix Version/s: 2.1.7
                   2.2.1
                   3.0
       Resolution: Fixed

Commit the patch to 2.2.1-SNAPSHOT at rev.1001592, 2.1.7-SNAPSHOT at rev.1001597.

> incorrect behaviour of security-constraint configuration in web.xml 
> --------------------------------------------------------------------
>
>                 Key: GERONIMO-5578
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5578
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Tomcat
>    Affects Versions: 3.0
>            Reporter: Han Hong Fang
>            Assignee: Ivan
>             Fix For: 2.1.7, 2.2.1, 3.0
>
>         Attachments: GERONIMO-5578.patch, web7.xml
>
>
> When have following configuration in web.xml, GET and POST can be accessed by both "RoleA" and "RoleB".
> <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource2</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>GET</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleA</role-name>
>         </auth-constraint>
>     </security-constraint>
>     
>     <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource3</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>POST</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleB</role-name>
>         </auth-constraint>
>     </security-constraint>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-5578) incorrect behaviour of security-constraint configuration in web.xml

Posted by "Han Hong Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Han Hong Fang updated GERONIMO-5578:
------------------------------------

    Attachment: web7.xml

Forgot to provide the web7.xml used in test case.

> incorrect behaviour of security-constraint configuration in web.xml 
> --------------------------------------------------------------------
>
>                 Key: GERONIMO-5578
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5578
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Tomcat
>    Affects Versions: 3.0
>            Reporter: Han Hong Fang
>            Assignee: Han Hong Fang
>         Attachments: GERONIMO-5578.patch, web7.xml
>
>
> When have following configuration in web.xml, GET and POST can be accessed by both "RoleA" and "RoleB".
> <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource2</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>GET</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleA</role-name>
>         </auth-constraint>
>     </security-constraint>
>     
>     <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource3</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>POST</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleB</role-name>
>         </auth-constraint>
>     </security-constraint>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (GERONIMO-5578) incorrect behaviour of security-constraint configuration in web.xml

Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rex Wang closed GERONIMO-5578.
------------------------------


closing it

> incorrect behaviour of security-constraint configuration in web.xml 
> --------------------------------------------------------------------
>
>                 Key: GERONIMO-5578
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5578
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Tomcat
>    Affects Versions: 3.0
>            Reporter: Han Hong Fang
>            Assignee: Ivan
>             Fix For: 2.1.7, 2.2.1, 3.0
>
>         Attachments: GERONIMO-5578.patch, web7.xml
>
>
> When have following configuration in web.xml, GET and POST can be accessed by both "RoleA" and "RoleB".
> <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource2</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>GET</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleA</role-name>
>         </auth-constraint>
>     </security-constraint>
>     
>     <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>resource3</web-resource-name>
>             <url-pattern>/SampleServlet2</url-pattern>
>             <http-method>POST</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>RoleB</role-name>
>         </auth-constraint>
>     </security-constraint>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.