| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| | | <!DOCTYPE stax SYSTEM "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 |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | --> |
| | | <stax> |
| | | |
| | | <defaultcall function="force_pwd_change"/> |
| | | |
| | | <function name="force_pwd_change"> |
| | | |
| | | <sequence> |
| | | |
| | | <testcase name="'Security:Pwd Change: Check Existence of ds-cfg-force-change-on-add'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Change: Checking existence of ds-cfg-force-change-on-add' |
| | | </message> |
| | | |
| | | <call function="'compareEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'attrToBeCompared' : 'ds-cfg-force-change-on-add:false', |
| | | 'entryToBeCompared' : 'cn=Default Password Policy,cn=Password Policies,cn=config' } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : Admin Enable Force Password On Add --> |
| | | <testcase name="'Security:Pwd Change: Admin Enable Force Password On Add'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Change: Admin Enabling Force Password On Add' |
| | | </message> |
| | | |
| | | <call function="'modifyEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'entryToBeModified' : '%s/security/pwd_policy/admin_change_force_pwd_add.ldif' % STAGED_DATA_DIR } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : Add Single New User --> |
| | | <testcase name="'Security: Pwd Change: Add Single New User'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Change: Adding Single New User' |
| | | </message> |
| | | |
| | | <call function="'addEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'entryToBeAdded' : '%s/security/pwd_policy/add_entry1.ldif' % STAGED_DATA_DIR } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : User Search With Password --> |
| | | <testcase name="'Security:Pwd Policy: User Search With Password'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Policy: User Searching With Password' |
| | | </message> |
| | | |
| | | <call function="'SearchObject'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=mcat,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'pizza' , |
| | | 'dsBaseDN' : 'dc=example,dc=com' , |
| | | 'dsFilter' : 'objectclass=*' , |
| | | 'extraParams' : '-s base' } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult , |
| | | 'expected' : 19 } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : User Change Password --> |
| | | <testcase name="'Security:Pwd Policy: User Change Password'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Policy: User Changing Password' |
| | | </message> |
| | | |
| | | <call function="'modifyEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=mcat,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'pizza' , |
| | | 'entryToBeModified' : '%s/security/pwd_policy/user_change_force_pwd.ldif' % STAGED_DATA_DIR } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : User Search With Password --> |
| | | <testcase name="'Security:Pwd Policy: User Search With Password'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Policy: User Searching With Password' |
| | | </message> |
| | | |
| | | <call function="'SearchObject'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=mcat,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'newpizza' , |
| | | 'dsBaseDN' : 'dc=example,dc=com' , |
| | | 'dsFilter' : 'objectclass=*' , |
| | | 'extraParams' : '-s base' } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : Admin Disable Force Password On Add --> |
| | | <testcase name="'Security:Pwd Change: Admin Disable Force Password On Add'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Change: Admin Disabling Force Password On Add' |
| | | </message> |
| | | |
| | | <call function="'modifyEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'entryToBeModified' : '%s/security/pwd_policy/admin_reset_force_pwd_add.ldif' % STAGED_DATA_DIR } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : Add Single New User --> |
| | | <testcase name="'Security: Pwd Change: Add Single New User'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Change: Adding Single New User' |
| | | </message> |
| | | |
| | | <call function="'addEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'entryToBeAdded' : '%s/security/pwd_policy/add_entry2.ldif' % STAGED_DATA_DIR } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : User Search With Password --> |
| | | <testcase name="'Security:Pwd Policy: User Search With Password'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Policy: User Searching With Password' |
| | | </message> |
| | | |
| | | <call function="'SearchObject'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'pizza' , |
| | | 'dsBaseDN' : 'dc=example,dc=com' , |
| | | 'dsFilter' : 'objectclass=*' , |
| | | 'extraParams' : '-s base' } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <testcase name="'Security:Pwd Change: Check Existence of ds-cfg-force-change-on-reset'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Change: Checking existence of ds-cfg-force-change-on-reset' |
| | | </message> |
| | | |
| | | <call function="'compareEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'attrToBeCompared' : 'ds-cfg-force-change-on-reset:false', |
| | | 'entryToBeCompared' : 'cn=Default Password Policy,cn=Password Policies,cn=config' } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : Admin Enable Force Password On Reset --> |
| | | <testcase name="'Security:Pwd Change: Admin Enable Force Password On Reset'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Change: Admin Enabling Force Password On Reset' |
| | | </message> |
| | | |
| | | <call function="'modifyEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'entryToBeModified' : '%s/security/pwd_policy/admin_change_force_pwd_reset.ldif' % STAGED_DATA_DIR } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : Admin Change User Pwd --> |
| | | <testcase name="'Security:Pwd Change: Admin Change User Pwd'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Change: Admin Changing User Pwd' |
| | | </message> |
| | | |
| | | <call function="'modifyEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'entryToBeModified' : '%s/security/pwd_policy/admin_change_user_pwd.ldif' % STAGED_DATA_DIR } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : User Search With Password --> |
| | | <testcase name="'Security:Pwd Policy: User Search With Password'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Policy: User Searching With Password' |
| | | </message> |
| | | |
| | | <call function="'SearchObject'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'pizza' , |
| | | 'dsBaseDN' : 'dc=example,dc=com' , |
| | | 'dsFilter' : 'objectclass=*' , |
| | | 'extraParams' : '-s base' } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult , |
| | | 'expected' : 1 } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : User Search With Password --> |
| | | <testcase name="'Security:Pwd Policy: User Search With Password'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Policy: User Searching With Password' |
| | | </message> |
| | | |
| | | <call function="'SearchObject'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'adminpizza' , |
| | | 'dsBaseDN' : 'dc=example,dc=com' , |
| | | 'dsFilter' : 'objectclass=*' , |
| | | 'extraParams' : '-s base' } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult , |
| | | 'expected' : 19 } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : User Change Password --> |
| | | <testcase name="'Security:Pwd Policy: User Change Password'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Policy: User Changing Password' |
| | | </message> |
| | | |
| | | <call function="'modifyEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'adminpizza' , |
| | | 'entryToBeModified' : '%s/security/pwd_policy/user_change_pwd3.ldif' % STAGED_DATA_DIR } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : User Search With Password --> |
| | | <testcase name="'Security:Pwd Policy: User Search With Password'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Policy: User Searching With Password' |
| | | </message> |
| | | |
| | | <call function="'SearchObject'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'adminpizza' , |
| | | 'dsBaseDN' : 'dc=example,dc=com' , |
| | | 'dsFilter' : 'objectclass=*' , |
| | | 'extraParams' : '-s base' } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult , |
| | | 'expected' : 1 } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : User Search With Password --> |
| | | <testcase name="'Security:Pwd Policy: User Search With Password'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Policy: User Searching With Password' |
| | | </message> |
| | | |
| | | <call function="'SearchObject'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' , |
| | | 'dsInstancePswd' : 'newpizza' , |
| | | 'dsBaseDN' : 'dc=example,dc=com' , |
| | | 'dsFilter' : 'objectclass=*' , |
| | | 'extraParams' : '-s base' } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <!--- Test Case : Admin Disable Force Password On Reset --> |
| | | <testcase name="'Security:Pwd Change: Admin Disable Force Password On Reset'"> |
| | | <sequence> |
| | | <message> |
| | | 'Security: Pwd Change: Admin Disabling Force Password On Reset' |
| | | </message> |
| | | |
| | | <call function="'modifyEntry'"> |
| | | { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'entryToBeModified' : '%s/security/pwd_policy/admin_reset_force_pwd_reset.ldif' % STAGED_DATA_DIR } |
| | | </call> |
| | | |
| | | <call function="'checktestRC'"> |
| | | { 'returncode' : RC , |
| | | 'result' : STAXResult } |
| | | </call> |
| | | </sequence> |
| | | </testcase> |
| | | |
| | | <return>RC</return> |
| | | |
| | | </sequence> |
| | | |
| | | </function> |
| | | |
| | | </stax> |