juergen     2002/06/24 04:23:19

  Added:       
testsuite/testsuite/junit/xmltestcases/ACL/functional/AccessControlProperties/ProtectedProperties
                        PropPatch-supported-privilege-set.xml
                        PropPatch-principal-collection-set.xml
                        PropPatch-Owner.xml
                        PropPatch-current-user-privilege-set.xml
                        PropPatch-ACL.xml PropPatch-ACL-Semantics.xml
  Log:
  New ACL test cases
  
  Revision  Changes    Path
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/AccessControlProperties/ProtectedProperties/PropPatch-supported-privilege-set.xml
  
  Index: PropPatch-supported-privilege-set.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
      
  <test>
  
        <specification>
                <abstract>Test to change supported-privilege-set property on a 
collection</abstract>
                
                <description>1) PropPatch on a collection to change the 
"supported-privilege-set" property.
                             2) Propfind on a collection to check 
"supported-privilege-set" property has been left unchanged.
                </description>
                <expectedResult>Proppatch should be Forbidden</expectedResult>
        </specification>
  
  
  
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPPATCH 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propertyupdate xmlns:D="DAV:">
        <D:set>
        <D:prop>
           <D:supported-privilege-set>/wrong value/</D:supported-privilege-set>
         </D:prop>
        </D:set>
      </D:propertyupdate>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:multistatus xmlns:D="DAV:">
    <D:response>
      <D:href>/%globalVariableServerName%/%globalVariableCollection%/</D:href>
      <D:propstat>
        <D:prop><D:supported-privilege-set/></D:prop>
        <D:status>HTTP/1.1 403 Forbidden</D:status>
        <D:responsedescription>Failure to set protected property 
(DAV:supported-privilege-set)</D:responsedescription>
      </D:propstat>
    </D:response>
    </D:multistatus>]]>
     </body>
    </response>
   </step>
   
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propfind xmlns:D="DAV:">
        <D:prop>
           <D:supported-privilege-set/>
        </D:prop>
     </D:propfind>]]>
     </body>
    </request>
    
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
  <multistatus xmlns="DAV:">
    <response>
      <href>/%globalVariableServerName%/%globalVariableCollection%</href>
      <propstat>
        <prop>
          <supported-privilege-set>
            <supported-privilege>
              <privilege>
                <all />
              </privilege>
              <description>Any operation</description>
              <privilege>
                <read />
              </privilege>
              <description>Read any object</description>
            </supported-privilege>
            <supported-privilege>
              <privilege>
                <write />
              </privilege>
              <description>Write any object</description>
              <privilege>
                <read-acl />
              </privilege>
              <description>Read the ACL</description>
            </supported-privilege>
            <supported-privilege>
              <privilege>
                <write-acl />
              </privilege>
              <description>Write the ACL</description>
            </supported-privilege>
          </supported-privilege-set>
        </prop>
        <status>HTTP/1.1 200 OK</status>
      </propstat>
    </response>
  </multistatus>]]>
  </body>
    </response>
   </step>
  
  </test>
  
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/AccessControlProperties/ProtectedProperties/PropPatch-principal-collection-set.xml
  
  Index: PropPatch-principal-collection-set.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
      
  <test>
  
        <specification>
                <abstract>Test to change Principal-collection-set property on a 
collection</abstract>
                
                <description>1) PropPatch on a collection to change the 
"Principal-collection-set" property.
                             2) Propfind on a collection to check 
"Principal-collection-set" property has been left unchanged.
                </description>
                <expectedResult>Proppatch should be Forbidden</expectedResult>
        </specification>
  
  
  
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPPATCH 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propertyupdate xmlns:D="DAV:">
        <D:set>
        <D:prop>
           
<D:principal-collection-set>/%globalVariableServerName%/administration/security/users/test</D:principal-collection-set>
         </D:prop>
        </D:set>
      </D:propertyupdate>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:multistatus xmlns:D="DAV:">
    <D:response>
      <D:href>/%globalVariableServerName%/%globalVariableCollection%/</D:href>
      <D:propstat>
        <D:prop><D:principal-collection-set/></D:prop>
        <D:status>HTTP/1.1 403 Forbidden</D:status>
        <D:responsedescription>Failure to set protected property 
(DAV:principal-collection-set)</D:responsedescription>
      </D:propstat>
    </D:response>
    </D:multistatus>]]>
     </body>
    </response>
   </step>
   
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propfind xmlns:D="DAV:">
        <D:prop>
           <D:principal-collection-set/>
         </D:prop>
      </D:propfind>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
  <D:multistatus xmlns:D="DAV:">
    <D:response>
      <D:href>/%globalVariableServerName%/%globalVariableCollection%</D:href>
      <D:propstat>
        <D:prop>
          <D:principal-collection-set>
            <D:href>/%globalVariableServerName%/administration/security/users</D:href>
          </D:principal-collection-set>
        </D:prop>
        <D:status>HTTP/1.1 200 OK</D:status>
      </D:propstat>
    </D:response>
  </D:multistatus>]]>
     </body>
    </response>
   </step>
  
  </test>
  
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/AccessControlProperties/ProtectedProperties/PropPatch-Owner.xml
  
  Index: PropPatch-Owner.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
      
  <test>
  
        <specification>
                <abstract>Test to change Owner property on a collection</abstract>
                
                <description>1) PropPatch on a collection to change the "Owner" 
property.
                             2) Propfind on a collection to check "Owner" property has 
been left unchanged.
                </description>
                <expectedResult>Proppatch should be Forbidden</expectedResult>
        </specification>
  
  
  
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPPATCH 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propertyupdate xmlns:D="DAV:">
        <D:set>
        <D:prop>
           <D:owner>administration/security/users/localhost/test</D:owner>
         </D:prop>
        </D:set>
      </D:propertyupdate>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:multistatus xmlns:D="DAV:">
    <D:response>
      <D:href>/%globalVariableServerName%/%globalVariableCollection%/</D:href>
      <D:propstat>
        <D:prop><D:owner/></D:prop>
        <D:status>HTTP/1.1 403 Forbidden</D:status>
        <D:responsedescription>Failure to set protected property 
(DAV:owner)</D:responsedescription>
      </D:propstat>
    </D:response>
    </D:multistatus>]]>
     </body>
    </response>
   </step>
   
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propfind xmlns:D="DAV:">
        <D:prop>
           <D:owner/>
         </D:prop>
      </D:propfind>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:multistatus xmlns:D="DAV:">
    <D:response>
      <D:href>/%globalVariableServerName%/%globalVariableCollection%</D:href>
      <D:propstat>
        <D:prop>
          <D:owner>
            <D:href>/administration/security/users/</D:href>
          </D:owner>
        </D:prop>
        <D:status>HTTP/1.1 200 OK</D:status>
      </D:propstat>
    </D:response>
    </D:multistatus>]]>
     </body>
    </response>
   </step>
  
  </test>
  
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/AccessControlProperties/ProtectedProperties/PropPatch-current-user-privilege-set.xml
  
  Index: PropPatch-current-user-privilege-set.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
      
  <test>
  
        <specification>
                <abstract>Test to change current-user-privilege-set property on a 
collection</abstract>
                
                <description>1) PropPatch on a collection to change the 
"current-user-privilege-set" property.
                             2) Propfind on a collection to check 
"current-user-privilege-set" property has been left unchanged.
                </description>
                <expectedResult>Proppatch should be Forbidden</expectedResult>
        </specification>
  
  
  
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPPATCH 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propertyupdate xmlns:D="DAV:">
        <D:set>
        <D:prop>
           <D:current-user-privilege-set>/wrong value/</D:current-user-privilege-set>
         </D:prop>
        </D:set>
      </D:propertyupdate>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:multistatus xmlns:D="DAV:">
    <D:response>
      <D:href>/%globalVariableServerName%/%globalVariableCollection%/</D:href>
      <D:propstat>
        <D:prop><D:current-user-privilege-set/></D:prop>
        <D:status>HTTP/1.1 403 Forbidden</D:status>
        <D:responsedescription>Failure to set protected property 
(DAV:current-user-privilege-set)</D:responsedescription>
      </D:propstat>
    </D:response>
    </D:multistatus>]]>
     </body>
    </response>
   </step>
   
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propfind xmlns:D="DAV:">
        <D:prop>
           <D:current-user-privilege-set/>
        </D:prop>
     </D:propfind>]]>
     </body>
    </request>
    
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
  <D:multistatus xmlns:D="DAV:">
    <D:response>
      <D:href>/%globalVariableServerName%/%globalVariableCollection%</D:href>
      <D:propstat>
        <D:prop>
          <D:current-user-privilege-set>
            <D:privilege>
              <D:read />
            </D:privilege>
            <D:privilege>
              <D:write />
            </D:privilege>
            <D:privilege>
              <D:read-acl />
            </D:privilege>
            <D:privilege>
              <D:write-acl />
            </D:privilege>
            <D:privilege>
              <D:all />
            </D:privilege>
          </D:current-user-privilege-set>
        </D:prop>
        <D:status>HTTP/1.1 200 OK</D:status>
      </D:propstat>
    </D:response>
  </D:multistatus>]]>
     </body>
    </response>
   </step>
  
  </test>
  
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/AccessControlProperties/ProtectedProperties/PropPatch-ACL.xml
  
  Index: PropPatch-ACL.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
      
  <test>
  
        <specification>
                <abstract>Test to change acl property on a collection</abstract>
                
                <description>1) PropPatch on a collection to change the "acl" property.
                             2) Propfind on a collection to check "acl" property has 
been left unchanged.
                </description>
                <expectedResult>Proppatch should be Forbidden</expectedResult>
        </specification>
  
  
  
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPPATCH 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propertyupdate xmlns:D="DAV:">
        <D:set>
        <D:prop>
           <D:acl>/wrong value/</D:acl>
         </D:prop>
        </D:set>
      </D:propertyupdate>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:multistatus xmlns:D="DAV:">
    <D:response>
      <D:href>/%globalVariableServerName%/%globalVariableCollection%/</D:href>
      <D:propstat>
        <D:prop><D:acl/></D:prop>
        <D:status>HTTP/1.1 403 Forbidden</D:status>
        <D:responsedescription>Failure to set protected property 
(DAV:acl)</D:responsedescription>
      </D:propstat>
    </D:response>
    </D:multistatus>]]>
     </body>
    </response>
   </step>
   
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propfind xmlns:D="DAV:">
        <D:prop>
           <D:acl />
         </D:prop>
      </D:propfind>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
  <multistatus xmlns="DAV:">
    <response>
      <href>/%globalVariableServerName%/%globalVariableCollection%</href>
      <propstat>
        <prop>
          <acl>
            <ace>
              <principal>
                <all />
              </principal>
              <grant>
                <privilege>
                  <all />
                </privilege>
              </grant>
            </ace>
            <ace>
              <principal>
                <href>/%globalVariableServerName%/administration/security/users</href>
              </principal>
              <grant>
                <privilege>
                  <all />
                </privilege>
              </grant>
              <protected />
              <inherited>
                <href>/%globalVariableServerName%/</href>
              </inherited>
            </ace>
          </acl>
        </prop>
        <status>HTTP/1.1 200 OK</status>
      </propstat>
    </response>
  </multistatus>]]>
     </body>
    </response>
   </step>
  
  </test>
  
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/AccessControlProperties/ProtectedProperties/PropPatch-ACL-Semantics.xml
  
  Index: PropPatch-ACL-Semantics.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
      
  <test>
  
        <specification>
                <abstract>Test to change acl-Semantics property on a 
collection</abstract>
                
                <description>1) PropPatch on a collection to change the 
"acl-Semantics" property.
                             2) Propfind on a collection to check "acl-Semantics" 
property has been left unchanged.
                </description>
                <expectedResult>Proppatch should be Forbidden</expectedResult>
        </specification>
  
  
  
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPPATCH 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propertyupdate xmlns:D="DAV:">
        <D:set>
        <D:prop>
           <D:acl-semantics>/wrong value/</D:acl-semantics>
         </D:prop>
        </D:set>
      </D:propertyupdate>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:multistatus xmlns:D="DAV:">
    <D:response>
      <D:href>/%globalVariableServerName%/%globalVariableCollection%/</D:href>
      <D:propstat>
        <D:prop><D:acl-semantics/></D:prop>
        <D:status>HTTP/1.1 403 Forbidden</D:status>
        <D:responsedescription>Failure to set protected property 
(DAV:acl-semantics)</D:responsedescription>
      </D:propstat>
    </D:response>
    </D:multistatus>]]>
     </body>
    </response>
   </step>
   
  <step>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PROPFIND 
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
     <header>Content-Type: text/xml; charset=utf-8</header>  
     <header>User-Agent: Jakarta HTTP Client/1.0</header>
     <body varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
     <D:propfind xmlns:D="DAV:">
        <D:prop>
           <D:acl-semantics/>
         </D:prop>
      </D:propfind>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 207 Multi Status</command>
     <header>Content-Type: text/xml; charset=utf-8</header>
     <body 
varUsage="globalVariableCollection,userNumber,globalVariableServerName"><![CDATA[<?xml 
version="1.0" encoding="utf-8" ?>
  <multistatus xmlns="DAV:">
    <response>
      <href>/%globalVariableServerName%/%globalVariableCollection%</href>
      <propstat>
        <prop>
          <acl-semantics>
            <ace-combination>
              <all-grant-before-any-deny />
            </ace-combination>
            <required-principal>
              <all />
            </required-principal>
          </acl-semantics>
        </prop>
        <status>HTTP/1.1 200 OK</status>
      </propstat>
    </response>
  </multistatus>]]>
     </body>
    </response>
   </step>
  
  </test>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to