security_pwd_SMD5.xml revision d81978a0815d5b8a75633c35e3e1f8708d36f017
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
<!--
! 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
! trunk/opends/resource/legal-notices/OpenDS.LICENSE
! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
! 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 2006-2008 Sun Microsystems, Inc.
! -->
<stax>
<defaultcall function="pwd_SMD5"/>
<function name="pwd_SMD5">
<!---
Place suite-specific test information here.
#@TestSuiteName SMD5 Tests
#@TestSuitePurpose Test the SMD5 storage scheme.
#@TestSuiteGroup SMD5 Storage Scheme Tests
#@TestScript security_pwd_SMD5.xml
-->
<sequence>
<!--- Test case: Admin Change To SMD5 Storage Scheme -->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker SMD5 Tests
#@TestName SMD5 Preamble
#@TestIssue 312
#@TestPurpose Change password storage scheme to SMD5.
#@TestPreamble none
#@TestStep Client calls ldapmodify
with the filename to the appropriate file.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
-->
<testcase name="getTestCaseName('SMD5 - Preamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Storage SMD5: Preamble - Admin Changing to SMD5 Storage Scheme'
</message>
<call function="'modifyPwdPolicy'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Default Password Policy' ,
'attributeName' : 'default-password-storage-scheme' ,
'attributeValue' : 'Salted MD5' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case : User Change Password SMD5 Scheme-->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker SMD5 Tests
#@TestName SMD5 Test 1
#@TestIssue 312
#@TestPurpose Test SMD5 password storage scheme.
#@TestPreamble none
#@TestStep Admin changes a user's password to convert
so it is stored as SMD5 scheme.
#@TestStep The user binds with the new password.
#@TestStep Admin retrieves the user's password and
checks for the required {SMD5} prefix.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0 for the ldap
operations and the password has the {SMD5} prefix.
-->
<testcase name="getTestCaseName('SMD5 - Pwd Change')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Storage SMD5: User Changing Password'
</message>
<call function="'modifyAnAttribute'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=trigden,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'sensitive' ,
'DNToModify' : 'uid=trigden,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
'attributeName' : 'userpassword' ,
'newAttributeValue' : 'SMD5sensitive' ,
'changetype' : 'replace' }
</call>
<message>
'Security: Pwd Storage SMD5: User Binding With New Password'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=trigden,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'SMD5sensitive' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<message>
'Security: Pwd Storage SMD5: Checking for SMD5 Scheme On New Password'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=trigden,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'userpassword' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{ 'returnString' : returnString ,
'expectedString' : '{SMD5}' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test case: Admin Reset To SSHA Storage Scheme -->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker SMD5 Tests
#@TestName SMD5 Postamble
#@TestIssue 312
#@TestPurpose Reset password storage scheme to the default, SSHA.
#@TestPreamble none
#@TestStep Client calls ldapmodify
with the filename to the appropriate file.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
-->
<testcase name="getTestCaseName('SMD5 - Postamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Storage SMD5: Postamble - Admin Resetting to SSHA Storage Scheme'
</message>
<call function="'modifyPwdPolicy'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Default Password Policy' ,
'attributeName' : 'default-password-storage-scheme' ,
'attributeValue' : 'Salted SHA-1' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
</sequence>
</function>
</stax>