security_force_pwd_change_all_users.xml revision d25372dc8e65a9ed019a88fdf659ca61313f1b31
<?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="force_pwd_change_all_users"/>
<function name="force_pwd_change_all_users">
<sequence>
<!--- Test Suite information
#@TestSuiteName Force PasswordChange All Users
#@TestSuitePurpose Force PasswordChange All Users
#@TestSuiteGroup Force PasswordChange All Users
#@TestScript security_force_pwd_change_all_users.xml
-->
<!--- Define default value for basedn -->
<script>
basedn = 'ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com'
msg1 = 'get-password-changed-by-required-time'
msg2 = 'get-seconds-until-required-change-time'
</script>
<!--- Test Case information
#@TestMarker Force PasswordChange All Users
#@TestName User Search With Password
#@TestIssue none
#@TestPurpose Set the Pwd Expiration Time to a past date
#@TestPreamble none
#@TestStep Step 1 - User Searching With Password
#@TestStep Step 2 - Admin Enabling Exp Pwd No Warning
set expire-passwords-without-warning to true
#@TestStep Step 3 - Admin Setting Pwd Time Exp
set require-change-by-time to 20061030183752.848Z
#@TestPostamble none
#@TestResult Success if the 3 steps are PASS
-->
<testcase name="getTestCaseName('Preamble Setup')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Change: Preamble Step 1 - User Searching With Password'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=scarter,%s' % basedn ,
'dsInstancePswd' : 'sprain' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<message>
'Security: Pwd Change: Preamble Step 2 - Admin Enabling Exp Pwd No Warning'
</message>
<call function="'modifyPwdPolicy'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Default Password Policy' ,
'attributeName' : 'expire-passwords-without-warning' ,
'attributeValue' : 'true' }
</call>
<message>
'Security: Pwd Change: Preamble Step 3 -Admin Setting Pwd Time Exp'
</message>
<call function="'modifyPwdPolicy'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Default Password Policy' ,
'attributeName' : 'require-change-by-time' ,
'attributeValue' : '20061030183752.848Z' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--
- Test Case information
#@TestMarker Force PasswordChange All Users
#@TestName User Search With Expired Password
#@TestIssue none
#@TestPurpose User Search With Expired Password
#@TestPreamble none
#@TestStep User Search With Expired Password RC 49
#@TestPostamble none
#@TestResult Success if the step is PASS
-->
<testcase name="getTestCaseName('User Search With Exp Password')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Change: User Searching With Expired Password'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=scarter,%s' % basedn ,
'dsInstancePswd' : 'sprain' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base',
'expectedRC' : 49 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--
- Test Case information
#@TestMarker Force PasswordChange All Users
#@TestName Admin Disable Exp Pwd No Warning
#@TestIssue none
#@TestPurpose Admin Disable Exp Pwd No Warning
#@TestPreamble none
#@TestStep Admin Disabling Exp Pwd No Warning
set expire-passwords-without-warning to false
#@TestPostamble none
#@TestResult Success if the step is PASS
-->
<testcase name="getTestCaseName('Admin Disable Exp Pwd No Warning')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Change: Admin Disabling Exp Pwd No Warning'
</message>
<call function="'modifyPwdPolicy'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Default Password Policy' ,
'attributeName' : 'expire-passwords-without-warning' ,
'attributeValue' : 'false' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--
- Test Case information
#@TestMarker Force PasswordChange All Users
#@TestName User Search With Expired Password 2
#@TestIssue none
#@TestPurpose User Search With Expired Password 2
#@TestPreamble none
#@TestStep User Searching With Expired Password 2
SearchObject grep will expire
#@TestPostamble none
#@TestResult Success if the steps is PASS
-->
<testcase name="getTestCaseName('User Search With Exp Password 2')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Change: User Searching With Expired Password 2'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=scarter,%s' % basedn ,
'dsInstancePswd' : 'sprain' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{ 'returnString' : returnString ,
'expectedString' : 'will expire' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--
- Test Case information
#@TestMarker Force PasswordChange All Users
#@TestName Admin Reset Pwd Time Exp
#@TestIssue none
#@TestPurpose Admin Reset Pwd Time Exp
#@TestPreamble none
#@TestStep Admin Resetting Pwd Time Exp
remove require-change-by-time 20061030183752.848Z
#@TestStep User Searching With Password SearchObject returns 0
#@TestStep check manage-account
get-password-changed-by-required-time
#@TestStep Check manage-account
get-seconds-until-required-change-time
#@TestPostamble none
#@TestResult Success if the 4 steps are PASS
-->
<testcase name="getTestCaseName('Postamble Reset')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Change: Admin Resetting Pwd Time Exp'
</message>
<call function="'modifyPwdPolicy'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'propertyName' : 'Default Password Policy' ,
'attributeName' : 'require-change-by-time' ,
'attributeValue' : '20061030183752.848Z' ,
'modifyType' : 'remove' }
</call>
<message>
'Security: Pwd Change: User Searching With Password'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=scarter,%s' % basedn ,
'dsInstancePswd' : 'sprain' ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-s base' }
</call>
<message>
'Security: Pwd Change: Check manage-account %s' % msg1
</message>
<call function="'manageAccountWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'get-password-changed-by-required-time' ,
'targetDn' : 'uid=scarter,%s' % basedn }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{ 'returnString' : returnString ,
'expectedString' : 'Password Changed by Required Time:' }
</call>
<message>
'Security: Pwd Change: Check manage-account %s' % msg2
</message>
<call function="'manageAccountWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'get-seconds-until-required-change-time' ,
'targetDn' : 'uid=scarter,%s' % basedn }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{ 'returnString' : returnString ,
'expectedString' : 'Seconds Until Required Change Time:' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
</sequence>
</function>
</stax>