security_dictionary.xml revision 94d45099f37d96fa1b0ac6ef295deb9ebee6a5c3
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt<?xml version="1.0" encoding="UTF-8" standalone="no"?>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt<!--
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! CDDL HEADER START
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt !
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! The contents of this file are subject to the terms of the
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! Common Development and Distribution License, Version 1.0 only
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! (the "License"). You may not use this file except in compliance
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! with the License.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt !
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! You can obtain a copy of the license at
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! See the License for the specific language governing permissions
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! and limitations under the License.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt !
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! When distributing Covered Code, include this CDDL HEADER in each
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! file and include the License file at
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! add the following below this CDDL HEADER, with the fields enclosed
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! by brackets "[]" replaced with your own identifying information:
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! Portions Copyright [yyyy] [name of copyright owner]
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt !
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ! CDDL HEADER END
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt !
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt ! Copyright 2007-2008 Sun Microsystems, Inc.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt ! -->
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt<stax>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <defaultcall function="dictionary"/>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <function name="dictionary">
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews <sequence>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <!--- Test Suite information
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews #@TestSuiteName Dictionary
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt #@TestSuitePurpose Reject Passwords Matching Dictionary
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt #@TestSuiteGroup Dictionary
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt #@TestScript security_dictionary.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: Dictionary:'
</script>
<!--- Test Case information
#@TestMarker Dictionary
#@TestName Dictionary: Preamble
#@TestIssue none
#@TestPurpose Preamble Enabling Dictionary Validator
#@TestPreamble none
#@TestStep Admin Enabling Dictionary modifyPwdValidator
#@TestStep Admin Enabling Validator modifyPwdPolicy
password-validator:Dictionary
#@TestPostamble none
#@TestResult Success if the 2 tests are PASS
-->
<testcase name="getTestCaseName('Dictionary: Preamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s Preamble - Admin Enabling Dictionary' % msg
</message>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Dictionary' ,
'attributeName' : 'enabled' ,
'attributeValue' : 'true' ,
'modifyType' : 'set' }
</call>
<message>
'%s Preamble - 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' : 'Dictionary' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Dictionary
#@TestName Dictionary: user modifying password to a
dictionary letter string
string with all letters
#@TestIssue none
#@TestPurpose dictionary string with all letters
#@TestPreamble none
#@TestStep user modifying password to string with all letters
matching a dictionary word zymochemistry RC 53
#@TestStep user binding with invalid password RC 49
#@TestPostamble none
#@TestResult Success if the 2 tests are PASS
-->
<testcase name="getTestCaseName
('Dictionary: user modifying password to string with all letters')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to string with all letters' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=abergin,%s' % basedn,
'dsInstancePswd' : 'inflict' ,
'dsAuthzID' : 'dn:uid=abergin, %s' % basedn,
'dsNewPassword' : 'zymochemistry' ,
'expectedRC' : 53 }
</call>
<message>
'%s user binding with invalid password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=abergin,%s' % basedn,
'dsInstancePswd' : 'zymochemistry' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Dictionary
#@TestName Dictionary: user modifying password to a Reverse
password
#@TestIssue none
#@TestPurpose dictionary string with reverse password
(set to true by default)
#@TestPreamble none
#@TestStep user modifying password to a reverse password
from inflict to tcilfni RC 53
#@TestStep user binding with invalid password RC 49
#@TestPostamble none
#@TestResult Success if the 2 tests are PASS
-->
<testcase name="getTestCaseName('Dictionary: Using Using Reverse Password')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to reverse password' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=abergin,%s' % basedn,
'dsInstancePswd' : 'inflict' ,
'dsAuthzID' : 'dn:uid=abergin, %s' % basedn ,
'dsNewPassword' : 'tcilfni' ,
'expectedRC' : 53 }
</call>
<message>
'%s user binding with invalid password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=abergin,%s' % basedn ,
'dsInstancePswd' : 'tcilfni' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Dictionary
#@TestName Dictionary: Disable Reverse Password
#@TestIssue none
#@TestPurpose Disable Reverse Password and test
#@TestPreamble none
#@TestStep Disable Reverse Password set test-reversed-password
to false
#@TestStep user modifying password to a reverse password
from inflict to tcilfni RC 0
#@TestStep user binding with valid password RC 0
#@TestPostamble none
#@TestResult Success if the 3 tests are PASS
-->
<testcase name="getTestCaseName('Dictionary: Disable Reverse Password')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Validator: Dictionary: Disable Reverse Password'
</message>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Dictionary' ,
'attributeName' : 'test-reversed-password' ,
'attributeValue' : 'false' ,
'modifyType' : 'set' ,
'knownIssue' : '2361' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<testcase name="getTestCaseName('Dictionary: Using Reverse Password 2')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s user modifying password to reverse password 2' % msg
</message>
<call function="'ldapPasswordModifyWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=abergin,%s' % basedn,
'dsInstancePswd' : 'inflict' ,
'dsAuthzID' : 'dn:uid=abergin, %s' % basedn ,
'dsNewPassword' : 'tcilfni' }
</call>
<message>
'%s user binding with valid password' % msg
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=abergin,%s' % basedn ,
'dsInstancePswd' : 'tcilfni' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' ,
'knownIssue' : '2361' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker Dictionary
#@TestName Dictionary: Postamble
#@TestIssue none
#@TestPurpose Postamble Disabling Dictionary Validator
#@TestPreamble none
#@TestStep Admin Disabling Validator modifyPwdPolicy
remove password-validator:Dictionary
#@TestStep User Changing Password with zymochemistry RC 0
#@TestStep User Searching with valid Password RC 0
#@TestPostamble none
#@TestResult Success if the 2 tests are PASS
-->
<testcase name="getTestCaseName('Dictionary: Postamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'%s Postamble Step 1. Admin Disabling 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' : 'Dictionary' ,
'modifyType' : 'remove' }
</call>
<call function="'modifyPwdValidator'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Dictionary' ,
'attributeName' : 'enabled' ,
'attributeValue' : 'false' ,
'modifyType' : 'set' }
</call>
<call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'list-password-validators' ,
'expectedRC' : 0 }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{ 'returnString' : returnString ,
'expectedString' : 'dictionary : false' }
</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' : 'dn:uid=abergin,%s' % basedn ,
'dsInstancePswd' : 'tcilfni' ,
'dsAuthzID' : 'dn:uid=abergin, %s' % basedn,
'dsNewPassword' : 'chemistry' }
</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=abergin,%s' % basedn ,
'dsInstancePswd' : 'zymochemistry' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' ,
'knownIssue' : '2361' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
</sequence>
</function>
</stax>