124N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
124N/A ! The contents of this file are subject to the terms of the 124N/A ! Common Development and Distribution License, Version 1.0 only 124N/A ! (the "License"). You may not use this file except in compliance 124N/A ! You can obtain a copy of the license at 124N/A ! See the License for the specific language governing permissions 124N/A ! and limitations under the License. 124N/A ! When distributing Covered Code, include this CDDL HEADER in each 124N/A ! file and include the License file at 124N/A ! add the following below this CDDL HEADER, with the fields enclosed 124N/A ! by brackets "[]" replaced with your own identifying information: 124N/A ! Portions Copyright [yyyy] [name of copyright owner] 568N/A ! Copyright 2007-2009 Sun Microsystems, Inc. 568N/A <
defaultcall function="replication_encryption"/>
124N/A <
function name="replication_encryption">
124N/A <
block name="'encryption'">
124N/A CurrentTestPath['group']='replication'
124N/A CurrentTestPath['suite']=STAXCurrentBlock
124N/A <
call function="'testSuite_Preamble'"/>
124N/A <!--- Test Suite information 124N/A #@TestSuiteName Replication Encryption Tests 124N/A #@TestSuitePurpose Verify that replication can use an encrypted 181N/A #@TestSuiteID Encryption Tests 124N/A #@TestSuiteGroup Encryption 124N/A #@TestGroup Replication <
import machine="STAF_LOCAL_HOSTNAME" <
call function="'replication_setup'">
% REPLICATION_CONFIG_DIR,
'secureReplication': True,
consumer = consumerList[0]
<!--- Test Case information #@TestMarker Replication Encryption Tests #@TestName Replication: Encryption: Add entry #@TestPurpose Check entry add over secured replication <
testcase name="getTestCaseName('Add entry')">
<
call function="'testCase_Preamble'"/>
'Replication: Encryption: Add entry. Check entry add over \
<
iterate var="server" in="_topologyServerList" indexvar="i">
userDn = 'uid=iabizen-%s, ou=People, %s' % (i,synchroSuffix)
# if we fail to add the entry to the 'consumer' servers
# => it may mean that the initialize-all is not completely
# done yet, and so we may have come across Issue 3315
# (dsreplication initialize-all returns before peer
# has completed initialisation)
<!-- Add entry to one of the other servers --> <
call function="'addAnEntry'">
'listAttributes' : listAttr,
'knownIssue' : myKnownIssue
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Encryption Tests #@TestName Replication: Encryption: Modify entry #@TestPurpose Check entry modify over secured replication <
testcase name="getTestCaseName('Modify entry')">
<
call function="'testCase_Preamble'"/>
'Replication: Encryption: Modify entry. Check entry modify \
over secured replication'
<
iterate var="server" in="_topologyServerList" indexvar="i">
userDn = 'uid=iabizen-%s, ou=People, %s' % (i,synchroSuffix)
# if we fail to modify the entry in the 'consumer' servers
# => it may mean that the initialize-all is not completely
# done yet, and so we may have come across Issue 3315
# (dsreplication initialize-all returns before peer
# has completed initialisation)
<!-- Modify entry on one of the servers --> <
call function="'modifyAnAttribute'">
'newAttributeValue' : 'GEC',
'changetype' : 'replace',
'knownIssue' : myKnownIssue
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Encryption Tests #@TestName Replication: Encryption: Delete entry #@TestPurpose Check entry delete over secured replication <
testcase name="getTestCaseName('Delete entry')">
<
call function="'testCase_Preamble'"/>
'Replication: Encryption: Delete entry. Check delete modify \
over secured replication'
<
iterate var="server" in="_topologyServerList" indexvar="i">
userDn = 'uid=iabizen-%s, ou=People, %s' % (i,synchroSuffix)
# if we fail to delete the entry to the 'consumer' servers
# => it may mean that the initialize-all is not completely
# done yet, and so we may have come across Issue 3315
# (dsreplication initialize-all returns before peer
# has completed initialisation)
<!-- Delete entry on one of the servers --> <
call function="'DeleteEntry'">
'knownIssue' : myKnownIssue
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Encryption Tests #@TestName Replication: Encryption: Modify Entry - add #@TestID Modify Entry - add binary attribute #@TestPurpose Check that an entry modify is well propagated <
testcase name="getTestCaseName ('Modify Entry - add binary attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Encryption: Modify Entry - add binary attribute. \
Check that an entry modify is well propagated by secured \
dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
write_replication_mod_binary_ldif_file(filePath, dn, modif,
attrType, binaryFilePath)
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' % (filename,
local.data,
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
'dsFilter' : 'jpegPhoto=*',
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Encryption Tests #@TestName Replication: Encryption: Modify Entry - #@TestID Modify Entry - replace binary attribute #@TestPurpose Check that an entry modify is well propagated <
testcase name="getTestCaseName ('Modify Entry - replace binary attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Encryption: Modify Entry - replace binary \
Check that an entry modify is well propagated by secured \
dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
write_replication_mod_binary_ldif_file(filePath, dn, modif,
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' % (filename,
local.data,
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
'dsFilter' : 'jpegPhoto=*',
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Encryption Tests #@TestName Replication: Encryption: Modify Entry - #@TestID Modify Entry - delete binary attribute #@TestPurpose Check that an entry modify is well propagated <
testcase name="getTestCaseName ('Modify Entry - delete binary attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Encryption: Modify Entry - delete binary \
Check that an entry modify is well propagated by secured \
dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
write_replication_mod_ldif_file(filePath, dn, modif, attrType,
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' % (filename,
local.data,
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
'dsFilter' : 'jpegPhoto=*',
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Encryption Tests #@TestName Replication: Encryption: Rename Entry #@TestPurpose Check that a rename (modrdn) operation is well propagated by secured replication. <
testcase name="getTestCaseName('Rename Entry')">
<
call function="'testCase_Preamble'"/>
'Replication: Encryption: Rename Entry. Check that a rename \
(modrdn) operation is well propagated by secured replication.'
dn = 'uid=kvaughan, ou=People,%s' % synchroSuffix
write_replication_moddn_ldif_file(filePath, dn, newrdn,
newsuperior, deleteoldrdn)
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' % (filename,
local.data,
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <!-- check that "uid=kvaughan, ou=People, ${DIRECTORY_BASE}" does NOT exist anymore --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=kvaughan, ou=People,%s' \
'dsFilter' : 'objectclass=*',
<!-- check that new entry "uid=kvaughan2, ou=People, ${DIRECTORY_BASE}" exists --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=kvaughan2, ou=People,%s' \
'dsFilter' : 'objectclass=*'
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Encryption Tests #@TestName Replication: Encryption: Rename Entry #@TestID Rename Entry (preserving old rdn) #@TestPurpose Check that a rename (modrdn) operation is well propagated by secured replication. <
testcase name="getTestCaseName ('Rename Entry (preserving old rdn)')">
<
call function="'testCase_Preamble'"/>
'Replication: Encryption: Rename Entry (preserving old rdn). \
Check that a rename (modrdn) operation is well propagated by \
dn = 'uid=jwallace, ou=People,%s' % synchroSuffix
write_replication_moddn_ldif_file(filePath, dn, newrdn,
newsuperior, deleteoldrdn)
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' % (filename,
local.data,
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <!-- check that "uid=jwallace, ou=People, ${DIRECTORY_BASE}" does NOT exist anymore --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
'dsFilter' : 'objectclass=*',
<!-- check that new entry "uid=igueye, ou=People, ${DIRECTORY_BASE}" exists --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=igueye, ou=People,%s' % synchroSuffix,
'dsFilter' : 'uid=jwallace'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Encryption Tests #@TestName Replication: Encryption: Rename Subtree #@TestPurpose Check that a subtree rename (moddn) operation is well propagated by secured replication. <
testcase name="getTestCaseName('Rename Subtree')">
<
call function="'testCase_Preamble'"/>
'Replication: Encryption: Rename Subtree. Check that a \
subtree rename (moddn) operation is well propagated by \
dn = 'ou=People,%s' % synchroSuffix
newrdn = 'ou=Special People'
newsuperior = 'ou=Special Users,%s' % synchroSuffix
write_replication_moddn_ldif_file(filePath, dn, newrdn,
newsuperior, deleteoldrdn)
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' % (filename,
local.data,
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <!-- check that "uid=gfarmer, ou=People, ${DIRECTORY_BASE}" does NOT exist anymore --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=gfarmer, ou=People,%s' \
'dsFilter' : 'objectclass=*',
<!-- check that new entry "uid=gfarmer, ou=Special People, ou=Special Users, ${DIRECTORY_BASE}" exists --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=gfarmer, ou=Special People, \
ou=Special Users,%s' % synchroSuffix,
'dsFilter' : 'objectclass=*'
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<
import machine="STAF_LOCAL_HOSTNAME" <
call function="'replication_cleanup'" />
<
call function="'testSuite_Postamble'"/>