<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<!DOCTYPE stax SYSTEM "stax.dtd">
|
<!--
|
! 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
|
! trunk/opends/resource/legal-notices/OpenDS.LICENSE
|
! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
|
! 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
|
!
|
! Portions Copyright 2007 Sun Microsystems, Inc.
|
! -->
|
<stax>
|
|
<defaultcall function="aci_target"/>
|
|
<function name="aci_target">
|
|
<sequence>
|
|
<block name="'aci-target'">
|
|
<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 ACI Target Tests
|
#@TestSuitePurpose Test the basic ACI Target Support. (targetattr="*" and allow(read))
|
#@TestSuiteGroup Basic ACI Target Tests
|
#@TestScript aci_target.xml
|
-->
|
|
|
<import machine="'%s' % (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 ACI Target Tests
|
#@TestName Preamble
|
#@TestIssue 434
|
#@TestPurpose Test default aci settings
|
#@TestPreamble none
|
#@TestStep Client searches entry with a branch dn.
|
#@TestStep Client searches entry with another branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
and no entries are returned
|
for all operations.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Preamble'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
<message>
|
'ACI: Target: Preamble - Removing Search Global ACI'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_rm_global_search.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Preamble - existing branch, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Preamble - existing branch, 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=scarter,ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=non-aci branch,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 ACI Target Tests
|
#@TestName Target equals dn
|
#@TestIssue 434
|
#@TestPurpose Test with the target set equal to a dn
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn.
|
#@TestStep Client searches entry that is not with the targeted branch dn.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 1.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci1.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN, user searching non-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=scarter,ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn - new branch
|
#@TestIssue 434
|
#@TestPurpose Test with the target set equal to a dn - new branch
|
#@TestPreamble Admin adds entries under two branches, one with an aci with the target equal to the dn of one branch.
|
#@TestStep Client searches entry with the targeted branch dn.
|
#@TestStep Client searches entry that is not with the targeted branch dn.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble Admin removes branches.
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 1.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
|
<testcase name="'ACI: Target: Target Equals DN - new branch'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_entries1.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN - new branch, preamble adding entries,\n %s' % curr_aci
|
</message>
|
|
<call function="'addEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeAdded' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN - new branch, 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=scarter,ou=People,ou=new aci branch,o=More Branches,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=new aci branch,o=More Branches,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN - new branch, user searching non-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=scarter,ou=People,ou=new non-aci branch,o=More Branches,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=new non-aci branch,o=More Branches,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN - new branch, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci_from_entries.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN - new branch, 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=scarter,ou=People,ou=new aci branch,o=More Branches,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=new aci branch,o=More Branches,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN - new branch, postamble admin deleting new entries'
|
</message>
|
|
<call function="'DeleteEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'dsBaseDN' : 'o=More Branches,o=ACI Tests,dc=example,dc=com' ,
|
'extraParams' : '-x'}
|
</call>
|
|
<call function="'checktestRC'">
|
{ 'returncode' : RC ,
|
'result' : STAXResult }
|
</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 ACI Target Tests
|
#@TestName Target equals dn with trailing wildcard
|
#@TestIssue 434
|
#@TestPurpose Test with the target set equal to a dn with a trailing wildcard
|
#@TestPreamble Admin adds an aci with the target equal to the dn with a trailing wildcard.
|
#@TestStep Client searches entry with the targeted branch dn.
|
#@TestStep Client searches entry that is not with the targeted branch dn.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 1.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN With Trailing Wildcard'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci3.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with trailing wildcard, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with trailing wildcard, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with trailing wildcard, user searching non-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=scarter,ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with trailing wildcard, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with trailing wildcard, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn with leading wildcard
|
#@TestIssue 434
|
#@TestPurpose Test with the target set equal to a dn with leading wildcard
|
#@TestPreamble Admin adds an aci with the target equal to the dn with a leading wildcard.
|
#@TestStep Client searches entry with the targeted branch dn.
|
#@TestStep Client searches entry that is not with the targeted branch dn.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 1.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN With Leading Wildcard'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci4.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with leading wildcard, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with leading wildcard, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with leading wildcard, user searching non-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=scarter,ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with leading wildcard, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with leading wildcard, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn with internal wildcard
|
#@TestIssue 434
|
#@TestPurpose Test with the target set equal to a dn with an internal wildcard
|
#@TestPreamble Admin adds an aci with the target equal to the dn with an internal wildcard.
|
#@TestStep Client searches entry with the targeted branch dn.
|
#@TestStep Client searches entry that is not with the targeted branch dn.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 1.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN With Internal Wildcard'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci5.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with internal wildcard, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with internal wildcard, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with internal wildcard, user searching non-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=scarter,ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with internal wildcard, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with internal wildcard, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn with multiple wildcards
|
#@TestIssue 434
|
#@TestPurpose Test with the target set equal to a dn with multiple wildcards
|
#@TestPreamble Admin adds an aci with the target equal to the dn with multiple wildcards.
|
#@TestStep Client searches entry with the targeted branch dn.
|
#@TestStep Client searches entry that is not with the targeted branch dn.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 1.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN With Multiple Wildcards'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci6.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with multiple wildcards, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with multiple wildcards, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with multiple wildcards, user searching non-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=scarter,ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with multiple wildcards, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with multiple wildcards, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target contains keyword self
|
#@TestIssue 434
|
#@TestPurpose Test if target can contain the keyword self
|
#@TestPreamble none
|
#@TestStep Admin adds an aci that contains the keyword
|
self to an existing entry
|
#@TestStep Admin checks if aci was added.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 21,
|
and the aci has not been added.
|
-->
|
<!-- cross reference to syntax.ksh Test Case 1 -->
|
<testcase name="'ACI: Target: Target Equals DN With Keyword self'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci8.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN With Keyword self - add 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 21">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN With Keyword self - check aci'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'dsBaseDN' : 'ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'extraParams' : '-s base' ,
|
'attributes' : 'aci' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'aci:' }
|
</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 ACI Target Tests
|
#@TestName Target set to a dn above the entry
|
#@TestIssue 434
|
#@TestPurpose Test if the target can contain a DN above the
|
level of the entry
|
#@TestPreamble none
|
#@TestStep Client adds an aci to its entry
|
that has a DN above the entry's level.
|
#@TestStep Admin checks if aci was added.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 50,
|
and the aci has not been added.
|
-->
|
<!-- cross reference to syntax.ksh Test Case 2 -->
|
<testcase name="'ACI: Target: Target Equals DN Above Entry'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci9.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN Above Entry - add 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 50">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN Above Entry - check aci'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'dsBaseDN' : 'ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'extraParams' : '-s base' ,
|
'attributes' : 'aci' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'aci:' }
|
</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 ACI Target Tests
|
#@TestName Target set to a dn below the entry
|
#@TestIssue 434
|
#@TestPurpose Test if the target can contain a DN above the
|
level of the entry
|
#@TestPreamble none
|
#@TestStep Client adds an aci to its entry
|
that has a DN below the entry's level.
|
#@TestStep Admin checks if aci was added.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 1.
|
-->
|
<!-- cross reference to syntax.ksh Test Case 2 -->
|
<testcase name="'ACI: Target: Target Equals DN Below Entry'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci9a.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN Below Entry - add 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN Below 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN Below Entry, user searching non-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=scarter,ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN Below Entry, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN Below 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Multiple targets
|
#@TestIssue 434
|
#@TestPurpose Test if an aci is allowed to contain multiple targets
|
#@TestPreamble none
|
#@TestStep Admin adds an aci to an existing entry
|
that has multiple targets
|
#@TestStep Admin checks if aci was added.
|
#@TestStep Client searches entry with the targeted dn.
|
#@TestStep Client searches entry with a non-targeted dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 21,
|
and the aci has not been added.
|
-->
|
<!-- cross reference to syntax.ksh Test Case 3 -->
|
<testcase name="'ACI: Target: Multiple Targets'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci10.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Multiple Targets - add 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 21">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Multiple Targets - check aci'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'dsBaseDN' : 'ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'extraParams' : '-s base' ,
|
'attributes' : 'aci' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'aci:' }
|
</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 ACI Target Tests
|
#@TestName Target with mispelled keyword target
|
#@TestIssue 434
|
#@TestPurpose Test if an aci is allowed that contains the keyword target misspelled
|
#@TestPreamble none
|
#@TestStep Admin adds an aci to an existing entry
|
that has the keyword target misspelled
|
#@TestStep Admin checks if aci was added.
|
#@TestStep Client searches entry with the targeted dn.
|
#@TestStep Client searches entry with a non-targeted dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 21,
|
and the aci has not been added.
|
-->
|
<!-- cross reference to syntax.ksh Test Case 13 -->
|
<testcase name="'ACI: Target: Keyword Target Misspelled'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci11.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Keyword Target Misspelled - add 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 21">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Keyword Target Misspelled - check aci'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'dsBaseDN' : 'ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'extraParams' : '-s base' ,
|
'attributes' : 'aci' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'aci:' }
|
</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 ACI Target Tests
|
#@TestName Target with missing leading ldap:
|
#@TestIssue 434
|
#@TestPurpose Test if an aci is allowed that contains the keyword target misspelled
|
#@TestPreamble none
|
#@TestStep Admin adds an aci to an existing entry
|
that has the keyword target misspelled
|
#@TestStep Admin checks if aci was added.
|
#@TestStep Client searches entry with the targeted dn.
|
#@TestStep Client searches entry with a non-targeted dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 21,
|
and the aci has not been added.
|
-->
|
<!-- cross reference to syntax.ksh Test Case 13 -->
|
<testcase name="'ACI: Target: Missing Leading ldap:'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci12.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Missing leading ldap: - add 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 21">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Missing leading ldap: - check aci'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'dsBaseDN' : 'ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'extraParams' : '-s base' ,
|
'attributes' : 'aci' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'aci:' }
|
</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 ACI Target Tests
|
#@TestName Target with ldap:all
|
#@TestIssue 434
|
#@TestPurpose Test if an aci is allowed that contains the keyword target with all
|
#@TestPreamble none
|
#@TestStep Admin adds an aci to an existing entry
|
that has the keyword target misspelled
|
#@TestStep Admin checks if aci was added.
|
#@TestStep Client searches entry with the targeted dn.
|
#@TestStep Client searches entry with a non-targeted dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 21,
|
and the aci has not been added.
|
-->
|
<testcase name="'ACI: Target: With ldap:all'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci13.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: With ldap:all - add 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 21">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: With ldap:all - check aci'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'dsBaseDN' : 'ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'extraParams' : '-s base' ,
|
'attributes' : 'aci' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'aci:' }
|
</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 ACI Target Tests
|
#@TestName Target equals dn with userdn equal all
|
#@TestIssue 453
|
#@TestPurpose Test with the target set equal to a dn with userdn equal all
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn with authenticated user.
|
#@TestStep Client searches entry with the targeted branch dn with anonymous user.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 1.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN with userdn equals all'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci21.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equals all, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equals all, user searching targeted entry as authenticated user'
|
</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=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equals all, user searching targeted entry as anonymous user'
|
</message>
|
|
<call function="'AnonSearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'extraParams' : '-T' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equals all, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equals all, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn with userdn equal anyone
|
#@TestIssue 453
|
#@TestPurpose Test with the target set equal to a dn with userdn equal anyone
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn with authenticated user.
|
#@TestStep Client searches entry with the targeted branch dn with anonoymous user
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for steps 1 and 2.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN with userdn equals anyone'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci22.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equals anyone, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equals anyone, user searching targeted entry as authenticated user'
|
</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=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equals anyone, user searching targeted entry as anonymous user'
|
</message>
|
|
<call function="'AnonSearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'extraParams' : '-T' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equals anyone, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equals anyone, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn with userdn not equal all
|
#@TestIssue 453
|
#@TestPurpose Test with the target set equal to a dn with userdn not equal all
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn with authenticated user.
|
#@TestStep Client searches entry with the targeted branch dn with anonymous user.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 2.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN with userdn not equals all'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci23.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn not equals all, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn not equals all, user searching targeted entry as authenticated user'
|
</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=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn not equals all, user searching targeted entry as anonymous user'
|
</message>
|
|
<call function="'AnonSearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'extraParams' : '-T' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn not equals all, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn not equals all, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn with userdn equal self
|
#@TestIssue 453
|
#@TestPurpose Test with the target set equal to a dn with userdn equal self
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn with authenticated user.
|
#@TestStep Client searches entry with the targeted branch dn with self user.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 2.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN with userdn equal self'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci24.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self, user searching targeted entry as authenticated user'
|
</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=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self, user searching targeted entry as self'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsInstancePswd' : 'sprain' ,
|
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn with userdn equal self with wildcard
|
#@TestIssue 453
|
#@TestPurpose Test with the target set equal to a dn with userdn equal self with wildcard
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn with authenticated user.
|
#@TestStep Client searches entry with the targeted branch dn with self user.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 2.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN with userdn equal self with wildcard'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci25.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard, user searching targeted entry as authenticated user'
|
</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=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard, user searching targeted entry as self'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsInstancePswd' : 'sprain' ,
|
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn with userdn equal self with wildcard and filter
|
#@TestIssue 453
|
#@TestPurpose Test with the target set equal to a dn with userdn equal self with wildcard and filter
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn with authenticated user.
|
#@TestStep Client searches entry with the targeted branch dn with another authenticated user.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for steps 1 and 2.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci26.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, user searching targeted entry as authenticated user'
|
</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=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, user searching targeted entry as self'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : 'uid=buser,ou=people,o=ACI Tests,dc=example,dc=com' ,
|
'dsInstancePswd' : 'ACIRules' ,
|
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn with userdn equal self with wildcard and filter, deny
|
#@TestIssue 453
|
#@TestPurpose Test with the target set equal to a dn with userdn equal self with wildcard and filter, deny
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn with authenticated user.
|
#@TestStep Client searches entry with the targeted branch dn with another authenticated user.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and no entries are returned for any step.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, deny'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci27.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, deny, user searching targeted entry as authenticated user'
|
</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=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, deny, user searching targeted entry as self'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : 'uid=buser,ou=people,o=ACI Tests,dc=example,dc=com' ,
|
'dsInstancePswd' : 'ACIRules' ,
|
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, deny, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<call function="'checktestRC'">
|
{ 'returncode' : RC ,
|
'result' : STAXResult }
|
</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 ACI Target Tests
|
#@TestName Target equals dn with userdn equal self with wildcard and filter, allow and deny
|
#@TestIssue 453
|
#@TestPurpose Test with the target set equal to a dn with userdn equal self with wildcard and filter, allow and deny
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn with authenticated user.
|
#@TestStep Client searches entry with the targeted branch dn with another authenticated user.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 1.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, allow and deny'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci28.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, allow and 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, allow and deny, user searching targeted entry as authenticated user'
|
</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=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, allow and deny, user searching targeted entry as self'
|
</message>
|
|
<call function="'SearchObject'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : 'uid=buser,ou=people,o=ACI Tests,dc=example,dc=com' ,
|
'dsInstancePswd' : 'ACIRules' ,
|
'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, allow and deny, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with userdn equal self with wildcard and filter, allow and 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName userdn equals self - modify operational attributes
|
#@TestIssue 1479
|
#@TestPurpose Test userdn equals self - modify operational attributes
|
#@TestPreamble Admin adds an aci.
|
#@TestStep Client modifies attribute in an entry.
|
#@TestStep Client modifies one operational attribute in an entry.
|
#@TestStep Client modifies another operational attribute in an entry.
|
#@TestStep Client modifies entry to reset the original attrobute value.
|
#@TestStep Remove aci.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for steps 1 and 4, and 53 for steps 2 and 3.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: userdn equals self - modify operational attributes'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci31.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: userdn equals self - modify operational attributes, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: userdn equals self - modify operational attributes, modify 1 '
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsInstancePswd' : 'sprain' ,
|
'entryToBeModified' : '%s/aci/aci_target/mod_entry31.ldif' % (STAGED_DATA_DIR) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: userdn equals self - modify operational attributes, modify 2'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsInstancePswd' : 'sprain' ,
|
'entryToBeModified' : '%s/aci/aci_target/mod_entry31a.ldif' % (STAGED_DATA_DIR) }
|
</call>
|
|
<if expr="RC != 53">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: userdn equals self - modify operational attributes, modify 3'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsInstancePswd' : 'sprain' ,
|
'entryToBeModified' : '%s/aci/aci_target/mod_entry31b.ldif' % (STAGED_DATA_DIR) }
|
</call>
|
|
<if expr="RC != 53">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: userdn equals self - modify operational attributes, modify 4'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : 'uid=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsInstancePswd' : 'sprain' ,
|
'entryToBeModified' : '%s/aci/aci_target/mod_entry31c.ldif' % (STAGED_DATA_DIR) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: userdn equals self - modify operational attributes, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<call function="'checktestRC'">
|
{ 'returncode' : RC ,
|
'result' : STAXResult }
|
</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 ACI Target Tests
|
#@TestName Search for operational attributes
|
#@TestIssue 1479
|
#@TestPurpose Test search for operational attributes
|
#@TestPreamble Admin adds an aci.
|
#@TestStep Admin modifies entry to generate a modifiersName and modifyTimestamp
|
#@TestStep Client searches entry with no attributes stated.
|
#@TestStep Client searches entry with two operational attributes stated.
|
#@TestStep Client searches entry for all operational attributes.
|
#@TestStep Admin modifies entry to reset the original attrobute value.
|
#@TestStep Remove aci.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations,
|
and entries are returned for steps 2, 3, and 4.
|
No operational attributes are returned in step 2 and
|
only the appropriate operational attributes for steps 3 and 4.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: search for operational attributes'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci32.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: search for operational attributes, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: search for operational attributes, admin modifying entry'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/mod_entry32.ldif' % (STAGED_DATA_DIR) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: search for operational attributes, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'creatorsName:' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'createTimestamp:' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'entryDN:' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'modifiersName:' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'modifyTimestamp' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'subschemaSubentry:' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: search for operational attributes, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'creatorsName modifiersName' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'creatorsName:' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'modifiersName:' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: search for operational attributes, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : '+' }
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'creatorsName:' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'createTimestamp:' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'entryDN:' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'modifiersName:' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'modifyTimestamp' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'subschemaSubentry:' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: search for operational attributes, admin modifying entry'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/mod_entry32c.ldif' % (STAGED_DATA_DIR) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: search for operational attributes, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<call function="'checktestRC'">
|
{ 'returncode' : RC ,
|
'result' : STAXResult }
|
</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 ACI Target Tests
|
#@TestName Target equals dn with comma
|
#@TestIssue 434
|
#@TestPurpose Test with the target set equal to a dn with comma
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn.
|
#@TestStep Client searches entry that is not with the targeted branch dn.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
and entry is returned only for step 1.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN with comma'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci33.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN with comma, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with comma, 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' : 'ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'uid=*carter*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=acarter' }
|
</call>
|
|
<if expr="returnCode != '1'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with comma, user searching non-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' : 'ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'uid=*carter*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=acarter' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with comma, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN with comma, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Target equals dn, default targetattr
|
#@TestIssue 434
|
#@TestPurpose Test with the target set equal to a dn, default targetattr
|
#@TestPreamble Admin adds an aci with the target equal to the dn of one existing branch.
|
#@TestStep Client searches entry with the targeted branch dn.
|
#@TestStep Client searches entry that is not with the targeted branch dn.
|
#@TestStep Remove aci.
|
#@TestStep Client searches entry with the previously targeted branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
for all ldap operations, and
|
no entries returned for any search step.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Target Equals DN, default targetattr'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
|
<script>
|
curr_aci_ldif_file = 'add_aci34.ldif'
|
curr_aci=retrieve_aci('%s/aci/aci_target/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
|
</script>
|
|
<message>
|
'ACI: Target: Target Equals DN, default targetattr, 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 ,
|
'entryToBeModified' : '%s/aci/aci_target/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN, default targetattr, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN, default targetattr, user searching non-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=scarter,ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN, default targetattr, admin deleting aci'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_target/del_aci.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<if expr="RC != 0">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Target Equals DN, default targetattr, 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'checktestStringNotPresent'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,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 ACI Target Tests
|
#@TestName Postamble
|
#@TestIssue 434
|
#@TestPurpose Test default aci settings
|
#@TestPreamble none
|
#@TestStep Client searches entry with a branch dn.
|
#@TestStep Client searches entry with another branch dn.
|
#@TestPostamble none
|
#@TestResult Success if OpenDS returns 0
|
and no entries are returned
|
for all operations.
|
-->
|
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
|
<!-- cross reference to DS6 docs -->
|
<testcase name="'ACI: Target: Postamble'">
|
<sequence>
|
<call function="'testCase_Preamble'"/>
|
<message>
|
'ACI: Target: Postamble - existing branch, user searching entry that was targeted in past 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=scarter,ou=People,ou=aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Postamble - existing branch, user searching entry that was non-targeted in past 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=scarter,ou=People,ou=non-aci branch,o=ACI Tests,dc=example,dc=com' ,
|
'dsFilter' : 'objectclass=*' ,
|
'attributes' : 'cn sn uid'}
|
</call>
|
|
<script>
|
returnString = STAXResult[0][1]
|
</script>
|
|
<call function="'searchStringForSubstring'">
|
{ 'returnString' : returnString ,
|
'testString' : 'dn: uid=scarter,ou=People,ou=non-aci branch,o=ACI Tests' }
|
</call>
|
|
<if expr="returnCode != '0'">
|
<tcstatus result="'fail'"/>
|
</if>
|
|
<message>
|
'ACI: Target: Resetting Search Global ACI'
|
</message>
|
|
<call function="'modifyEntry'">
|
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
|
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
|
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
|
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
|
'entryToBeModified' : '%s/aci/aci_reset_global_search.ldif' % STAGED_DATA_DIR }
|
</call>
|
|
<call function="'checktestRC'">
|
{ 'returncode' : RC ,
|
'result' : STAXResult }
|
</call>
|
|
<call function="'testCase_Postamble'"/>
|
|
</sequence>
|
</testcase>
|
|
|
<import machine="'%s' % (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>
|