multiple_aci_tests.xml revision d58daae6dafda525a320cd0e65807004a54f36af
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<stax>
<defaultcall function="multiple_aci_tests"/>
<function name="multiple_aci_tests">
<sequence>
<block name="'multiple-aci-tests'">
<sequence>
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group']='aci'
CurrentTestPath['suite']=STAXCurrentBlock
</script>
<call function="'testSuite_Preamble'"/>
<!---
Place suite-specific test information here.
#@TestSuiteName Multiple ACI Tests
#@TestSuitePurpose Test the Support for multiple ACIs
#@TestSuiteGroup Multiple ACi Tests
#@TestScript multiple_aci_tests.xml
-->
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/aci/aci_setup.xml' % (TESTS_DIR)"/>
<call function="'aci_setup'" />
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Preamble
#@TestIssue 446
#@TestPurpose Prepare for multiple ACI test cases
#@TestPreamble none
#@TestStep Directory Manager adds extra entries
#@TestStep Directory Manager removes global ACI allowing searches
#@TestStep Client searches entry in one branch.
#@TestStep Client searches entry in another branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Preamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ACI: Multiple ACIs: Preamble - Adding Branches For Multiple ACI Tests'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Preamble - Removing Search Global ACI'
</message>
<call function="'modifyGlobalAci'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'aciValue' : GLOBAL_ACI_SEARCH ,
'opType' : 'remove' }
</call>
<message>
'ACI: Multiple ACIs: Preamble - user searching entry that will be targeted in future tests'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber telephonenumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Preamble - user searching entry that will be non-targeted in future tests'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber telephonenumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters, one aci-one entry
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters, one aci-one entry
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should be allowed in targeted branch.
#@TestStep Client searches second entry which should not be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned only for step 1
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters, one aci-one entry')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci1.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, one true, user searching non-targeted entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, one true, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters, one aci-two entries 1
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters, one aci-two entries, same attribute
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should be allowed in targeted branch.
#@TestStep Client searches second entry which should also be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned only for steps 1 and 2
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters, one aci-two entries 1')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci2.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, one true, user searching non-targeted entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, one true, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters, one aci-two entries 2
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters, one aci-two entries, two attributes with not equal
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should be allowed in targeted branch.
#@TestStep Client searches second entry which should also be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned only for steps 1 and 2
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters, one aci-two entries 2')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci3.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, one true, user searching non-targeted entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, one true, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters, one aci-two entries 3
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters, one aci-two entries, with two attributes with equal
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should be allowed in targeted branch.
#@TestStep Client searches second entry which should also be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned only for steps 1 and 2
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters, one aci-two entries 3')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci4.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid telephonenumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, one true, user searching second entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, one true, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters, one aci-one entry, deny
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters, one aci-one entry, deny
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should not be allowed in targeted branch.
#@TestStep Client searches second entry which should not be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches previous entry.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned for no steps.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters, one aci-one entry, deny')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci5.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, deny, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, deny, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, deny, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, deny, user searching non-targeted entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, deny, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-one entry, deny, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters, one aci-two entries 1, deny
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters, one aci-two entries, same attribute, deny
#@TestPreamble Admin adds three ACIs, different targetfilters, two statements true with same attrs.
#@TestStep Client searches entry which should not be allowed in targeted branch.
#@TestStep Client searches second entry which should not be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches previous entry.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned for no steps.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters, one aci-two entries 1, deny')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci6.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, deny, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, deny, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, deny, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, deny, one true, user searching non-targeted entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, deny, one true, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, deny, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters, one aci-two entries 2, deny
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters, one aci-two entries, two attributes with not equal, deny
#@TestPreamble Admin adds three ACIs, different targetfilters, two statements true with, two attributes with not equal, deny
#@TestStep Client searches entry which should not be allowed in targeted branch.
#@TestStep Client searches second entry which should not be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches previous entry.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned for no steps.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters, one aci-two entries 2, deny')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci7.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, deny, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, deny, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, deny, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, deny, one true, user searching non-targeted entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, deny, one true, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 2, deny, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters, one aci-two entries 3, deny
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters, one aci-two entries, with two attributes with equal, deny
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should be allowed in targeted branch.
#@TestStep Client searches second entry which should not be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned only for step 1
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters, one aci-two entries 3, deny')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci8.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, deny, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, deny, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, deny, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid telephonenumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, deny, user searching second entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, deny, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 3, deny, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters and targetattr
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters, one aci-two entries, same attribute
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should be allowed in targeted branch.
#@TestStep Client searches second entry which should also be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned only for steps 1 and 2
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters and targetattr')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci9.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, one true, user searching non-targeted entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, one true, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters, one aci-two entries 1, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters and targeattr, deny one attr
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters, one aci-two entries, two attributes with not equal
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should be allowed in targeted branch.
#@TestStep Client searches second entry which should also be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned only for steps 1 and 2
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters and targeattr, deny one attr')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci10.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters and targeattr, deny one attr, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targeattr, deny one attr, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '0' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targeattr, deny one attr, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '0' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targeattr, deny one attr, one true, user searching non-targeted entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targeattr, deny one attr, one true, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targeattr, deny one attr, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters and targetattr with not equals
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters and targetattr with not equals
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should be allowed in targeted branch.
#@TestStep Client searches second entry which should also be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned only for steps 1 and 2
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters and targetattr with not equals')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci11.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr with not equals, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr with not equals, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr with not equals, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid telephonenumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '0' }
</call>
<if expr="returnCode != '0'">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr with not equals, one true, user searching second entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr with not equals, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr with not equals, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters and targetattr, separate search-read with missing read
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters and targetattr, separate search-read with missing read
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should not be allowed in targeted branch.
#@TestStep Client searches second entry which should be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entries are returned only for steps 1 and 2
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters and targetattr, separate search-read with missing read')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci12.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read with missing read, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read with missing read, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read with missing read, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid telephonenumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read missing read, user searching second entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read missing read, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read missing read, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters and targetattr, separate search-read
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters and targetattr, separate search-read
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should be allowed in targeted branch.
#@TestStep Client searches second entry which should also be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned only for steps 1 and 2
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters and targetattr, separate search-read')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci13.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid telephonenumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomNumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read, user searching second entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Different targetfilters and targetattr, separate search-read with deny search
#@TestIssue 446
#@TestPurpose Test three ACIs, different targetfilters and targetattr, separate search-read with deny search
#@TestPreamble Admin adds three ACIs.
#@TestStep Client searches entry which should not be allowed in targeted branch.
#@TestStep Client searches second entry which should be allowed in targeted branch.
#@TestStep Client searches entry which is outside of the targeted branch.
#@TestStep Remove aci.
#@TestStep Client searches entry which was previously allowed.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Entry is returned only for step 2
and only with the appropriate attributes.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Different targetfilters and targetattr, separate search-read with deny search')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci14.ldif'
</script>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read with deny search, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read with deny search, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read with deny search, user searching second entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid telephonenumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'telephonenumber:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'roomnumber:' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read with deny search, user searching second entry outside of the scope of the aci'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read with deny search, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Different targetfilters and targetattr, separate search-read with deny search, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Separate targattrfilters with add:l and del:l
#@TestIssue 444
#@TestPurpose Test with separate targattrfilters
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
#@TestStep Client replaces l in an entry with the targeted branch dn.
#@TestStep Client replaces mail in an entry with the targeted branch dn.
#@TestStep Client replaces l in an entry that is not with the targeted branch dn.
#@TestStep Remove aci.
#@TestStep Client replaces l from an entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldapmodify operations,
0 for step 1, and
50 for all other steps.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Separate targattrfilters with add:l and del:l')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci31.ldif'
</script>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with add:l and del:l, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with add:l and del:l, user replacing l in targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with add:l and del:l, user replacing mail in targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with add:l and del:l, user replacing l in non-targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with add:l and del:l, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with add:l and del:l, user replacing l in previously targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Separate targattrfilters with deny add:l and allow del:l
#@TestIssue 444
#@TestPurpose Test with separate targattrfilters
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
#@TestStep Client replaces l in an entry with the targeted branch dn.
#@TestStep Client replaces mail in an entry with the targeted branch dn.
#@TestStep Client replaces l in an entry that is not with the targeted branch dn.
#@TestStep Remove aci.
#@TestStep Client replaces l from an entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldapmodify operations,
and 50 for all other steps.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Separate targattrfilters with deny add:l and allow del:l')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci32.ldif'
</script>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with deny add:l and allow del:l, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with deny add:l and allow del:l, user replacing l in targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with deny add:l and allow del:l, user replacing mail in targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with deny add:l and allow del:l, user replacing l in non-targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with deny add:l and allow del:l, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with deny add:l and allow del:l, user replacing l in previously targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Separate targattrfilters with allow add:l and deny del:l
#@TestIssue 444
#@TestPurpose Test with separate targattrfilters
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
#@TestStep Client replaces l in an entry with the targeted branch dn.
#@TestStep Client replaces mail in an entry with the targeted branch dn.
#@TestStep Client replaces l in an entry that is not with the targeted branch dn.
#@TestStep Remove aci.
#@TestStep Client replaces l from an entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldapmodify operations,
and 50 for all other steps.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Separate targattrfilters with allow add:l and deny del:l')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci33.ldif'
</script>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with allow add:l and deny del:l, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with allow add:l and deny del:l, user replacing l in targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with allow add:l and deny del:l, user replacing mail in targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with allow add:l and deny del:l, user replacing l in non-targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with allow add:l and deny del:l, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targattrfilters with allow add:l and deny del:l, user replacing l in previously targeted entry'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Separate targetattrs
#@TestIssue 444
#@TestPurpose Test with separate targetattrs
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
#@TestStep Client replaces l in an entry with the targeted branch dn.
#@TestStep Client replaces mail in an entry with the targeted branch dn.
#@TestStep Client replaces l in an entry that is not with the targeted branch dn.
#@TestStep Remove aci.
#@TestStep Client replaces l from an entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldapmodify operations,
and 50 for all other steps.
-->
<testcase name="getTestCaseName('Separate targetattrs')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci34.ldif'
</script>
<message>
'ACI: Multiple ACIs: Separate targetattrs, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs, user modifying prohibited attr in entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Separate targetattrs with not equals
#@TestIssue 444
#@TestPurpose Test with separate targetattrs
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
#@TestStep Client replaces l in an entry with the targeted branch dn.
#@TestStep Client replaces mail in an entry with the targeted branch dn.
#@TestStep Client replaces l in an entry that is not with the targeted branch dn.
#@TestStep Remove aci.
#@TestStep Client replaces l from an entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldapmodify operations,
0 for steps 1, 2 and 3, and
50 for all other steps.
-->
<testcase name="getTestCaseName('Separate targetattrs with not equals')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci35.ldif'
</script>
<message>
'ACI: Multiple ACIs: Separate targetattrs with not equals, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs with not equals, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs with not equals, user modifying prohibited attr in entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs with not equals, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs with not equals, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs with not equals, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Separate targetattrs and targattrfilters with equals and not equals
#@TestIssue 444
#@TestPurpose Test with separate targetattrs
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
#@TestStep Client replaces l in an entry with the targeted branch dn.
#@TestStep Client replaces title in an entry with the targeted branch dn.
#@TestStep Client replaces another title in an entry with the targeted branch dn.
#@TestStep Client replaces l in an entry that is not with the targeted branch dn.
#@TestStep Remove aci.
#@TestStep Client replaces l from an entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldapmodify operations,
0 for steps 1 and 2, and
50 for all other steps.
-->
<testcase name="getTestCaseName('Separate targetattrs and targattrfilters with equals and not equals')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci36.ldif'
</script>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with equals and not equals, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with equals and not equals, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with equals and not equals, user modifying prohibited attr in entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with equals and not equals, user modifying prohibited attr in entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with equals and not equals, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with equals and not equals, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with equals and not equals, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Separate targetattrs and targattrfilters with not equals
#@TestIssue 444
#@TestPurpose Test with separate targetattrs
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
#@TestStep Client replaces l in an entry with the targeted branch dn.
#@TestStep Client replaces title in an entry with the targeted branch dn.
#@TestStep Client replaces another title in an entry with the targeted branch dn.
#@TestStep Client replaces l in an entry that is not with the targeted branch dn.
#@TestStep Remove aci.
#@TestStep Client replaces l from an entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldapmodify operations,
0 for steps 1, 2,`and 3, and
50 for all other steps.
-->
<testcase name="getTestCaseName('Separate targetattrs and targattrfilters with not equals')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci37.ldif'
</script>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with not equals, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with not equals, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with not equals, user modifying prohibited attr in entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with not equals, user modifying prohibited attr in entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with not equals, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with not equals, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with not equals, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Separate targetattrs and targattrfilters with deny
#@TestIssue 444
#@TestPurpose Test with separate targetattrs
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
#@TestStep Client replaces l in an entry with the targeted branch dn.
#@TestStep Client replaces mail in an entry with the targeted branch dn.
#@TestStep Client replaces l in an entry that is not with the targeted branch dn.
#@TestStep Remove aci.
#@TestStep Client replaces l from an entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldapmodify operations,
0 for step 1, and
50 for all other steps.
-->
<testcase name="getTestCaseName('Separate targetattrs and targattrfilters with deny')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci38.ldif'
</script>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with deny, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with deny, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with deny, user modifying prohibited attr in entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with deny, user modifying prohibited attr in entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with deny, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with deny, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs and targattrfilters with deny, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Separate targetattrs with deny and targattrfilters
#@TestIssue 444
#@TestPurpose Test with separate targetattrs
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
#@TestStep Client replaces l in an entry with the targeted branch dn.
#@TestStep Client replaces mail in an entry with the targeted branch dn.
#@TestStep Client replaces l in an entry that is not with the targeted branch dn.
#@TestStep Remove aci.
#@TestStep Client replaces l from an entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldapmodify operations,
0 for steps 1, 2, and 3 and
50 for all other steps.
-->
<testcase name="getTestCaseName('Separate targetattrs with deny and targattrfilters')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci39.ldif'
</script>
<message>
'ACI: Multiple ACIs: Separate targetattrs with deny and targattrfilters , preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs with deny and targattrfilters , user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs with deny and targattrfilters , user modifying prohibited attr in entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs with deny and targattrfilters , user modifying prohibited attr in entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs with deny and targattrfilters , user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Multiple ACIs: Separate targetattrs with deny and targattrfilters , admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Separate targetattrs with deny and targattrfilters , user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'expectedRC' : 50
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker Multiple ACI Tests
#@TestName Postamble
#@TestIssue 446
#@TestPurpose Reset global ACI to default settings
#@TestPreamble none
#@TestStep Client searches entry in one branch.
#@TestStep Client searches entry in another branch.
#@TestStep Directory Manager replaces default global aci.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Postamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ACI: Multiple ACIs: Postamble - user searching entry that was targeted'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber telephonenumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Postamble - user searching entry that was non-targeted'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid roomnumber telephonenumber'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=Search Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Multiple ACIs: Postamble - delete branch, o=Search Tests'
</message>
<call function="'DeleteEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'o=Search Tests, o=ACI Tests,dc=example,dc=com' ,
'extraParams' : '-x'}
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Postamble - delete branch, o=Modify Tests'
</message>
<call function="'DeleteEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'o=Modify Tests, o=ACI Tests,dc=example,dc=com' ,
'extraParams' : '-x'}
</call>
<if expr="RC != 0">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Multiple ACIs: Postamble - Resetting Search Global ACI'
</message>
<call function="'modifyGlobalAci'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'aciValue' : GLOBAL_ACI_SEARCH ,
'opType' : 'add' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/aci/aci_cleanup.xml' % (TESTS_DIR)"/>
<call function="'aci_cleanup'" />
<call function="'testSuite_Postamble'"/>
</sequence>
</block>
</sequence>
</function>
</stax>