security_sasl_anon.xml revision d25372dc8e65a9ed019a88fdf659ca61313f1b31
<?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 2008 Sun Microsystems, Inc.
! -->
<stax>
<defaultcall function="sasl_anon"/>
<function name="sasl_anon">
<!---
Place suite-specific test information here.
#@TestSuiteName SASL ANONYMOUS Tests
#@TestSuitePurpose Test the SASL ANONYMOUS functionality.
#@TestSuiteGroup SASL ANONYMOUS Tests
#@TestScript security_sasl_anon.xml
-->
<sequence>
<!--- Test case: Admin Enable ANONYMOUS SASL Mechanism -->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker SASL ANONYMOUS Tests
#@TestName SASL ANONYMOUS Preamble
#@TestIssue 351
#@TestPurpose Prepare for SASL ANONYMOUS tests.
#@TestPreamble none
#@TestStep Admin enable SASL ANONYMOUS mechanism.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0.
-->
<testcase name="getTestCaseName('ANONYMOUS - Preamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: SASL ANON: Preamble - Admin Enabling ANONYMOUS SASL'
</message>
<call function="'modifySaslMech'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'handlerName' : 'ANONYMOUS' ,
'propertyName' : 'enabled' ,
'propertyValue' : 'true' }
</call>
<!--
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/security/sasl/admin_enable_sasl_anon.ldif' % remote.data }
</call>
-->
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case : Anonymous Bind Using ANONYMOUS SASL Mechanism-->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker SASL ANONYMOUS Tests
#@TestName Anonymous bind
#@TestIssue 351
#@TestPurpose Test anonymous bind.
#@TestPreamble none
#@TestStep Anonymous bind to OpenDS.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0.
-->
<testcase name="getTestCaseName('ANONYMOUS - Anonymous Bind With ANON SASL Mech')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: SASL ANON: Anonymous Bind With ANONYMOUS SASL Mechanism'
</message>
<call function="'AnonSearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-o mech=ANONYMOUS -o trace=Trace -s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test case: Admin Disable ANONYMOUS SASL Mechanism -->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker SASL ANONYMOUS Tests
#@TestName SASL ANONYMOUS Postamble
#@TestIssue 351
#@TestPurpose Reset configuration.
#@TestPreamble none
#@TestStep Admin disable SASL ANONYMOUS mechanism.
#@TestStep Anonymous bind to OpenDS.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for step 1 and returns 7 for step 2.
-->
<testcase name="getTestCaseName('ANONYMOUS - Postamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: SASL ANON: Postamble - Admin Disabling ANONYMOUS SASL'
</message>
<call function="'modifySaslMech'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'handlerName' : 'ANONYMOUS' ,
'propertyName' : 'enabled' ,
'propertyValue' : 'false' }
</call>
<!--
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/security/sasl/admin_disable_sasl_anon.ldif' % remote.data }
</call>
-->
<message>
'Security: SASL ANON: Anonymous Bind After ANONYMOUS SASL Mechanism Disabled'
</message>
<call function="'AnonSearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-o mech=ANONYMOUS -o trace=Trace -s base' ,
'expectedRC' : 7 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
</sequence>
</function>
</stax>