security_unique_chars.xml revision 518e7dcf27fa44028494162431abe5a0f2737f55
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
! Copyright 2007-2008 Sun Microsystems, Inc.
! Portions Copyright 2012 ForgeRock AS
! -->
<stax>
<defaultcall function="unique_chars"/>
<function name="unique_chars">
<sequence>
<!--- Test Suite information
#@TestSuiteName Unique Characters
#@TestSuitePurpose Test the Pwd Policy on Pwd with unique chars
#@TestSuiteGroup Unique Characters
#@TestScript security_unique_chars.xml
-->
<!--- Define default value for basedn -->
<script>
basedn1 = 'ou=People, ou=password tests,'
basedn = '%s o=Pwd Validator Tests,dc=example,dc=com' % basedn1
msg = 'Security: Pwd Validator: Unique Chars:'
</script>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Test Preamble
#@TestIssue none
#@TestPurpose Unique Chars: Admin Enabling ValidatorUnique Characters
#@TestPreamble none
#@TestStep Admin Enabling Validator for Unique Characters
#@TestPostamble none
#@TestResult Success if all tests are PASS.
-->
<testcase name="getTestCaseName('Unique Chars: Preamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s Admin Enabling Validator' % msg
</message>
<call function="'modifyPwdPolicy'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Default Password Policy' ,
'attributeName' : 'password-validator' ,
'attributeValue' : 'Unique Characters' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Test pwd with 3 unique chars
#@TestIssue none
#@TestPurpose Unique Chars: pwd with 3 unique chars
#@TestPreamble none
#@TestStep user modifying password to abebab RC 19
#@TestStep user binding with new password RC 49
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName('Unique Chars: pwd with 3 unique chars')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'forsook' ,
'dsAuthzID' : 'dn:uid=kwinters, %s' % basedn ,
'dsNewPassword' : 'abebab' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with new password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abebab' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Test pwd with 4 unique chars
#@TestIssue none
#@TestPurpose Unique Chars: pwd with 4 unique chars
#@TestPreamble none
#@TestStep user modifying password to abebib RC 19
#@TestStep user binding with new password RC 49
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName
('Unique Chars: pwd with 4 unique chars')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password' % msg
</message>
<call function="'modifyAnAttribute'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'forsook' ,
'DNToModify' : 'uid=kwinters, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abebib' ,
'changetype' : 'replace' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with new password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abebib' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' ,
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Test pwd with 5 unique chars
#@TestIssue none
#@TestPurpose Unique Chars: pwd with 5 unique chars
#@TestPreamble none
#@TestStep user modifying password to abebig RC 0
#@TestStep user binding with new password RC 0
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName('Unique Chars: password with 5 unique chars')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password' % msg
</message>
<call function="'modifyAnAttribute'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'forsook' ,
'DNToModify' : 'uid=kwinters, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abebig' ,
'changetype' : 'replace' }
</call>
<message>
'%s user binding with new password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abebig' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Change Unique Chars
#@TestIssue none
#@TestPurpose Change Unique Chars
#@TestPreamble none
#@TestStep set min-unique-characters to 3
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName('Unique Chars: change unique chars')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s change unique chars' % msg
</message>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Unique Characters' ,
'attributeName' : 'min-unique-characters' ,
'attributeValue' : '3' ,
'modifyType' : 'set' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Test pwd with 3 unique chars 2
#@TestIssue none
#@TestPurpose Unique Chars: pwd with 3 unique chars 2
#@TestPreamble none
#@TestStep user modifying password to abebab RC 0
#@TestStep user binding with new password RC 0
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName
('Unique Chars: pwd with 3 unique chars 2')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password' % msg
</message>
<call function="'modifyAnAttribute'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abebig' ,
'DNToModify' : 'uid=kwinters, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abebab' ,
'changetype' : 'replace' }
</call>
<message>
'%s user binding with new password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abebab' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Unique Chars: reset unique chars
#@TestIssue none
#@TestPurpose Unique Chars: reset unique chars
#@TestPreamble none
#@TestStep Reset min-unique-characters to 5
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName('Unique Chars: reset unique chars')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s change unique chars' % msg
</message>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Unique Characters' ,
'attributeName' : 'min-unique-characters' ,
'attributeValue' : '5' ,
'modifyType' : 'set' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Unique Chars: enable case sensitive chars
#@TestIssue none
#@TestPurpose Unique Chars: enable case sensitive chars
#@TestPreamble none
#@TestStep set case-sensitive-validation to true
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName
('Unique Chars: enable case sensitive chars')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s enable case sensitive chars' % msg
</message>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Unique Characters' ,
'attributeName' : 'case-sensitive-validation' ,
'attributeValue' : 'true' ,
'modifyType' : 'set' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Test pwd with 3 unique chars 3
#@TestIssue none
#@TestPurpose Unique Chars: pwd with 3 unique chars 3
#@TestPreamble none
#@TestStep user modifying password to abbabac RC 19
#@TestStep user binding with new password RC 49
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName
('Unique Chars: pwd with 3 unique chars 3')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password' % msg
</message>
<call function="'modifyAnAttribute'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abebab' ,
'DNToModify' : 'uid=kwinters, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abbabac' ,
'changetype' : 'replace' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with new password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abbabac' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' ,
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Test pwd with 3 unique sensitive chars
#@TestIssue none
#@TestPurpose pwd with 3 unique sensitive chars
#@TestPreamble none
#@TestStep user modifying password to abBABac RC 0
#@TestStep user binding with new password RC 0
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName
('Unique Chars: password with 3 unique case sensitive chars')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password' % msg
</message>
<call function="'modifyAnAttribute'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abebab' ,
'DNToModify' : 'uid=kwinters, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abBABac' ,
'changetype' : 'replace' }
</call>
<message>
'%s user binding with new password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abBABac' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Unique Characters
#@TestName Unique Chars: Postamble
#@TestIssue none
#@TestPurpose Unique Chars: Postamble
#@TestPreamble none
#@TestStep Admin Resetting Maximum Pwd Length
#@TestStep User Changing Password to abebab RC 0
#@TestStep User Searching With Password RC 0
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName('Unique Chars: Postamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s Postamble Step 1. Admin Resetting Maximum Pwd Length' % msg
</message>
<call function="'modifyPwdPolicy'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Default Password Policy' ,
'attributeName' : 'password-validator' ,
'attributeValue' : 'Unique Characters' ,
'modifyType' : 'remove' }
</call>
<!--- User Change Password -->
<message>
'%s Postamble Step 2. User Changing Password' % msg
</message>
<call function="'modifyAnAttribute'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abBABac' ,
'DNToModify' : 'uid=kwinters, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abebab' ,
'changetype' : 'replace' }
</call>
<message>
'%s Postamble Step 3. User Searching With Password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=kwinters,%s' % basedn ,
'dsInstancePswd' : 'abebab' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
</sequence>
</function>
</stax>