security_setup_jks.xml revision d81978a0815d5b8a75633c35e3e1f8708d36f017
<?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
!
! Copyright 2006-2008 Sun Microsystems, Inc.
! -->
<stax>
<defaultcall function="setup_jks"/>
<function name="setup_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('JKS - Preamble Setup')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: 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: 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: 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 }
</call>
<!--- Initial Search With SSL -->
<message>
'Security: 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>