| opends/tests/functional-tests/testcases/security/jks/security_bob_custom_jks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/security/jks/security_bob_jks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/security/jks/security_jks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/security/jks/security_setup_custom_jks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/security/jks/security_setup_jks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/security/jks/security_teardown_custom_jks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/security/jks/security_teardown_jks.xml | ●●●●● patch | view | raw | blame | history |
opends/tests/functional-tests/testcases/security/jks/security_bob_custom_jks.xml
New file @@ -0,0 +1,230 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../shared/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-2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="bob_custom_jks"/> <function name="bob_custom_jks"> <!--- Place suite-specific test information here. #@TestSuiteName JKS Tests #@TestSuitePurpose Perform ldap operations through a secure port using jks keystore #@TestSuiteGroup Security JKS Bob Tests #@TestScript security_bob_jks.xml --> <sequence> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/security/jks/security_setup_custom_jks.xml' % (TESTS_DIR)"/> <call function="'setup_custom_jks'" /> <!--- Test Case : Add Entries through SSL port --> <!--- Place test-specific test information here. The tag, TestMarker, must be the same as the tag, TestSuiteName. #@TestMarker JKS Tests #@TestName JKS Bob Test 1 #@TestIssue 413 #@TestPurpose Add entries through a secure port. #@TestPreamble none #@TestStep Client calls ldapmodify with the filename to the appropriate file to OpenDS through a secure port. #@TestPostamble none #@TestResult Success if OpenDS returns 0 --> <testcase name="getTestCaseName('Custom JKS - Add Entries')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'Security: JKS: Adding Entries Through SSL Port' </message> <call function="'addEntry'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'entryToBeAdded' : '%s/security/jks/jks_startup.ldif' % logsRemoteDataDir, 'extraParams' : '-Z -X' } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case : Modify Entry through SSL port --> <!--- Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker JKS Tests #@TestName JKS Bob Test 2 #@TestIssue 413 #@TestPurpose Add an RDN to an existing entry through a secure port. #@TestPreamble none #@TestStep Client calls ldapmodify with the filename to the appropriate file to OpenDS through a secure port. #@TestPostamble none #@TestResult Success if OpenDS returns 0 --> <testcase name="getTestCaseName('Custom JKS - Modify Entry')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'Security: JKS: Modifying Entry Through SSL Port' </message> <call function="'modifyEntry'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'entryToBeModified' : '%s/security/jks/modrdn/a1_modrdn.ldif' % logsRemoteDataDir , 'extraParams' : '-Z -X' } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case : Add Attribute to Entry through SSL port --> <!--- Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker JKS Tests #@TestName JKS Bob Test 3 #@TestIssue 413 #@TestPurpose Add a jpeg photo to an existing entry through a secure port. #@TestPreamble none #@TestStep Client calls ldapmodify with the filename to the appropriate file to OpenDS through a secure port. #@TestPostamble none #@TestResult Success if OpenDS returns 0 --> <testcase name="getTestCaseName('Custom JKS - Add Attr to Entry')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'Security: JKS: Adding Attr to Entry Through SSL Port' </message> <call function="'modifyEntry'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'entryToBeModified' : '%s/security/jks/add/bin_a1_in.ldif' % logsRemoteDataDir , 'extraParams' : '-Z -X' } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case : Modify Attribute in Entry through SSL port --> <!--- Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker JKS Tests #@TestName JKS Bob Test 4 #@TestIssue 413 #@TestPurpose Replace a jpeg photo in an existing entry through a secure port. #@TestPreamble none #@TestStep Client calls ldapmodify with the filename to the appropriate file to OpenDS through a secure port. #@TestPostamble none #@TestResult Success if OpenDS returns 0 --> <testcase name="getTestCaseName('Custom JKS - Modify Attr in Entry')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'Security: JKS: Modifying Attr in Entry Through SSL Port' </message> <call function="'modifyEntry'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'entryToBeModified' : '%s/security/jks/mod/bin_a1_mod.ldif' % logsRemoteDataDir , 'extraParams' : '-Z -X' } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case : Delete Entry through SSL port --> <!--- Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker JKS Tests #@TestName JKS Bob Test 5 #@TestIssue 413 #@TestPurpose Delete an existing entry through a secure port. #@TestPreamble none #@TestStep Client calls ldapmodify with the filename to the appropriate file to OpenDS through a secure port. #@TestPostamble none #@TestResult Success if OpenDS returns 0 --> <testcase name="getTestCaseName('Custom JKS - Delete Entry')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'Security: JKS: Deleting Entry Through SSL Port' </message> <call function="'modifyEntry'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'entryToBeModified' : '%s/security/jks/del/bin_a1_out.ldif' % logsRemoteDataDir , 'extraParams' : '-Z -X' } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/security/jks/security_teardown_custom_jks.xml' % (TESTS_DIR)"/> <call function="'teardown_custom_jks'" /> </sequence> </function> </stax> opends/tests/functional-tests/testcases/security/jks/security_bob_jks.xml
@@ -39,6 +39,10 @@ --> <sequence> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/security/jks/security_setup_jks.xml' % (TESTS_DIR)"/> <call function="'setup_jks'" /> <!--- Test Case : Add Entries through SSL port --> <!--- Place test-specific test information here. @@ -55,7 +59,7 @@ #@TestResult Success if OpenDS returns 0 --> <testcase name="getTestCaseName('Add Entries')"> <testcase name="getTestCaseName('JKS - Add Entries')"> <sequence> <call function="'testCase_Preamble'"/> <message> @@ -90,7 +94,7 @@ #@TestPostamble none #@TestResult Success if OpenDS returns 0 --> <testcase name="getTestCaseName('Modify Entry')"> <testcase name="getTestCaseName('JKS - Modify Entry')"> <sequence> <call function="'testCase_Preamble'"/> <message> @@ -125,7 +129,7 @@ #@TestPostamble none #@TestResult Success if OpenDS returns 0 --> <testcase name="getTestCaseName('Add Attr to Entry')"> <testcase name="getTestCaseName('JKS - Add Attr to Entry')"> <sequence> <call function="'testCase_Preamble'"/> <message> @@ -160,7 +164,7 @@ #@TestPostamble none #@TestResult Success if OpenDS returns 0 --> <testcase name="getTestCaseName('Modify Attr in Entry')"> <testcase name="getTestCaseName('JKS - Modify Attr in Entry')"> <sequence> <call function="'testCase_Preamble'"/> <message> @@ -195,7 +199,7 @@ #@TestPostamble none #@TestResult Success if OpenDS returns 0 --> <testcase name="getTestCaseName('Delete Entry')"> <testcase name="getTestCaseName('JKS - Delete Entry')"> <sequence> <call function="'testCase_Preamble'"/> <message> @@ -215,6 +219,10 @@ </sequence> </testcase> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/security/jks/security_teardown_jks.xml' % (TESTS_DIR)"/> <call function="'teardown_jks'" /> </sequence> </function> opends/tests/functional-tests/testcases/security/jks/security_jks.xml
@@ -53,19 +53,14 @@ <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/security/jks/security_setup_jks.xml' % (TESTS_DIR)"/> <call function="'setup_jks'" /> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/security/jks/security_bob_jks.xml' % (TESTS_DIR)"/> <call function="'bob_jks'" /> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/security/jks/security_teardown_jks.xml' % (TESTS_DIR)"/> <call function="'teardown_jks'" /> file="'%s/testcases/security/jks/security_bob_custom_jks.xml' % (TESTS_DIR)"/> <call function="'bob_custom_jks'" /> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/security/security_cleanup.xml' % (TESTS_DIR)"/> <call function="'security_cleanup'"/> opends/tests/functional-tests/testcases/security/jks/security_setup_custom_jks.xml
New file @@ -0,0 +1,134 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../shared/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-2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="setup_custom_jks"/> <function name="setup_custom_jks"> <!--- Place group-specific test information here. #@TestGroupName Security #@TestGroupPurpose To test the security functionality. #@TestSubgroupName JKS Keystore Place suite-specific test information here. #@TestSuiteName Setup Tests #@TestSuitePurpose Configure OpenDS to use JKS keystore and a secure port. #@TestSuiteGroup Security JKS Setup Tests #@TestScript security_setup_jks.xml --> <sequence> <!--- Test Case : JKS Setup --> <!--- Place test-specific test information here. The tag, TestMarker, must be the same as the tag, TestSuiteName. #@TestMarker Setup Tests #@TestName JKS Startup Test #@TestIssue 413 #@TestPurpose Setup OpenDS for JKS keystore. #@TestPreamble none #@TestStep Generate server certificate. #@TestStep Self-sign the server certificate. #@TestStep Configure JKS keystore. #@TestStep Test search with secure port. #@TestPostamble none #@TestResult Success if OpenDS returns 0 for all operations --> <!--- Generate Server Cert --> <testcase name="getTestCaseName('Custom JKS - Preamble Setup')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'Security: Custom JKS: Preamble Step 1. Generating Server Certicate' </message> <!-- create a server certificate --> <call function="'genCertificate'"> { 'certAlias' : 'server-cert' , 'dname' : "cn=client,O=Sun Microsystems,C=US", 'keystore' : 'keystore', 'storepass' : 'servercert', 'keypass' : 'servercert', 'storetype' : 'JKS' } </call> <!--- Self-Sign Server Cert --> <message> 'Security: Custom JKS: Preamble Step 2. Self-Signing Server Certificate' </message> <call function="'SelfSignCertificate'"> { 'certAlias' : 'server-cert' , 'storepass' : 'servercert', 'keypass' : 'servercert', 'keystore' : 'keystore', 'storetype' : 'JKS' } </call> <!--- Configure JKS Keystore --> <message> 'Security: Custom JKS: Preamble Step 3. Configuring JKS Keystore' </message> <call function="'configureSSL'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'customKeyMgr' : "Custom JKS" , 'customTrustMgr' : "Custom Bind Trust" } </call> <!--- Initial Search With SSL --> <message> 'Security: Custom JKS: Preamble Step 4. Searching with SSL Connection' </message> <call function="'SearchObject'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : 'dc=example,dc=com' , 'dsFilter' : 'objectclass=*' , 'extraParams' : '-Z -X' } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> </sequence> </function> </stax> opends/tests/functional-tests/testcases/security/jks/security_setup_jks.xml
@@ -61,7 +61,7 @@ #@TestResult Success if OpenDS returns 0 for all operations --> <!--- Generate Server Cert --> <testcase name="getTestCaseName('Preamble Setup')"> <testcase name="getTestCaseName('JKS - Preamble Setup')"> <sequence> <call function="'testCase_Preamble'"/> <message> opends/tests/functional-tests/testcases/security/jks/security_teardown_custom_jks.xml
New file @@ -0,0 +1,126 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../shared/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-2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="teardown_custom_jks"/> <function name="teardown_custom_jks"> <sequence> <!--- Test Case : JKS Teardown --> <!--- Place suite-specific test information here. #@TestSuiteName Teardown Tests #@TestSuitePurpose Unconfigure JKS keystore and the secure port. #@TestSuiteGroup Security JKS Teardown Tests #@TestScript security_teardown_jks.xml --> <!--- Delete Branch through SSL port --> <testcase name="getTestCaseName('Custom JKS - Postamble Reset')"> <!--- Place test-specific test information here. The tag, TestMarker, must be the same as the tag, TestSuiteName. #@TestMarker Teardown Tests #@TestName JKS Teardown Test #@TestIssue 413 #@TestPurpose Unconfigure JKS keystore. #@TestPreamble none #@TestStep Delete entries that were used for the JKS tests. #@TestStep Unconfigure JKS keystore. #@TestStep Remove JKS keystore. #@TestStep Test search with unsecure port. #@TestPostamble none #@TestResult Success if OpenDS returns 0 for all operations --> <sequence> <call function="'testCase_Preamble'"/> <message> 'Security: Custom JKS: Postamble Step 1. Deleting Branch Through SSL Port' </message> <call function="'DeleteEntry'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : 'o=SSL Tests,dc=example,dc=com' , 'extraParams' : '-Z -X -x' } </call> <message> 'Security: Custom JKS: Postamble Step 2. Deleting Custom JKS' </message> <call function="'unconfigureSSL'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'customKeyMgr' : "Custom JKS" , 'customTrustMgr' : "Custom Bind Trust" } </call> <!--- Remove JKS Keystore --> <message> 'Security: Custom JKS: Postamble Step 3. Removing JKS Keystore' </message> <call function="'deleteFile'"> { 'location' : STAF_REMOTE_HOSTNAME, 'filename' : '%s/../config/keystore' % OPENDS_BINPATH } </call> <call function="'checkRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <!--- Search With Unsecure Port --> <message> 'Security: Custom JKS: Postamble Step 4. Searching with Unsecure Connection' </message> <call function="'SearchObject'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : 'dc=example,dc=com' , 'dsFilter' : 'objectclass=*' } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> </sequence> </function> </stax> opends/tests/functional-tests/testcases/security/jks/security_teardown_jks.xml
@@ -42,7 +42,7 @@ #@TestScript security_teardown_jks.xml --> <!--- Delete Branch through SSL port --> <testcase name="getTestCaseName('Postamble Reset')"> <testcase name="getTestCaseName('JKS - Postamble Reset')"> <!--- Place test-specific test information here. The tag, TestMarker, must be the same as the tag, TestSuiteName.