5784N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5784N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
5784N/A<!--
5784N/A ! CDDL HEADER START
5784N/A !
5784N/A ! The contents of this file are subject to the terms of the
5784N/A ! Common Development and Distribution License, Version 1.0 only
5784N/A ! (the "License"). You may not use this file except in compliance
5784N/A ! with the License.
5784N/A !
5784N/A ! You can obtain a copy of the license at
5784N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt
5784N/A ! or http://forgerock.org/license/CDDLv1.0.html.
5784N/A ! See the License for the specific language governing permissions
5784N/A ! and limitations under the License.
5784N/A !
5784N/A ! When distributing Covered Code, include this CDDL HEADER in each
5784N/A ! file and include the License file at
5784N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt. If applicable,
5784N/A ! add the following below this CDDL HEADER, with the fields enclosed
5784N/A ! by brackets "[]" replaced with your own identifying information:
5784N/A ! Portions Copyright [yyyy] [name of copyright owner]
5784N/A !
5784N/A ! CDDL HEADER END
5784N/A !
5784N/A ! Copyright 2012 ForgeRock AS.
5784N/A ! -->
5784N/A<stax>
5784N/A
5784N/A <!--- Test Case information
5784N/A #@TestMarker Force PasswordChange All Users
5784N/A #@TestName User Search With Password
5784N/A #@TestIssue none
5784N/A #@TestPurpose Set the Pwd Expiration Time to a past date
5784N/A #@TestPreamble none
5784N/A #@TestStep Step 1 - User Searching With Password
5784N/A #@TestStep Step 2 - Admin Enabling Exp Pwd No Warning
5784N/A set expire-passwords-without-warning to true
5784N/A #@TestStep Step 3 - Admin Setting Pwd Time Exp
5784N/A set require-change-by-time to 20061030183752.848Z
5784N/A #@TestPostamble none
5784N/A #@TestResult Success if the 3 steps are PASS
5784N/A -->
5784N/A <function name="pwp_force_pwd_change_020" scope="local">
5784N/A <testcase name="getTestCaseName('PWP Enable Force PasswordChange All Users')">
5784N/A <sequence>
5784N/A <try>
5784N/A <sequence>
5784N/A
5784N/A <call function="'testCase_Preamble'"/>
5784N/A
5784N/A <message>
5784N/A 'Test Name = %s' % STAXCurrentTestcase
5784N/A </message>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'PWP: User Searching With Password.' }
5784N/A </call>
5784N/A
5784N/A <call function="'SearchObject'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5784N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5784N/A 'dsInstanceDn' : 'uid=scarter,%s' % basedn ,
5784N/A 'dsInstancePswd' : 'sprain' ,
5784N/A 'dsBaseDN' : 'dc=example,dc=com' ,
5784N/A 'dsFilter' : 'objectclass=*' ,
5784N/A 'extraParams' : '-s base' }
5784N/A </call>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'PWP: Admin Enabling Expire Passwords Without Warning.' }
5784N/A </call>
5784N/A
5784N/A <script>
5784N/A options=[]
5784N/A options.append('--policy-name "Default Password Policy"')
5784N/A options.append('--set expire-passwords-without-warning:true')
5784N/A dsconfigOptions=' '.join(options)
5784N/A </script>
5784N/A
5784N/A <call function="'dsconfig'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5784N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5784N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5784N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5784N/A 'subcommand' : 'set-password-policy-prop',
5784N/A 'optionsString' : dsconfigOptions
5784N/A }
5784N/A </call>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'PWP: Admin Setting Require Change by Time.' }
5784N/A </call>
5784N/A
5784N/A <script>
5784N/A options=[]
5784N/A options.append('--policy-name "Default Password Policy"')
5784N/A options.append('--set require-change-by-time:20061030183752.848Z')
5784N/A dsconfigOptions=' '.join(options)
5784N/A </script>
5784N/A
5784N/A <call function="'dsconfig'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5784N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5784N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5784N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5784N/A 'subcommand' : 'set-password-policy-prop',
5784N/A 'optionsString' : dsconfigOptions
5784N/A }
5784N/A </call>
5784N/A
5784N/A </sequence>
5784N/A
5784N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5784N/A <message log="1" level="'fatal'">
5784N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5784N/A </message>
5784N/A </catch>
5784N/A <finally>
5784N/A <sequence>
5784N/A <call function="'testCase_Postamble'"/>
5784N/A </sequence>
5784N/A </finally>
5784N/A </try>
5784N/A </sequence>
5784N/A </testcase>
5784N/A </function>
5784N/A
5784N/A <!--
5784N/A - Test Case information
5784N/A #@TestMarker Force PasswordChange All Users
5784N/A #@TestName User Search With Expired Password
5784N/A #@TestIssue none
5784N/A #@TestPurpose User Search With Expired Password
5784N/A #@TestPreamble none
5784N/A #@TestStep User Search With Expired Password RC 49
5784N/A #@TestPostamble none
5784N/A #@TestResult Success if the step is PASS
5784N/A -->
5784N/A <function name="pwp_force_pwd_change_021" scope="local">
5784N/A <testcase name="getTestCaseName('PWP User Search With Expired Password')">
5784N/A <sequence>
5784N/A <try>
5784N/A <sequence>
5784N/A
5784N/A <call function="'testCase_Preamble'"/>
5784N/A
5784N/A <message>
5784N/A 'Test Name = %s' % STAXCurrentTestcase
5784N/A </message>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'PWP: User Searching With Expired Password.' }
5784N/A </call>
5784N/A
5784N/A <call function="'SearchObject'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5784N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5784N/A 'dsInstanceDn' : 'uid=scarter,%s' % basedn ,
5784N/A 'dsInstancePswd' : 'sprain' ,
5784N/A 'dsBaseDN' : 'dc=example,dc=com' ,
5784N/A 'dsFilter' : 'objectclass=*' ,
5784N/A 'extraParams' : '-s base',
5784N/A 'expectedRC' : 49 }
5784N/A </call>
5784N/A
5784N/A </sequence>
5784N/A
5784N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5784N/A <message log="1" level="'fatal'">
5784N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5784N/A </message>
5784N/A </catch>
5784N/A <finally>
5784N/A <sequence>
5784N/A <call function="'testCase_Postamble'"/>
5784N/A </sequence>
5784N/A </finally>
5784N/A </try>
5784N/A </sequence>
5784N/A </testcase>
5784N/A </function>
5784N/A
5784N/A <!--
5784N/A - Test Case information
5784N/A #@TestMarker Force PasswordChange All Users
5784N/A #@TestName Admin Disable Exp Pwd No Warning
5784N/A #@TestIssue none
5784N/A #@TestPurpose Admin Disable Exp Pwd No Warning
5784N/A #@TestPreamble none
5784N/A #@TestStep Admin Disabling Exp Pwd No Warning
5784N/A set expire-passwords-without-warning to false
5784N/A #@TestPostamble none
5784N/A #@TestResult Success if the step is PASS
5784N/A -->
5784N/A <function name="pwp_force_pwd_change_022" scope="local">
5784N/A <testcase name="getTestCaseName('PWP Admin Disable Expire Passwords Without Warning')">
5784N/A <sequence>
5784N/A <try>
5784N/A <sequence>
5784N/A
5784N/A <call function="'testCase_Preamble'"/>
5784N/A
5784N/A <message>
5784N/A 'Test Name = %s' % STAXCurrentTestcase
5784N/A </message>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'PWP: Admin Disabling Expire Passwords Without Warning.' }
5784N/A </call>
5784N/A
5784N/A <script>
5784N/A options=[]
5784N/A options.append('--policy-name "Default Password Policy"')
5784N/A options.append('--set expire-passwords-without-warning:false')
5784N/A dsconfigOptions=' '.join(options)
5784N/A </script>
5784N/A
5784N/A <call function="'dsconfig'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5784N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5784N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5784N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5784N/A 'subcommand' : 'set-password-policy-prop',
5784N/A 'optionsString' : dsconfigOptions
5784N/A }
5784N/A </call>
5784N/A
5784N/A </sequence>
5784N/A
5784N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5784N/A <message log="1" level="'fatal'">
5784N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5784N/A </message>
5784N/A </catch>
5784N/A <finally>
5784N/A <sequence>
5784N/A <call function="'testCase_Postamble'"/>
5784N/A </sequence>
5784N/A </finally>
5784N/A </try>
5784N/A </sequence>
5784N/A </testcase>
5784N/A </function>
5784N/A
5784N/A <!--
5784N/A - Test Case information
5784N/A #@TestMarker Force PasswordChange All Users
5784N/A #@TestName User Search With Expired Password 2
5784N/A #@TestIssue none
5784N/A #@TestPurpose User Search With Expired Password 2
5784N/A #@TestPreamble none
5784N/A #@TestStep User Searching With Expired Password 2
5784N/A SearchObject grep will expire
5784N/A #@TestPostamble none
5784N/A #@TestResult Success if the steps is PASS
5784N/A -->
5784N/A <function name="pwp_force_pwd_change_023" scope="local">
5784N/A <testcase name="getTestCaseName('PWP User Search With Expired Password 2')">
5784N/A <sequence>
5784N/A <try>
5784N/A <sequence>
5784N/A
5784N/A <call function="'testCase_Preamble'"/>
5784N/A
5784N/A <message>
5784N/A 'Test Name = %s' % STAXCurrentTestcase
5784N/A </message>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'PWP: User Searching With Expired Password 2.' }
5784N/A </call>
5784N/A
5784N/A <call function="'SearchObject'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5784N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5784N/A 'dsInstanceDn' : 'uid=scarter,%s' % basedn ,
5784N/A 'dsInstancePswd' : 'sprain' ,
5784N/A 'dsBaseDN' : 'dc=example,dc=com' ,
5784N/A 'dsFilter' : 'objectclass=*' ,
5784N/A 'extraParams' : '-s base' }
5784N/A </call>
5784N/A
5784N/A <script>
5784N/A returnString = STAXResult[0][1]
5784N/A </script>
5784N/A
5789N/A <call function="'searchString'">
5784N/A { 'returnString' : returnString ,
5784N/A 'expectedString' : 'will expire' }
5784N/A </call>
5784N/A
5784N/A </sequence>
5784N/A
5784N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5784N/A <message log="1" level="'fatal'">
5784N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5784N/A </message>
5784N/A </catch>
5784N/A <finally>
5784N/A <sequence>
5784N/A <call function="'testCase_Postamble'"/>
5784N/A </sequence>
5784N/A </finally>
5784N/A </try>
5784N/A </sequence>
5784N/A </testcase>
5784N/A </function>
5784N/A
5784N/A <!--
5784N/A - Test Case information
5784N/A #@TestMarker Force PasswordChange All Users
5784N/A #@TestName Admin Reset Pwd Time Exp
5784N/A #@TestIssue none
5784N/A #@TestPurpose Admin Reset Pwd Time Exp
5784N/A #@TestPreamble none
5784N/A #@TestStep Admin Resetting Pwd Time Exp
5784N/A remove require-change-by-time 20061030183752.848Z
5784N/A #@TestStep User Searching With Password SearchObject returns 0
5784N/A #@TestStep check manage-account
5784N/A get-password-changed-by-required-time
5784N/A #@TestStep Check manage-account
5784N/A get-seconds-until-required-change-time
5784N/A #@TestPostamble none
5784N/A #@TestResult Success if the 4 steps are PASS
5784N/A -->
5784N/A <function name="pwp_force_pwd_change_024" scope="local">
5784N/A <testcase name="getTestCaseName('PWP Require Change by Time')">
5784N/A <sequence>
5784N/A <try>
5784N/A <sequence>
5784N/A
5784N/A <call function="'testCase_Preamble'"/>
5784N/A
5784N/A <message>
5784N/A 'Test Name = %s' % STAXCurrentTestcase
5784N/A </message>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'PWP: Admin Resetting Require Change by Time.' }
5784N/A </call>
5784N/A
5784N/A <script>
5784N/A options=[]
5784N/A options.append('--policy-name "Default Password Policy"')
5784N/A options.append('--set require-change-by-time:20061030183752.848Z')
5784N/A dsconfigOptions=' '.join(options)
5784N/A </script>
5784N/A
5784N/A <call function="'dsconfig'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5784N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5784N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5784N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5784N/A 'subcommand' : 'set-password-policy-prop',
5784N/A 'optionsString' : dsconfigOptions
5784N/A }
5784N/A </call>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'PWP: Get Require Change by Time.' }
5784N/A </call>
5784N/A
5784N/A <script>
5784N/A options=[]
5784N/A options.append('--policy-name "Default Password Policy"')
5784N/A options.append('--property "require-change-by-time"')
5784N/A dsconfigOptions=' '.join(options)
5784N/A </script>
5784N/A
5784N/A <call function="'dsconfig'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5784N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5784N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5784N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5784N/A 'subcommand' : 'get-password-policy-prop',
5784N/A 'optionsString' : dsconfigOptions,
5784N/A 'expectedString' : 'require-change-by-time : 20061030183752.848Z'
5784N/A
5784N/A }
5784N/A </call>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'PWP: User Searching With Password.' }
5784N/A </call>
5784N/A
5784N/A <call function="'SearchObject'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5784N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5784N/A 'dsInstanceDn' : 'uid=scarter,%s' % basedn ,
5784N/A 'dsInstancePswd' : 'sprain' ,
5784N/A 'dsBaseDN' : 'dc=example,dc=com' ,
5784N/A 'dsFilter' : 'objectclass=*' ,
5784N/A 'extraParams' : '-s base' }
5784N/A </call>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'Check manage-account %s' % msg1 }
5784N/A </call>
5784N/A
5784N/A <call function="'manageAccountWithScript'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5784N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
5784N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
5784N/A 'subcommand' : 'get-password-changed-by-required-time' ,
5784N/A 'targetDn' : 'uid=scarter,%s' % basedn }
5784N/A </call>
5784N/A
5784N/A <script>
5784N/A returnString = STAXResult[0][1]
5784N/A </script>
5784N/A
5789N/A <call function="'searchString'">
5784N/A { 'returnString' : returnString ,
5784N/A 'expectedString' : 'Password Changed by Required Time:' }
5784N/A </call>
5784N/A
5784N/A <call function="'testStep'">
5784N/A { 'stepMessage' : 'Check manage-account %s' % msg2 }
5784N/A </call>
5784N/A
5784N/A <call function="'manageAccountWithScript'">
5784N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5784N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
5784N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
5784N/A 'subcommand' : 'get-seconds-until-required-change-time' ,
5784N/A 'targetDn' : 'uid=scarter,%s' % basedn }
5784N/A </call>
5784N/A
5784N/A <script>
5784N/A returnString = STAXResult[0][1]
5784N/A </script>
5784N/A
5789N/A <call function="'searchString'">
5784N/A { 'returnString' : returnString ,
5784N/A 'expectedString' : 'Seconds Until Required Change Time:' }
5784N/A </call>
5784N/A
5784N/A </sequence>
5784N/A
5784N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5784N/A <message log="1" level="'fatal'">
5784N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5784N/A </message>
5784N/A </catch>
5784N/A <finally>
5784N/A <sequence>
5784N/A <call function="'testCase_Postamble'"/>
5784N/A </sequence>
5784N/A </finally>
5784N/A </try>
5784N/A </sequence>
5784N/A </testcase>
5784N/A </function>
5784N/A
5784N/A</stax>