5065N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5065N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
5065N/A<!--
5065N/A ! CDDL HEADER START
5065N/A !
5065N/A ! The contents of this file are subject to the terms of the
5065N/A ! Common Development and Distribution License, Version 1.0 only
5065N/A ! (the "License"). You may not use this file except in compliance
5065N/A ! with the License.
5065N/A !
5065N/A ! You can obtain a copy of the license at
5065N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
5065N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
5065N/A ! See the License for the specific language governing permissions
5065N/A ! and limitations under the License.
5065N/A !
5065N/A ! When distributing Covered Code, include this CDDL HEADER in each
5065N/A ! file and include the License file at
5065N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
5065N/A ! add the following below this CDDL HEADER, with the fields enclosed
5065N/A ! by brackets "[]" replaced with your own identifying information:
5065N/A ! Portions Copyright [yyyy] [name of copyright owner]
5065N/A !
5065N/A ! CDDL HEADER END
5065N/A !
5065N/A ! Copyright 2010 Sun Microsystems, Inc.
5065N/A ! -->
5065N/A<stax>
5065N/A
5065N/A <defaultcall function="clus_starttls_ldapdelete"/>
5065N/A
5065N/A <function name="clus_starttls_ldapdelete" scope="local">
5065N/A
5065N/A <sequence>
5065N/A
5065N/A <block name="'clus_starttls_ldapdelete'">
5065N/A
5065N/A <sequence>
5065N/A
5065N/A <!--- Test Suite information
5065N/A #@TestSuiteName StartTLS ldapdelete check behavior tests
5065N/A #@TestSuitePurpose Test the results of the StartTLS ldapdelete command.
5065N/A #@TestSuiteGroup ldapdelete check behavior tests
5065N/A #@TestScript clus_startTLS_ldapdelete.xml
5065N/A -->
5065N/A <script>
5065N/A if not CurrentTestPath.has_key('group'):
5065N/A CurrentTestPath['group'] = 'clu_secure'
5065N/A CurrentTestPath['suite'] = STAXCurrentBlock
5065N/A </script>
5065N/A
5065N/A
5065N/A <call function="'testSuite_Preamble'"/>
5065N/A
5065N/A <!--- Test Case information
5065N/A #@TestMarker StartTLS ldapdelete check behavior tests
5065N/A #@TestName ldapdelete: delete an entry
5065N/A #@TestIssue none
5065N/A #@TestPurpose Test ldapdelete with correct options
5065N/A when client trust all server certificates .
5065N/A #@TestPreamble none
5065N/A #@TestStep Check using ldapsearch that "uid=user.410"
5065N/A entry is present.
5065N/A #@TestStep Delete this entry using ldapdelete.
5065N/A #@TestStep Check using ldapsearch that this entry is no
5065N/A more present.
5065N/A #@TestPostamble none
5065N/A #@TestResult Success if the "uid=user.410" entry is deleted.
5065N/A -->
5065N/A <testcase name="getTestCaseName
5065N/A ('StartTLS server blind trust : ldapdelete successful')">
5065N/A
5065N/A <sequence>
5065N/A
5065N/A <call function="'testCase_Preamble'"/>
5065N/A
5065N/A <message>
5065N/A 'Security: StartTLS Check behaviors: ldapdelete, client trustall \
5065N/A server cert'
5065N/A </message>
5065N/A
5065N/A <call function="'ldapSearchWithScript'">
5065N/A {
5065N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5065N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5065N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
5065N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
5065N/A 'dsCountEntries' : 'True' ,
5065N/A 'dsUseStartTLS' : ' ' ,
5065N/A 'dsTrustAll' : ' ' ,
5065N/A 'dsBaseDN' : 'dc=com' ,
5065N/A 'dsFilter' : 'uid=user.410' ,
5065N/A 'expectedRC' : 'noCheck'
5065N/A }
5065N/A </call>
5065N/A
5065N/A <script>
5065N/A returnString = STAXResult[0][1]
5065N/A </script>
5065N/A <call function="'checktestString'">
5065N/A {
5065N/A 'returnString' : returnString ,
5065N/A 'expectedString' : 'Total number of matching entries: 1'
5065N/A }
5065N/A </call>
5065N/A
5065N/A <call function="'ldapDeleteWithScript'">
5065N/A {
5065N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5065N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5065N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
5065N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
5065N/A 'dsUseStartTLS' : ' ' ,
5065N/A 'dsTrustAll' : ' ' ,
5065N/A 'dsDn' : ['uid=user.410,ou=people,dc=com']
5065N/A }
5065N/A </call>
5065N/A
5065N/A <call function="'ldapSearchWithScript'">
5065N/A {
5065N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5065N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5065N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
5065N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
5065N/A 'dsCountEntries' : 'True' ,
5065N/A 'dsUseStartTLS' : ' ' ,
5065N/A 'dsTrustAll' : ' ' ,
5065N/A 'dsBaseDN' : 'dc=com' ,
5065N/A 'dsFilter' : 'uid=user.410' ,
5065N/A 'expectedRC' : 'noCheck'
5065N/A }
5065N/A </call>
5065N/A
5065N/A <script>
5065N/A returnString = STAXResult[0][1]
5065N/A </script>
5065N/A <call function="'checktestString'">
5065N/A {
5065N/A 'returnString' : returnString ,
5065N/A 'expectedString' : 'Total number of matching entries: 0'
5065N/A }
5065N/A </call>
5065N/A
5065N/A <call function="'testCase_Postamble'"/>
5065N/A
5065N/A </sequence>
5065N/A
5065N/A </testcase>
5065N/A
5065N/A <!--- Test Case information
5065N/A #@TestMarker StartTLS ldapdelete check behavior tests
5065N/A #@TestName Client use TrustStore file : ldapdelete
5065N/A successful
5065N/A #@TestIssue none
5065N/A #@TestPurpose Test ldapdelete with correct options
5065N/A when client uses a TrustStore file.
5065N/A #@TestPreamble none
5065N/A #@TestStep Check using ldapsearch that "uid=user.411"
5065N/A entry is present.
5065N/A #@TestStep Delete this entry using ldapdelete.
5065N/A #@TestStep Check using ldapsearch that this entry is no
5065N/A more present.
5065N/A #@TestPostamble none
5065N/A #@TestResult Success if the "uid=user.411" entry is deleted.
5065N/A -->
5065N/A <testcase name="getTestCaseName ('Client use TrustStore file : ldapdelete successful')">
5065N/A
5065N/A <sequence>
5065N/A
5065N/A <call function="'testCase_Preamble'"/>
5065N/A
5065N/A <message>
5065N/A 'Security: StartTLS Check behaviors: ldapdelete, client trust \
5065N/A store file'
5065N/A </message>
5065N/A
5065N/A <call function="'ldapSearchWithScript'">
5065N/A {
5065N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5065N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5065N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
5065N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
5065N/A 'dsCountEntries' : 'True' ,
5065N/A 'dsUseStartTLS' : ' ' ,
5065N/A 'dsTrustStorePath' : '%s/client_cert/clientruststore' \
5065N/A % InstanceInstallDir,
5065N/A 'dsTrustStorePassword': 'clientruststorepass',
5065N/A 'dsBaseDN' : 'dc=com' ,
5065N/A 'dsFilter' : 'uid=user.411' ,
5065N/A 'expectedRC' : 'noCheck'
5065N/A }
5065N/A </call>
5065N/A
5065N/A <script>
5065N/A returnString = STAXResult[0][1]
5065N/A </script>
5065N/A <call function="'checktestString'">
5065N/A {
5065N/A 'returnString' : returnString ,
5065N/A 'expectedString' : 'Total number of matching entries: 1'
5065N/A }
5065N/A </call>
5065N/A
5065N/A <call function="'ldapDeleteWithScript'">
5065N/A {
5065N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5065N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5065N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
5065N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
5065N/A 'dsUseStartTLS' : ' ' ,
5065N/A 'dsTrustStorePath' : '%s/client_cert/clientruststore' \
5065N/A % InstanceInstallDir,
5065N/A 'dsTrustStorePassword': 'clientruststorepass',
5065N/A 'dsDn' : ['uid=user.411,ou=people,dc=com']
5065N/A }
5065N/A </call>
5065N/A
5065N/A <call function="'ldapSearchWithScript'">
5065N/A {
5065N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5065N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5065N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
5065N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
5065N/A 'dsCountEntries' : 'True' ,
5065N/A 'dsUseStartTLS' : ' ' ,
5065N/A 'dsTrustStorePath' : '%s/client_cert/clientruststore' \
5065N/A % InstanceInstallDir,
5065N/A 'dsTrustStorePassword': 'clientruststorepass',
5065N/A 'dsBaseDN' : 'dc=com' ,
5065N/A 'dsFilter' : 'uid=user.411' ,
5065N/A 'expectedRC' : 'noCheck'
5065N/A }
5065N/A </call>
5065N/A
5065N/A <script>
5065N/A returnString = STAXResult[0][1]
5065N/A </script>
5065N/A <call function="'checktestString'">
5065N/A {
5065N/A 'returnString' : returnString ,
5065N/A 'expectedString' : 'Total number of matching entries: 0'
5065N/A }
5065N/A </call>
5065N/A
5065N/A <call function="'testCase_Postamble'"/>
5065N/A
5065N/A </sequence>
5065N/A
5065N/A </testcase>
5065N/A
5065N/A
5065N/A <call function="'testSuite_Postamble'"/>
5065N/A
5065N/A </sequence>
5065N/A
5065N/A </block>
5065N/A
5065N/A </sequence>
5065N/A
5065N/A </function>
5065N/A
5065N/A</stax>
5065N/A
5065N/A