From bb08f3cceed4739474f588e59397127837037f8b Mon Sep 17 00:00:00 2001
From: mkeyes <mkeyes@localhost>
Date: Wed, 27 Jun 2007 17:54:20 +0000
Subject: [PATCH] Added manual tests for Issue 543. These tests are in addition to the existing functional tests for Issue 543.

---
 opends/tests/functional-tests/testcases/security/manual_tests/README_Issue543             |   53 +++++++++++++++++
 opends/tests/functional-tests/shared/data/security/manual_tests/admin_expire_account.ldif |   30 ++++++++++
 opends/tests/functional-tests/shared/data/security/manual_tests/security_startup.ldif     |   94 +++++++++++++++++++++++++++++++
 3 files changed, 177 insertions(+), 0 deletions(-)

diff --git a/opends/tests/functional-tests/shared/data/security/manual_tests/admin_expire_account.ldif b/opends/tests/functional-tests/shared/data/security/manual_tests/admin_expire_account.ldif
new file mode 100644
index 0000000..d3a943e
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/manual_tests/admin_expire_account.ldif
@@ -0,0 +1,30 @@
+# 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: uid=auser,ou=People,o=Security Tests,dc=example,dc=com
+changetype: modify
+replace: ds-pwp-account-expiration-time
+ds-pwp-account-expiration-time: 20070627124000-0500
+
diff --git a/opends/tests/functional-tests/shared/data/security/manual_tests/security_startup.ldif b/opends/tests/functional-tests/shared/data/security/manual_tests/security_startup.ldif
new file mode 100644
index 0000000..2ad406f
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/manual_tests/security_startup.ldif
@@ -0,0 +1,94 @@
+# 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 2007 Sun Microsystems, Inc.
+#
+
+dn: dc=example,dc=com
+dc: example
+objectclass: top
+objectclass: domain
+
+dn: o=Security Tests, dc=example,dc=com
+o: Security Tests
+objectclass: top
+objectclass: organization
+
+dn: ou=People, o=Security Tests, dc=example,dc=com
+objectclass: top
+objectclass: organizationalunit
+ou: People
+
+dn: uid=auser, ou=People, o=Security Tests, dc=example,dc=com
+cn: Aci User
+sn: User
+givenname: Aci
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Accounting
+ou: People
+l: Sunnyvale
+uid: auser
+mail: auser@example.com
+telephonenumber: +1 408 555 4798
+facsimiletelephonenumber: +1 408 555 9751
+roomnumber: 4612
+userpassword: SecurityRules
+
+dn: uid=scarter, ou=People, o=Security Tests, dc=example,dc=com
+cn: Sam Carter
+sn: Carter
+givenname: Sam
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Accounting
+ou: People
+l: Sunnyvale
+uid: scarter
+mail: scarter@example.com
+telephonenumber: +1 408 555 4798
+facsimiletelephonenumber: +1 408 555 9751
+roomnumber: 4612
+userpassword: sprain
+
+dn: uid=tmorris, ou=People, o=Security Tests, dc=example,dc=com
+cn: Ted Morris
+sn: Morris
+givenname: Ted
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Accounting
+ou: People
+l: Santa Clara
+uid: tmorris
+mail: tmorris@example.com
+telephonenumber: +1 408 555 9187
+facsimiletelephonenumber: +1 408 555 8473
+roomnumber: 4117
+userpassword: irrefutable
+
diff --git a/opends/tests/functional-tests/testcases/security/manual_tests/README_Issue543 b/opends/tests/functional-tests/testcases/security/manual_tests/README_Issue543
new file mode 100644
index 0000000..7a4e327
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/manual_tests/README_Issue543
@@ -0,0 +1,53 @@
+# 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 2007 Sun Microsystems, Inc.
+#
+
+Manual test for Issue 543, Account Expiration Support
+
+1.  Unzip and start OpenDS.
+
+2.  Add some entries (shared/data/security/manual_tests/security_startup.ldif).
+
+Note there is a user, uid=auser,ou=People,o=Security Tests,dc=example,dc=com
+which will search the entry, uid=scarter, ou=People, o=Security Tests, dc=example,dc=com.
+
+3.  The user, uid=auser, searches entry, uid=scarter. Successful.
+
+bash-3.00# /tmp/mikek/OpenDS-0.9.0-build004/bin/ldapsearch -T -h auseng013 -p 389 -D "uid=auser,ou=People,o=Security Tests,dc=example,dc=com" -w SecurityRules -b "uid=scarter,ou=People,o=Security Tests,dc=example,dc=com" "(objectclass=*)" uid
+dn: uid=scarter,ou=People,o=Security Tests,dc=example,dc=com
+uid: scarter
+
+4.  Get the current date and time. On Solaris, use the command, "date". Modify the ldif file, shared/data/security/manual_tests/admin_account_expiration.ldif, for about 5 minutes ahead of the current time.
+
+5.  Directory Manager adds the contents of shared/data/security/manual_tests/admin_account_expiration.ldif
+to OpenDS. This makes the user account for uid=auser expire in about 5 minutes.
+
+6.  Repeat step 3. Before the expiration time, the search should be successful. 
+
+After the expiration time, the following error should be obtained......
+
+bash-3.00# /tmp/mikek/OpenDS-0.9.0-build004/bin/ldapsearch -T -h auseng013 -p 389 -D "uid=auser,ou=People,o=Security Tests,dc=example,dc=com" -w SecurityRules -b "uid=scarter,ou=People,o=Security Tests,dc=example,dc=com" "(objectclass=*)" uid
+The simple bind attempt failed
+Result Code:  49 (Invalid Credentials)
+

--
Gitblit v1.10.0