security_bob_pkcs12.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="bob_pkcs12"/>
<function name="bob_pkcs12">
<!---
Place suite-specific test information here.
#@TestSuiteName PKCS12 Tests
#@TestSuitePurpose Perform ldap operations through a secure port using pkcs12 keystore
#@TestSuiteGroup Security PKCS12 Bob Tests
#@TestScript security_bob_pkcs12.xml
-->
<sequence>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker PKCS12 Tests
#@TestName PKCS12 Bob Test 1
#@TestIssue 414
#@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('Add Entries')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: PKCS12: 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/pkcs12/pkcs12_startup.ldif' % remote.data,
'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, must be the same as the tag, TestSuiteName.
#@TestMarker PKCS12 Tests
#@TestName PKCS12 Bob Test 2
#@TestIssue 414
#@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('Modify Entry')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: PKCS12: 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/pkcs12/modrdn/a1_modrdn.ldif' % remote.data ,
'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, must be the same as the tag, TestSuiteName.
#@TestMarker PKCS12 Tests
#@TestName PKCS12 Bob Test 3
#@TestIssue 414
#@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('Add Attr to Entry')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: PKCS12: 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/pkcs12/add/bin_a1_in.ldif' % remote.data ,
'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, must be the same as the tag, TestSuiteName.
#@TestMarker PKCS12 Tests
#@TestName PKCS12 Bob Test 4
#@TestIssue 414
#@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('Modify Attr in Entry')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: PKCS12: 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/pkcs12/mod/bin_a1_mod.ldif' % remote.data ,
'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, must be the same as the tag, TestSuiteName.
#@TestMarker PKCS12 Tests
#@TestName PKCS12 Bob Test 5
#@TestIssue 414
#@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('Delete Entry')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: PKCS12: 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/pkcs12/del/bin_a1_out.ldif' % remote.data ,
'extraParams' : '-Z -X' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case : List propeties using dsconfig through SSL port -->
<!---
Place test-specific test information here.
The tag, TestMarker, be the same as the marker, TestSuiteName.
#@TestMarker PKCS12 Tests
#@TestName PKCS12 Bob Test 6
#@TestIssue 1830
#@TestPurpose List properties using dsconfig.
#@TestPreamble none
#@TestStep Client calls dsconfig
to list ldaps connection handler properties.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
-->
<testcase name="getTestCaseName('List LDAPS Conn Handler Props')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: PKCS12: Listing LDAPS Connection Handler Properties'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'get-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'LDAPS Connection Handler',
'optionsString' : '-Z -X',
'expectedRC' : 0
}
</call>
</sequence>
</testcase>
</sequence>
</function>
</stax>