mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

el_kaboing
02.14.2006 eb4e14f0106f05aec8df5e4eb360cf50147eca92
Add functional tests for Issues 327.
9 files added
1 files modified
723 ■■■■■ changed files
opends/tests/functional-tests/shared/data/security/pwd_policy/add_entry1.ldif 43 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/security/pwd_policy/add_entry2.ldif 43 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/security/pwd_policy/admin_change_force_pwd_reset.ldif 29 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/security/pwd_policy/admin_change_user_pwd.ldif 29 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/security/pwd_policy/admin_reset_force_pwd_add.ldif 29 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/security/pwd_policy/admin_reset_force_pwd_reset.ldif 29 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/security/pwd_policy/user_change_force_pwd.ldif 29 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/security/pwd_policy/user_change_pwd3.ldif 29 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/security/pwd_policy/security_force_pwd_change.xml 459 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/security/pwd_policy/security_pwd_policy.xml 4 ●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/security/pwd_policy/add_entry1.ldif
New file
@@ -0,0 +1,43 @@
# 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.
#
dn: uid=mcat, ou=People, ou=password tests,  o=Pwd Policy Tests, dc=example,dc=com
cn: Mortimer Cat
sn: Cat
givenname: Mortimer
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: mcat
mail: mcat@example.com
telephonenumber: +1 408 555 4798
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 4612
userpassword: pizza
opends/tests/functional-tests/shared/data/security/pwd_policy/add_entry2.ldif
New file
@@ -0,0 +1,43 @@
# 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.
#
dn: uid=mdog, ou=People, ou=password tests,  o=Pwd Policy Tests, dc=example,dc=com
cn: Mortimer Dog
sn: Dog
givenname: Mortimer
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: mdog
mail: mdog@example.com
telephonenumber: +1 408 555 4798
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 4612
userpassword: pizza
opends/tests/functional-tests/shared/data/security/pwd_policy/admin_change_force_pwd_reset.ldif
New file
@@ -0,0 +1,29 @@
# 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.
#
dn: cn=Default Password Policy,cn=Password Policies,cn=config
changetype: modify
replace: ds-cfg-force-change-on-reset
ds-cfg-force-change-on-reset: true
opends/tests/functional-tests/shared/data/security/pwd_policy/admin_change_user_pwd.ldif
New file
@@ -0,0 +1,29 @@
# 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.
#
dn: uid=mdog,ou=People,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: adminpizza
opends/tests/functional-tests/shared/data/security/pwd_policy/admin_reset_force_pwd_add.ldif
New file
@@ -0,0 +1,29 @@
# 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.
#
dn: cn=Default Password Policy,cn=Password Policies,cn=config
changetype: modify
replace: ds-cfg-force-change-on-add
ds-cfg-force-change-on-add: false
opends/tests/functional-tests/shared/data/security/pwd_policy/admin_reset_force_pwd_reset.ldif
New file
@@ -0,0 +1,29 @@
# 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.
#
dn: cn=Default Password Policy,cn=Password Policies,cn=config
changetype: modify
replace: ds-cfg-force-change-on-reset
ds-cfg-force-change-on-reset: false
opends/tests/functional-tests/shared/data/security/pwd_policy/user_change_force_pwd.ldif
New file
@@ -0,0 +1,29 @@
# 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.
#
dn: uid=mcat,ou=People,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: newpizza
opends/tests/functional-tests/shared/data/security/pwd_policy/user_change_pwd3.ldif
New file
@@ -0,0 +1,29 @@
# 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.
#
dn: uid=mdog,ou=People,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: newpizza
opends/tests/functional-tests/testcases/security/pwd_policy/security_force_pwd_change.xml
New file
@@ -0,0 +1,459 @@
<?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>
opends/tests/functional-tests/testcases/security/pwd_policy/security_pwd_policy.xml
@@ -80,6 +80,10 @@
        <call function="'user_pwd_policy'" />
        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
          file="'%s/testcases/security/pwd_policy/security_force_pwd_change.xml' % (TESTS_DIR)"/>
        <call function="'force_pwd_change'" />
        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
          file="'%s/testcases/security/pwd_policy/security_force_pwd_change_all_users.xml' % (TESTS_DIR)"/>
        <call function="'force_pwd_change_all_users'" />