security_attribute_value.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="attribute_value"/>
<function name="attribute_value">
<sequence>
<!--- Test Suite information
#@TestSuiteName Attribute Value
#@TestSuitePurpose Reject Passwords Matching Attribute Value
#@TestSuiteGroup Attribute Value
#@TestScript security_attribute_value.xml
-->
<!--- Define default value for basedn -->
<script>
basedn1 = 'ou=people,ou=password tests,'
basedn = '%s o=Pwd Validator Tests,dc=example,dc=com' % basedn1
val = 'cn=Attribute Value,cn=Password Validators,cn=config'
msg = 'Security: Pwd Validator: Attribute Value:'
</script>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value Preamble
#@TestIssue none
#@TestPurpose Attribute Value Preamble
#@TestPreamble none
#@TestStep Check ds-cfg-enabled exists
#@TestStep Admin Enabling Validator Attribute Value
#@TestPostamble none
#@TestResult Success if the 2 tests are PASS
-->
<testcase name="getTestCaseName('Attribute Value: Preamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s Preamble Step 1. Check existence of ds-cfg-enabled' % msg
</message>
<call function="'compareEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'attrToBeCompared' : 'ds-cfg-enabled:true',
'entryToBeCompared' : val }
</call>
<message>
'%s Preamble Step 2. 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' : 'Attribute Value' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: add attribute sn
#@TestIssue none
#@TestPurpose add attribute sn
#@TestPreamble none
#@TestStep add attribute sn with modifyPwdValidator
#@TestPostamble none
#@TestResult Success if the test is PASS
-->
<testcase name="getTestCaseName('Attribute Value: add attribute sn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s add attribute sn' % msg
</message>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Attribute Value' ,
'attributeName' : 'match-attribute' ,
'attributeValue' : 'sn' ,
'modifyType' : 'add' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: user modifying password to sn
#@TestIssue none
#@TestPurpose user modifying password to sn
#@TestPreamble none
#@TestStep user dmiller modifying password to sn Miller RC 19
#@TestStep user dmiller binding with invalid password RC 49
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName
('Attribute Value: user modifying password to sn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to sn' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'gosling' ,
'dsAuthzID' : 'dn:uid=dmiller, %s' % basedn ,
'dsNewPassword' : 'Miller' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with invalid password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'Miller' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: user modifying password
to lower case sn
#@TestIssue none
#@TestPurpose user modifying password to lower case sn
#@TestPreamble none
#@TestStep user dmiller modifying password to lower case sn
miller RC 19
#@TestStep user dmiller binding with invalid password RC 49
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName
('Attribute Value: user modifying password to lower case sn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to lower case sn' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'gosling' ,
'dsAuthzID' : 'dn:uid=dmiller,%s' % basedn ,
'dsNewPassword' : 'miller' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with invalid password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'miller' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: user modifying password
to upper case sn
#@TestIssue none
#@TestPurpose user modifying password to upper case sn
#@TestPreamble none
#@TestStep user dmiller modifying password to upper case sn
MILLER RC 19
#@TestStep user dmiller binding with invalid password RC 49
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName
('Attribute Value: user modifying password to upper case sn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to upper case sn' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'gosling' ,
'dsAuthzID' : 'dn:uid=dmiller, %s' % basedn ,
'dsNewPassword' : 'MILLER' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with invalid password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'MILLER' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value : user modifying password
to mixed case sn
#@TestIssue none
#@TestPurpose user modifying password to mixed case sn
#@TestPreamble none
#@TestStep user dmiller modifying password to mixed case sn
mIlLeR RC 19
#@TestStep user dmiller binding with invalid password RC 49
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName
('Attribute Value: user modifying password to mixed case sn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to mixed case sn' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'gosling' ,
'dsAuthzID' : 'dn:uid=dmiller, %s' % basedn ,
'dsNewPassword' : 'mIlLeR' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with invalid password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'mIlLeR' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value : user modifying password to
reversed upper case sn
#@TestIssue none
#@TestPurpose user modifying password to reversed upper case sn
#@TestPreamble none
#@TestStep user dmiller modifying password to reversed upper
case sn RELLIM RC 19
#@TestStep user dmiller binding with invalid password RC 49
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName
('Attribute Value: user modifying password to reversed upper case sn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to reversed upper case sn' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'gosling' ,
'dsAuthzID' : 'dn:uid=dmiller, %s' % basedn,
'dsNewPassword' : 'RELLIM' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with invalid password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn,
'dsInstancePswd' : 'RELLIM' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: add attribute roomnumber
#@TestIssue none
#@TestPurpose add attribute roomnumber
#@TestPreamble none
#@TestStep add attribute roomnumber with modifyPwdValidator
#@TestPostamble none
#@TestResult Success if the test is PASS
-->
<testcase name="getTestCaseName('Attribute Value: add attribute roomnumber')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s add attribute roomnumber' % msg
</message>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Attribute Value' ,
'attributeName' : 'match-attribute' ,
'attributeValue' : 'roomnumber' ,
'modifyType' : 'add' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: user modifying password to
roomnumber
#@TestIssue none
#@TestPurpose user modifying password to roomnumber
#@TestPreamble none
#@TestStep user dmiller modifying password to roomnumber 4135
RC 19
#@TestStep user dmiller binding with invalid password RC 49
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName
('Attribute Value: user modifying password to roomnumber')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to roomnumber' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'gosling' ,
'dsAuthzID' : 'dn:uid=dmiller, %s' % basedn ,
'dsNewPassword' : '4135' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with invalid password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'Miller' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: user modifying password to sn 2
#@TestIssue none
#@TestPurpose user modifying password to sn 2
#@TestPreamble none
#@TestStep user dmiller modifying password to sn Miller RC 19
#@TestStep user dmiller binding with invalid password RC 49
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName
('Attribute Value: user modifying password to sn 2')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to sn 2' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'gosling' ,
'dsAuthzID' : 'dn:uid=dmiller, %s' % basedn ,
'dsNewPassword' : 'Miller' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with invalid password 2' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'Miller' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: disable reverse match-attribute
#@TestIssue none
#@TestPurpose disable reverse match-attribute
#@TestPreamble none
#@TestStep set test-reversed-password to false
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName
('Attribute Value: disable reverse match-attribute')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Validator: Attribute Value: add attribute sn'
</message>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Attribute Value' ,
'attributeName' : 'test-reversed-password' ,
'attributeValue' : 'false' ,
'modifyType' : 'set' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: user modifying password to reverse
sn
#@TestIssue none
#@TestPurpose user modifying password to sn
#@TestPreamble none
#@TestStep user dmiller modifying password to reverse sn
rellim RC 0
#@TestStep user dmiller binding with good password rellim RC 0
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName
('Attribute Value: user modifying password to reverse sn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to reverse sn' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'gosling' ,
'dsAuthzID' : 'dn:uid=dmiller, %s' % basedn ,
'dsNewPassword' : 'rellim' , }
</call>
<message>
'%s user binding with good password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'rellim' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: user modifying password to sn 3
#@TestIssue none
#@TestPurpose user modifying password to sn 3
#@TestPreamble none
#@TestStep user dmiller modifying password to sn Miller RC 19
#@TestStep user dmiller binding with invalid password RC 49
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName
('Attribute Value: user modifying password to sn 3')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to sn 3' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'rellim' ,
'dsAuthzID' : 'dn:uid=dmiller, %s' % basedn ,
'dsNewPassword' : 'Miller' ,
'expectedRC' : 19 }
</call>
<message>
'%s user binding with invalid password 3' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=dmiller,%s' % basedn ,
'dsInstancePswd' : 'Miller' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Attribute Value
#@TestName Attribute Value: Postamble
#@TestIssue none
#@TestPurpose Postamble
#@TestPreamble none
#@TestStep Step 1. Admin Resetting password-validator
#@TestStep Step 2. User Changing Password Miller RC 0
#@TestStep Step 3. User Searching With Password Miller RC 0
#@TestPostamble none
#@TestResult Success if the 2 test are PASS
-->
<testcase name="getTestCaseName('Attribute Value: Postamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s Postamble Step 1. Admin Resetting password-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' : 'Attribute Value' ,
'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=dmiller,%s' % basedn ,
'dsInstancePswd' : 'rellim' ,
'dsAuthzID' : 'dn:uid=dmiller, %s' % basedn ,
'dsNewPassword' : 'Miller' , }
</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=dmiller,%s' % basedn ,
'dsInstancePswd' : 'Miller' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
</sequence>
</function>
</stax>