2224N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2887N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
2224N/A<!--
2224N/A ! CDDL HEADER START
2224N/A !
2224N/A ! The contents of this file are subject to the terms of the
2224N/A ! Common Development and Distribution License, Version 1.0 only
2224N/A ! (the "License"). You may not use this file except in compliance
2224N/A ! with the License.
2224N/A !
2224N/A ! You can obtain a copy of the license at
2224N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
2224N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
2224N/A ! See the License for the specific language governing permissions
2224N/A ! and limitations under the License.
2224N/A !
2224N/A ! When distributing Covered Code, include this CDDL HEADER in each
2224N/A ! file and include the License file at
2224N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
2224N/A ! add the following below this CDDL HEADER, with the fields enclosed
2224N/A ! by brackets "[]" replaced with your own identifying information:
2224N/A ! Portions Copyright [yyyy] [name of copyright owner]
2224N/A !
2224N/A ! CDDL HEADER END
2224N/A !
3232N/A ! Copyright 2008 Sun Microsystems, Inc.
6184N/A ! Portions Copyright 2013 ForgeRock AS
2224N/A ! -->
2224N/A<stax>
2224N/A
2224N/A <defaultcall function="sasl_new"/>
2224N/A
2224N/A <function name="sasl_new">
2224N/A <!---
2224N/A Place suite-specific test information here.
2224N/A #@TestSuiteName SASL New Tests
2224N/A #@TestSuitePurpose Test the SASL PLAIN functionality.
2224N/A #@TestSuiteGroup SASL New Tests
2224N/A #@TestScript security_sasl_plain.xml
2224N/A -->
2224N/A <sequence>
2224N/A
2224N/A <!--- Test case: New SASL Mechanism -->
2224N/A <!---
2224N/A Place test-specific test information here.
2224N/A The tag, TestMarker, must be the same as the tag, TestSuiteName.
2224N/A #@TestMarker SASL New Tests
2224N/A #@TestName SASL New Preamble
6184N/A #@TestIssue none
2224N/A #@TestPurpose Prepare for SASL New tests.
2224N/A #@TestPreamble none
2224N/A #@TestStep User change his password.
2224N/A #@TestPostamble none
2224N/A #@TestResult Success if OpenDS returns 0
2224N/A for all ldap operations.
2224N/A -->
2224N/A <testcase name="getTestCaseName('New Sasl Mech - Preamble')">
2224N/A <sequence>
2224N/A <call function="'testCase_Preamble'"/>
2224N/A <message>
2224N/A 'Security: SASL New: Preamble - Admin Changing User Password'
2224N/A </message>
2224N/A
2224N/A <call function="'modifyAnAttribute'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2224N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2224N/A 'DNToModify' : 'uid=dmiller, ou=People, o=SASL Tests, dc=example,dc=com' ,
2224N/A 'attributeName' : 'userpassword' ,
2224N/A 'newAttributeValue' : 'mothergoose' ,
2224N/A 'changetype' : 'replace' }
2224N/A </call>
2224N/A
2224N/A <call function="'modifyAnAttribute'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2224N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2224N/A 'DNToModify' : 'uid=mmiller, ou=People, o=SASL Tests, dc=example,dc=com' ,
2224N/A 'attributeName' : 'userpassword' ,
2224N/A 'newAttributeValue' : 'mothergoose' ,
2224N/A 'changetype' : 'replace' }
2224N/A </call>
2224N/A
2224N/A <message>
2224N/A 'Security: SASL New: Preamble - Admin deleting SHA-1 sasl mechanism handler'
2224N/A </message>
2224N/A
2224N/A <call function="'dsconfig'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
2224N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2224N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2224N/A 'subcommand' : 'delete-sasl-mechanism-handler' ,
2224N/A 'objectType' : 'handler-name' ,
2224N/A 'objectName' : 'PLAIN',
2224N/A 'expectedRC' : 0 }
2224N/A </call>
2224N/A
2224N/A <message>
2224N/A 'Security: SASL New: Preamble - User Binding'
2224N/A </message>
2224N/A
2224N/A <call function="'AnonSearchObject'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsBaseDN' : 'dc=example,dc=com' ,
2224N/A 'dsFilter' : 'objectclass=*' ,
2224N/A 'extraParams' : '-o mech=PLAIN -o authid=u:mmiller -w mothergoose' ,
2224N/A 'expectedRC' : 7 }
2224N/A </call>
2224N/A
2224N/A
2224N/A <message>
2224N/A 'Security: SASL New: Preamble - Admin creating new sasl mechanism handler'
2224N/A </message>
2224N/A
2224N/A <call function="'dsconfig'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
2224N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2224N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2224N/A 'subcommand' : 'create-sasl-mechanism-handler' ,
2224N/A 'objectType' : 'handler-name' ,
2224N/A 'objectName' : 'PLAIN',
2624N/A 'optionsString' : '--type plain --set enabled:true --set "identity-mapper:Exact Match" ',
2224N/A 'expectedRC' : 0 }
2224N/A </call>
2224N/A
2224N/A <call function="'testCase_Postamble'"/>
2224N/A
2224N/A </sequence>
2224N/A </testcase>
2224N/A
2224N/A <!--- Test Case : User Bind With New SASL Mechanism-->
2224N/A <!---
2224N/A Place test-specific test information here.
2224N/A The tag, TestMarker, must be the same as the tag, TestSuiteName.
2224N/A #@TestMarker SASL New Tests
2224N/A #@TestName uid (u:) Bind
6184N/A #@TestIssue none
2224N/A #@TestPurpose Test bind using an authorization ID that could be mapped to a single DN.
2224N/A #@TestPreamble none
2224N/A #@TestStep User bind with authid=u:[name] format.
2224N/A #@TestPostamble none
2224N/A #@TestResult Success if OpenDS returns 0.
2224N/A -->
2224N/A <testcase name="getTestCaseName('New Sasl Mech - User (u:) Binding')">
2224N/A <sequence>
2224N/A <call function="'testCase_Preamble'"/>
2224N/A <message>
2224N/A 'Security: SASL New: User Binding'
2224N/A </message>
2224N/A
2224N/A <call function="'AnonSearchObject'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsBaseDN' : 'dc=example,dc=com' ,
2224N/A 'dsFilter' : 'objectclass=*' ,
2224N/A 'extraParams' : '-o mech=PLAIN -o authid=u:mmiller -w mothergoose' }
2224N/A </call>
2224N/A
2224N/A
2224N/A <call function="'testCase_Postamble'"/>
2224N/A
2224N/A </sequence>
2224N/A </testcase>
2224N/A
2224N/A <!--- Test Case : User Bind With New SASL Mechanism-->
2224N/A <!---
2224N/A Place test-specific test information here.
2224N/A The tag, TestMarker, must be the same as the tag, TestSuiteName.
2224N/A #@TestMarker SASL New Tests
2224N/A #@TestName uid Bind
6184N/A #@TestIssue none
2224N/A #@TestPurpose Test bind using an authorization ID that could be mapped to a single DN.
2224N/A #@TestPreamble none
2224N/A #@TestStep User bind with authid=[name] format.
2224N/A #@TestPostamble none
2224N/A #@TestResult Success if OpenDS returns 0.
2224N/A -->
2224N/A <testcase name="getTestCaseName('New Sasl Mech - User Binding')">
2224N/A <sequence>
2224N/A <call function="'testCase_Preamble'"/>
2224N/A <message>
2224N/A 'Security: SASL New: User Binding'
2224N/A </message>
2224N/A
2224N/A <call function="'AnonSearchObject'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsBaseDN' : 'dc=example,dc=com' ,
2224N/A 'dsFilter' : 'objectclass=*' ,
2224N/A 'extraParams' : '-o mech=PLAIN -o authid=mmiller -w mothergoose' }
2224N/A </call>
2224N/A
2224N/A <call function="'testCase_Postamble'"/>
2224N/A
2224N/A </sequence>
2224N/A </testcase>
2224N/A
2224N/A <!--- Test Case : User Bind With New SASL Mechanism-->
2224N/A <!---
2224N/A Place test-specific test information here.
2224N/A The tag, TestMarker, must be the same as the tag, TestSuiteName.
2224N/A #@TestMarker SASL New Tests
2224N/A #@TestName uid (dn:) Bind
6184N/A #@TestIssue none
2224N/A #@TestPurpose Test bind using a DN that has an authorization ID that could be mapped to a single DN.
2224N/A #@TestPreamble none
2224N/A #@TestStep User bind with authid=dn:[name] format.
2224N/A #@TestPostamble none
2224N/A #@TestResult Success if OpenDS returns 0.
2224N/A -->
2224N/A <testcase name="getTestCaseName('New Sasl Mech - User (dn:) Binding')">
2224N/A <sequence>
2224N/A <call function="'testCase_Preamble'"/>
2224N/A <message>
2224N/A 'Security: SASL New: User Binding'
2224N/A </message>
2224N/A
2224N/A <call function="'AnonSearchObject'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsBaseDN' : 'dc=example,dc=com' ,
2224N/A 'dsFilter' : 'objectclass=*' ,
2224N/A 'extraParams' : '-o mech=PLAIN -o "authid=dn:uid=mmiller,ou=People,o=SASL Tests,dc=example,dc=com" -w mothergoose' }
2224N/A </call>
2224N/A
2224N/A <call function="'testCase_Postamble'"/>
2224N/A
2224N/A </sequence>
2224N/A </testcase>
2224N/A
2224N/A <!--- Test Case : User Bind With New SASL Mechanism-->
2224N/A <!---
2224N/A Place test-specific test information here.
2224N/A The tag, TestMarker, must be the same as the tag, TestSuiteName.
2224N/A #@TestMarker SASL New Tests
2224N/A #@TestName Dupe uid (u:) Bind
6184N/A #@TestIssue none
2224N/A #@TestPurpose Test bind using an authorization ID that could be mapped to multiple DNs.
2224N/A #@TestPreamble none
2224N/A #@TestStep User bind with authid=u:[name] format.
2224N/A #@TestPostamble none
2224N/A #@TestResult Success if OpenDS returns 49.
2224N/A -->
2224N/A <testcase name="getTestCaseName('New Sasl Mech - User With Duplicate uid (u:) Binding')">
2224N/A <sequence>
2224N/A <call function="'testCase_Preamble'"/>
2224N/A <message>
2224N/A 'Security: SASL New: User Binding'
2224N/A </message>
2224N/A
2224N/A <call function="'AnonSearchObject'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsBaseDN' : 'dc=example,dc=com' ,
2224N/A 'dsFilter' : 'objectclass=*' ,
2224N/A 'extraParams' : '-o mech=PLAIN -o authid=u:dmiller -w mothergoose' ,
2224N/A 'expectedRC' : 49 }
2224N/A </call>
2224N/A
2224N/A <call function="'testCase_Postamble'"/>
2224N/A
2224N/A </sequence>
2224N/A </testcase>
2224N/A
2224N/A <!--- Test Case : User Bind With New SASL Mechanism-->
2224N/A <!---
2224N/A Place test-specific test information here.
2224N/A The tag, TestMarker, must be the same as the tag, TestSuiteName.
2224N/A #@TestMarker SASL New Tests
2224N/A #@TestName Dupe uid (dn:) Bind
6184N/A #@TestIssue none
2224N/A #@TestPurpose Test bind using a DN that has an authorization ID that could be mapped to multiple DNs.
2224N/A #@TestPreamble none
2224N/A #@TestStep User bind with authid=dn:[name] format.
2224N/A #@TestPostamble none
2224N/A #@TestResult Success if OpenDS returns 0.
2224N/A -->
2224N/A <testcase name="getTestCaseName('New Sasl Mech - User With Duplicate uid (dn:) Binding')">
2224N/A <sequence>
2224N/A <call function="'testCase_Preamble'"/>
2224N/A <message>
2224N/A 'Security: SASL New: User Binding'
2224N/A </message>
2224N/A
2224N/A <call function="'AnonSearchObject'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsBaseDN' : 'dc=example,dc=com' ,
2224N/A 'dsFilter' : 'objectclass=*' ,
2224N/A 'extraParams' : '-o mech=PLAIN -o "authid=dn:uid=dmiller,ou=People,o=SASL Tests,dc=example,dc=com" -w mothergoose' }
2224N/A </call>
2224N/A
2224N/A <call function="'testCase_Postamble'"/>
2224N/A
2224N/A </sequence>
2224N/A </testcase>
2224N/A
2224N/A <!--- Test Case : User Bind With New SASL Mechanism-->
2224N/A <!---
2224N/A Place test-specific test information here.
2224N/A The tag, TestMarker, must be the same as the tag, TestSuiteName.
2224N/A #@TestMarker SASL New Tests
2224N/A #@TestName Dupe uid Bind
6184N/A #@TestIssue none
2224N/A #@TestPurpose Test bind using a DN that has an authorization ID that could be mapped to multiple DNs.
2224N/A #@TestPreamble none
2224N/A #@TestStep User bind with authid=[dn] format.
2224N/A #@TestPostamble none
2224N/A #@TestResult Success if OpenDS returns 49.
2224N/A -->
2224N/A <testcase name="getTestCaseName('New Sasl Mech - User With Duplicate uid Binding')">
2224N/A <sequence>
2224N/A <call function="'testCase_Preamble'"/>
2224N/A <message>
2224N/A 'Security: SASL New: User Binding'
2224N/A </message>
2224N/A
2224N/A <call function="'AnonSearchObject'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsBaseDN' : 'dc=example,dc=com' ,
2224N/A 'dsFilter' : 'objectclass=*' ,
2224N/A 'extraParams' : '-o mech=PLAIN -o "authid=uid=dmiller,ou=People,o=SASL Tests,dc=example,dc=com" -w mothergoose' ,
2224N/A 'expectedRC' : 49 }
2224N/A </call>
2224N/A
2224N/A <call function="'testCase_Postamble'"/>
2224N/A
2224N/A </sequence>
2224N/A </testcase>
2224N/A
2224N/A <!--- Test case: New SASL Mechanism -->
2224N/A <!---
2224N/A Place test-specific test information here.
2224N/A The tag, TestMarker, must be the same as the tag, TestSuiteName.
2224N/A #@TestMarker SASL New Tests
2224N/A #@TestName SASL New Postamble
6184N/A #@TestIssue none
2224N/A #@TestPurpose Reset configuration and entries.
2224N/A #@TestPreamble none
2224N/A #@TestStep Admin change password storage scheme to SSHA.
2224N/A #@TestStep Admin change user password.
2224N/A #@TestStep User bind with simple authentication.
2224N/A #@TestStep User bind with SASL New
2224N/A #@TestPostamble none
2224N/A #@TestResult Success if OpenDS returns 0
2224N/A for all ldap operations.
2224N/A -->
2224N/A <testcase name="getTestCaseName('New Sasl Mech - Postamble')">
2224N/A <sequence>
2224N/A <call function="'testCase_Preamble'"/>
2224N/A <message>
2224N/A 'Security: SASL New: Postamble Step 1 - Admin Changing User Password'
2224N/A </message>
2224N/A
2224N/A <call function="'modifyAnAttribute'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2224N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2224N/A 'DNToModify' : 'uid=dmiller, ou=People, o=SASL Tests, dc=example,dc=com' ,
2224N/A 'attributeName' : 'userpassword' ,
2224N/A 'newAttributeValue' : 'fathergoose' ,
2224N/A 'changetype' : 'replace' }
2224N/A </call>
2224N/A
2224N/A <call function="'modifyAnAttribute'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2224N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2224N/A 'DNToModify' : 'uid=mmiller, ou=People, o=SASL Tests, dc=example,dc=com' ,
2224N/A 'attributeName' : 'userpassword' ,
2224N/A 'newAttributeValue' : 'fathergoose' ,
2224N/A 'changetype' : 'replace' }
2224N/A </call>
2224N/A
2224N/A <message>
2224N/A 'Security: SASL New: Postamble Step 2 - User (dn:) Binding With Simple Authentication'
2224N/A </message>
2224N/A
2224N/A <call function="'SearchObject'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsInstanceDn' : 'uid=mmiller,ou=People,o=SASL Tests,dc=example,dc=com' ,
2224N/A 'dsInstancePswd' : 'fathergoose' ,
2224N/A 'dsBaseDN' : 'dc=example,dc=com' ,
2224N/A 'dsFilter' : 'objectclass=*' ,
2224N/A 'extraParams' : '-s base' }
2224N/A </call>
2224N/A
2224N/A <message>
2224N/A 'Security: SASL New: Postamble Step 3 - User (dn:) Binding With SASL PLAIN Mechanism'
2224N/A </message>
2224N/A
2224N/A <call function="'AnonSearchObject'">
2224N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2224N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2224N/A 'dsBaseDN' : 'dc=example,dc=com' ,
2224N/A 'dsFilter' : 'objectclass=*' ,
2224N/A 'extraParams' : '-o mech=PLAIN -o "authid=dn:uid=mmiller,ou=People,o=SASL Tests,dc=example,dc=com" -w fathergoose' }
2224N/A </call>
2224N/A
2224N/A <call function="'testCase_Postamble'"/>
2224N/A
2224N/A </sequence>
2224N/A </testcase>
2224N/A
2224N/A </sequence>
2224N/A
2224N/A </function>
2224N/A
2224N/A</stax>
2224N/A