| | |
| | | #@TestMarker ACI Bind Type Tests |
| | | #@TestName userattr equals one attr with groupdn, url expression |
| | | #@TestIssue 455 |
| | | #@TestPurpose Test behavior with userattr equals one attr with groupdn |
| | | #@TestPurpose Test behavior with userattr equals groupdn with url expression |
| | | #@TestPreamble Admin adds an aci to the dn of one existing branch. |
| | | #@TestStep Client searches entry in the targeted branch dn for entry with group member and matching manager. |
| | | #@TestStep Client searches entry in a non-targeted branch dn for entry with group member and matching manager. |
| | | #@TestStep Client searches entry in the targeted branch dn for entry with non-group member and no matching manager. |
| | | #@TestStep Client searches entry in the targeted branch dn for entry with group member and no matching manager. |
| | | #@TestStep Remove aci. |
| | | #@TestStep Client searches entry with the previously targeted branch dn. |
| | | #@TestPostamble none |
| | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <script> |
| | | curr_aci_ldif_file = 'add_userattr_aci5.ldif' |
| | | curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (logsLocalDataDir,curr_aci_ldif_file)); |
| | | curr_aci="(targetattr=\"*\")(version 3.0; acl \"add_userattr_aci5\"; allow (search,read) userattr=\"ldap:///o=ACI Tests,dc=example,dc=com?manager#GROUPDN\";)" |
| | | </script> |
| | | |
| | | |
| | | <message> |
| | | 'ACI: Bind Types: userattr equals one attr with groupdn, url expression, 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_bindtypes/%s' % (logsRemoteDataDir,curr_aci_ldif_file) } |
| | | <call function="'modifyAnAttribute'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'DNToModify' : 'o=ACI Tests,dc=example,dc=com' , |
| | | 'attributeName' : 'aci' , |
| | | 'newAttributeValue' : curr_aci , |
| | | 'changetype' : 'add' } |
| | | </call> |
| | | |
| | | <if expr="RC != 0"> |
| | | <tcstatus result="'fail'"/> |
| | | </if> |
| | | |
| | | <if expr="RC != 0"> |
| | | <tcstatus result="'fail'"/> |
| | |
| | | <if expr="returnCode != '1'"> |
| | | <tcstatus result="'fail'"/> |
| | | </if> |
| | | <!-- The rest of the test case should be uncommented when Issue 1596 is resolved. |
| | | |
| | | <call function="'searchStringForSubstring'"> |
| | | { 'returnString' : returnString , |
| | | 'testString' : 'cn:' } |
| | |
| | | </if> |
| | | |
| | | <message> |
| | | 'ACI: Bind Types: userattr equals one attr with groupdn, url expression, user searching in non-targeted branch with group member' |
| | | </message> |
| | | |
| | | <call function="'SearchObject'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=cuser,ou=people,o=ACI Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'ACIRules' , |
| | | 'dsBaseDN' : 'uid=kwinters,ou=People,ou=non-aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' , |
| | | 'dsFilter' : 'objectclass=*' , |
| | | 'attributes' : 'cn sn uid manager' } |
| | | </call> |
| | | |
| | | <script> |
| | | returnString = STAXResult[0][1] |
| | | </script> |
| | | |
| | | <call function="'searchStringForSubstring'"> |
| | | { 'returnString' : returnString , |
| | | 'testString' : 'dn: uid=kwinters,ou=People,ou=non-aci branch,o=Bind Type Tests,o=ACI Tests' } |
| | | </call> |
| | | |
| | | <if expr="returnCode != '0'"> |
| | | <tcstatus result="'fail'"/> |
| | | </if> |
| | | |
| | | <message> |
| | | 'ACI: Bind Types: userattr equals one attr with groupdn, url expression, user searching with non-group member' |
| | | </message> |
| | | |
| | |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'ACIRules' , |
| | | 'dsBaseDN' : 'uid=kwinters,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' , |
| | | 'dsBaseDN' : 'uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' , |
| | | 'dsFilter' : 'objectclass=*' , |
| | | 'attributes' : 'cn sn uid manager' } |
| | | </call> |
| | |
| | | |
| | | <call function="'searchStringForSubstring'"> |
| | | { 'returnString' : returnString , |
| | | 'testString' : 'dn: uid=kwinters,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' } |
| | | 'testString' : 'dn: uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' } |
| | | </call> |
| | | |
| | | <if expr="returnCode != '0'"> |
| | | <tcstatus result="'fail'"/> |
| | | </if> |
| | | |
| | | <message> |
| | | 'ACI: Bind Types: userattr equals one attr with groupdn, url expression, user searching with different group member' |
| | | </message> |
| | | |
| | | <call function="'SearchObject'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=fuser,ou=people,o=ACI Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'ACIRules' , |
| | | 'dsBaseDN' : 'uid=kwinters,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' , |
| | | 'dsFilter' : 'objectclass=*' , |
| | | 'attributes' : 'cn sn uid manager' } |
| | | </call> |
| | | |
| | | <script> |
| | | returnString = STAXResult[0][1] |
| | | </script> |
| | | |
| | | <call function="'searchStringForSubstring'"> |
| | | { 'returnString' : returnString , |
| | | 'testString' : 'dn: uid=kwinters,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' } |
| | | </call> |
| | | |
| | | <if expr="returnCode != '0'"> |
| | | <tcstatus result="'fail'"/> |
| | | </if> |
| | | --> |
| | | |
| | | <message> |
| | | 'ACI: Bind Types: userattr equals one attr with groupdn, url expression,, 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_bindtypes/del_aci.ldif' % logsRemoteDataDir } |
| | | <call function="'modifyAnAttribute'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'DNToModify' : 'o=ACI Tests,dc=example,dc=com' , |
| | | 'attributeName' : 'aci' , |
| | | 'newAttributeValue' : curr_aci , |
| | | 'changetype' : 'delete' } |
| | | </call> |
| | | |
| | | <if expr="RC != 0"> |
| | | <tcstatus result="'fail'"/> |
| | | </if> |
| | | |
| | | <if expr="RC != 0"> |
| | | <tcstatus result="'fail'"/> |