clus_ssl_ldapdelete.xml revision 6031e9c7eb72435516a6828deb2e97533ed0382d
<?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 2010 Sun Microsystems, Inc.
! -->
<stax>
<defaultcall function="clus_ssl_ldapdelete"/>
<function name="clus_ssl_ldapdelete" scope="local">
<sequence>
<block name="'clus_ssl_ldapdelete'">
<sequence>
<!--- Test Suite information
#@TestSuiteName SSL ldapdelete check behaviors
#@TestSuitePurpose Test the result of SSL ldapdelete command
#@TestSuiteGroup ldapdelete check behavior tests
#@TestScript clus_ssl_ldapdelete.xml
-->
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group'] = 'clu_secure'
CurrentTestPath['suite'] = STAXCurrentBlock
</script>
<call function="'testSuite_Preamble'"/>
<!--- Test Case information
#@TestMarker SSL ldapdelete check behaviors
#@TestName ldapdelete: delete an entry
#@TestIssue none
#@TestPurpose Test ldapdelete with correct options
when client trust all server certificates .
#@TestPreamble none
#@TestStep Check using ldapsearch that "uid=user.400"
entry is present.
#@TestStep Delete this entry using ldapdelete.
#@TestStep Check using ldapsearch that this entry is no
more present.
#@TestPostamble none
#@TestResult Success if the "uid=user.400" entry is deleted.
-->
<testcase name="getTestCaseName ('SSL server blind trust : ldapdelete successful')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: SSL Check behaviors: ldapdelete, client trustall server cert'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsCountEntries' : 'True' ,
'dsUseSSL' : ' ' ,
'dsTrustAll' : ' ' ,
'dsBaseDN' : 'dc=com' ,
'dsFilter' : 'uid=user.400' ,
'expectedRC' : 'noCheck'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{
'returnString' : returnString ,
'expectedString' : 'Total number of matching entries: 1'
}
</call>
<call function="'ldapDeleteWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsUseSSL' : ' ' ,
'dsTrustAll' : ' ' ,
'dsDn' : ['uid=user.400,ou=people,dc=com']
}
</call>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsCountEntries' : 'True' ,
'dsUseSSL' : ' ' ,
'dsTrustAll' : ' ' ,
'dsBaseDN' : 'dc=com' ,
'dsFilter' : 'uid=user.400' ,
'expectedRC' : 'noCheck'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{
'returnString' : returnString ,
'expectedString' : 'Total number of matching entries: 0'
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker SSL ldapdelete check behaviors
#@TestName Client use TrustStore file : ldapdelete successful
#@TestIssue none
#@TestPurpose Test ldapdelete with correct options
when client uses a TrustStore file.
#@TestPreamble none
#@TestStep Check using ldapsearch that "uid=user.401"
entry is present.
#@TestStep Delete this entry using ldapdelete.
#@TestStep Check using ldapsearch that this entry is no
more present.
#@TestPostamble none
#@TestResult Success if the "uid=user.401" entry is deleted.
-->
<testcase name="getTestCaseName ('Client use TrustStore file : ldapdelete successful')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: SSL Check behaviors: ldapdelete, client TrustStore file'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsCountEntries' : 'True' ,
'dsUseSSL' : ' ' ,
'dsTrustStorePath' : '%s/client_cert/clientruststore' \
%InstanceInstallDir,
'dsTrustStorePassword': 'clientruststorepass',
'dsBaseDN' : 'dc=com' ,
'dsFilter' : 'uid=user.401' ,
'expectedRC' : 'noCheck'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{
'returnString' : returnString ,
'expectedString' : 'Total number of matching entries: 1'
}
</call>
<call function="'ldapDeleteWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsUseSSL' : ' ' ,
'dsTrustStorePath' : '%s/client_cert/clientruststore' \
%InstanceInstallDir,
'dsTrustStorePassword': 'clientruststorepass',
'dsDn' : ['uid=user.401,ou=people,dc=com']
}
</call>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsCountEntries' : 'True' ,
'dsUseSSL' : ' ' ,
'dsTrustStorePath' : '%s/client_cert/clientruststore' \
%InstanceInstallDir,
'dsTrustStorePassword': 'clientruststorepass',
'dsBaseDN' : 'dc=com' ,
'dsFilter' : 'uid=user.401' ,
'expectedRC' : 'noCheck'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{
'returnString' : returnString ,
'expectedString' : 'Total number of matching entries: 0'
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<call function="'testSuite_Postamble'"/>
</sequence>
</block>
</sequence>
</function>
</stax>