security_repeat_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="repeat_chars"/>
<function name="repeat_chars">
<sequence>
<!--- Test Suite information
#@TestSuiteName Repeat Characters
#@TestSuitePurpose Test the Pwd Policy on Pwd with Repeat chars
#@TestSuiteGroup Repeat Characters
#@TestScript security_repeat_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: Repeat Chars:'
</script>
<!--- Test Case information
#@TestMarker Repeat Characters
#@TestName Test Preamble
#@TestIssue none
#@TestPurpose Repeat Chars: Admin Enabling Validator
#@TestPreamble none
#@TestStep set password-validator to Repeated Characters
#@TestPostamble none
#@TestResult Success if all tests are PASS.
-->
<testcase name="getTestCaseName('Repeat 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' : 'Repeated Characters' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Repeat Characters
#@TestName Test pwd with 3 repeat chars
#@TestIssue none
#@TestPurpose Repeat Chars: pwd with 3 repeat chars
#@TestPreamble none
#@TestStep user modifying password to abbbcdef RC 19
#@TestStep user binding with new password RC 49
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName
('Repeat Chars: pwd with 3 repeat 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=trigden,%s' % basedn ,
'dsInstancePswd' : 'sensitive' ,
'DNToModify' : 'uid=trigden, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abbbcdef' ,
'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=trigden,%s' % basedn ,
'dsInstancePswd' : 'abbbcdef' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Repeat Characters
#@TestName Test pwd with 2 repeat chars
#@TestIssue none
#@TestPurpose Repeat Chars: pwd with 2 repeat chars
#@TestPreamble none
#@TestStep user modifying password to abbcdef RC 0
#@TestStep user binding with new password RC 0
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName
('Repeat Chars: password with 2 repeat 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=trigden,%s' % basedn ,
'dsInstancePswd' : 'sensitive' ,
'DNToModify' : 'uid=trigden, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abbcdef' ,
'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=trigden,%s' % basedn ,
'dsInstancePswd' : 'abbcdef' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Repeat Characters
#@TestName Repeat Chars: change maximum length
#@TestIssue none
#@TestPurpose Repeat Chars: change maximum length
#@TestPreamble none
#@TestStep set max-consecutive-length to 3
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName('Repeat Chars: change maximum length')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Validator: Repeat Chars: change maximum length'
</message>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Repeated Characters' ,
'attributeName' : 'max-consecutive-length' ,
'attributeValue' : '3' ,
'modifyType' : 'set' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Repeat Characters
#@TestName Test pwd with 3 repeat chars 2
#@TestIssue none
#@TestPurpose Repeat Chars: pwd with 3 repeat chars 2
#@TestPreamble none
#@TestStep user modifying password to abbbcdef RC 0
#@TestStep user binding with new password RC 0
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName
('Repeat Chars: password with 3 repeat 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=trigden,%s' % basedn ,
'dsInstancePswd' : 'abbcdef' ,
'DNToModify' : 'uid=trigden, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abbbcdef' ,
'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=trigden,%s' % basedn ,
'dsInstancePswd' : 'abbbcdef' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Repeat Characters
#@TestName Repeat Chars: reset maximum length
#@TestIssue none
#@TestPurpose Repeat Chars: reset maximum length
#@TestPreamble none
#@TestStep reset max-consecutive-length to 2
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName('Repeat Chars: reset maximum length')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s change repeat chars' % msg
</message>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Repeated Characters' ,
'attributeName' : 'max-consecutive-length' ,
'attributeValue' : '2' ,
'modifyType' : 'set' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Repeat Characters
#@TestName Repeat Chars: enable case sensitive chars
#@TestIssue none
#@TestPurpose Repeat 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
('Repeat 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' : 'Repeated Characters' ,
'attributeName' : 'case-sensitive-validation' ,
'attributeValue' : 'true' ,
'modifyType' : 'set' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Repeat Characters
#@TestName Test pwd with 3 repeat chars 3
#@TestIssue none
#@TestPurpose Repeat Chars: pwd with 3 repeat chars 3
#@TestPreamble none
#@TestStep user modifying password to abcccdef RC 19
#@TestStep user binding with new password RC 49
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName
('Repeat Chars: password with 3 repeat 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=trigden,%s' % basedn ,
'dsInstancePswd' : 'abbbcdef' ,
'DNToModify' : 'uid=trigden, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abcccdef' ,
'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=trigden,%s' % basedn ,
'dsInstancePswd' : 'abcccdef' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Repeat Characters
#@TestName Test pwd with 3 sensitive repeat chars
#@TestIssue none
#@TestPurpose pwd with 3 sensitive repeat chars
#@TestPreamble none
#@TestStep user modifying password to abcCcdef RC 0
#@TestStep user binding with new password RC 0
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName
('Repeat Chars: password with 3 case sensitive repeat 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=trigden,%s' % basedn ,
'dsInstancePswd' : 'abbbcdef' ,
'DNToModify' : 'uid=trigden, %s' % basedn ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'abcCcdef' ,
'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=trigden,%s' % basedn ,
'dsInstancePswd' : 'abcCcdef' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Repeat Characters
#@TestName Repeat Chars: Postamble
#@TestIssue none
#@TestPurpose Repeat Chars: Postamble
#@TestPreamble none
#@TestStep Admin Resetting Maximum Pwd Length
#@TestStep User Changing Password to abbbcde RC 0
#@TestStep User Searching With Password RC 0
#@TestPostamble none
#@TestResult Success if all tests are PASS
-->
<testcase name="getTestCaseName('Repeat 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' : 'Repeated Characters' ,
'modifyType' : 'remove' }
</call>
<!--- User Change Password -->
<message>
'%s Postamble Step 2. User Changing Password' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=trigden,%s' % basedn ,
'dsInstancePswd' : 'abcCcdef' ,
'dsAuthzID' : 'dn:uid=trigden, %s' % basedn ,
'dsNewPassword' : 'abbbcde' }
</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=trigden,%s' % basedn ,
'dsInstancePswd' : 'abbbcde' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
</sequence>
</function>
</stax>