From a239e082a18373cbcca090dfdc64c945abe7ac69 Mon Sep 17 00:00:00 2001
From: mkeyes <mkeyes@localhost>
Date: Thu, 23 Aug 2007 20:45:18 +0000
Subject: [PATCH] Added a dsconfig call to create and delete a new password policy. The new passowrd policy is tested in the test cases.
---
/dev/null | 55 ---------------------------
opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy/security_mult_pwd_policies.xml | 39 +++++++++++--------
2 files changed, 23 insertions(+), 71 deletions(-)
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/security/pwd_policy/rm_sales_pwd_policy.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/security/pwd_policy/rm_sales_pwd_policy.ldif
deleted file mode 100644
index 3c54f00..0000000
--- a/opendj-sdk/opends/tests/functional-tests/shared/data/security/pwd_policy/rm_sales_pwd_policy.ldif
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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-2007 Sun Microsystems, Inc.
-#
-
-dn: cn=Sales Password Policy,cn=Password Policies,cn=config
-changetype: delete
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/data/security/pwd_policy/sales_pwd_policy.ldif b/opendj-sdk/opends/tests/functional-tests/shared/data/security/pwd_policy/sales_pwd_policy.ldif
deleted file mode 100644
index 3fd4c53..0000000
--- a/opendj-sdk/opends/tests/functional-tests/shared/data/security/pwd_policy/sales_pwd_policy.ldif
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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-2007 Sun Microsystems, Inc.
-#
-
-dn: cn=Sales Password Policy,cn=Password Policies,cn=config
-objectClass: ds-cfg-password-policy
-objectClass: top
-ds-cfg-skip-validation-for-administrators: false
-ds-cfg-password-expiration-warning-interval: 5 days
-ds-cfg-default-password-storage-scheme: SSHA
-ds-cfg-grace-login-count: 0
-ds-cfg-lockout-duration: 0 seconds
-ds-cfg-maximum-password-age: 6 weeks
-ds-cfg-maximum-password-reset-age: 0 seconds
-ds-cfg-lockout-failure-expiration-interval: 0 seconds
-ds-cfg-allow-user-password-changes: true
-ds-cfg-allow-multiple-password-values: false
-ds-cfg-minimum-password-age: 0 seconds
-ds-cfg-expire-passwords-without-warning: false
-ds-cfg-idle-lockout-interval: 0 seconds
-ds-cfg-password-generator-dn: cn=Random Password Generator,cn=Password Generator
- s,cn=config
-ds-cfg-require-secure-authentication: false
-ds-cfg-force-change-on-add: false
-ds-cfg-password-attribute: userPassword
-ds-cfg-allow-expired-password-changes: false
-ds-cfg-allow-pre-encoded-passwords: false
-ds-cfg-lockout-failure-count: 0
-cn: Default Password Policy
-ds-cfg-require-secure-password-changes: false
-ds-cfg-force-change-on-reset: false
-ds-cfg-password-change-requires-current-password: false
-
-
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy/security_mult_pwd_policies.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy/security_mult_pwd_policies.xml
index 7ce6776..9716e94 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy/security_mult_pwd_policies.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy/security_mult_pwd_policies.xml
@@ -41,14 +41,18 @@
'Security: Mult Pwd Policies: Preamble - Add Sales Password Policy'
</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/sales_pwd_policy.ldif' % logsRemoteDataDir }
- </call>
-
+ <call function="'dsconfig'">
+ { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
+ 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
+ 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
+ 'subcommand' : 'create-password-policy' ,
+ 'objectType' : 'policy-name' ,
+ 'objectName' : 'Sales Password Policy',
+ 'optionsString' : '--set default-password-storage-scheme:SSHA --set password-attribute:userPassword',
+ 'expectedRC' : 0 }
+ </call>
+
<call function="'testCase_Postamble'"/>
</sequence>
@@ -196,14 +200,17 @@
'Security: Mult Pwd Policies: Admin Deleting Sales Lockout Count'
</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/rm_sales_pwd_policy.ldif' % logsRemoteDataDir }
- </call>
-
+ <call function="'dsconfig'">
+ { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
+ 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
+ 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
+ 'subcommand' : 'delete-password-policy' ,
+ 'objectType' : 'policy-name' ,
+ 'objectName' : 'Sales Password Policy',
+ 'expectedRC' : 0 }
+ </call>
+
<call function="'testCase_Postamble'"/>
</sequence>
--
Gitblit v1.10.0