3860N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3860N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
3860N/A<!--
3860N/A ! CDDL HEADER START
3860N/A !
3860N/A ! The contents of this file are subject to the terms of the
3860N/A ! Common Development and Distribution License, Version 1.0 only
3860N/A ! (the "License"). You may not use this file except in compliance
3860N/A ! with the License.
3860N/A !
3860N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
3860N/A ! or http://forgerock.org/license/CDDLv1.0.html.
3860N/A ! See the License for the specific language governing permissions
3860N/A ! and limitations under the License.
3860N/A !
3860N/A ! When distributing Covered Code, include this CDDL HEADER in each
3860N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
3860N/A ! If applicable, add the following below this CDDL HEADER, with the
3860N/A ! fields enclosed by brackets "[]" replaced with your own identifying
3860N/A ! information:
3860N/A ! Portions Copyright [yyyy] [name of copyright owner]
3860N/A !
3860N/A ! CDDL HEADER END
3860N/A !
4103N/A ! Copyright 2006-2009 Sun Microsystems, Inc.
3860N/A ! Portions Copyright 2011-2013 ForgeRock AS
3860N/A ! -->
3860N/A<stax>
3860N/A <defaultcall function="main_security" />
3860N/A <function name="main_security">
3860N/A <function-list-args>
3860N/A <function-required-arg name="STAXParentID"/>
3860N/A </function-list-args>
3860N/A
3860N/A <sequence>
3860N/A <try>
3860N/A <block name="'security'">
3860N/A <sequence>
3860N/A <!--- Load the job environment for the test group execution -->
3860N/A <import machine="STAF_LOCAL_HOSTNAME"
3860N/A file="'%s/environment.xml' % TESTS_FUNCTIONS_DIR" />
4124N/A <call function="'loadJobEnvironment'">
3860N/A { 'parent' : STAXParentID }
3860N/A </call>
4124N/A <script>
4124N/A CurrentTestPath['group']='security'
3860N/A _group=CurrentTestPath['group']
3860N/A
3860N/A import re
4124N/A if UPGRADE_OPENDJNAME != '' and re.search('2.4.*',UPGRADE_OPENDJNAME) is not None:
4124N/A # UPGRADE MODE
4124N/A # Only for upgrade from 2.4.x
4124N/A GLOBAL_ACI_SEARCH="(targetattr!=\"userPassword||authPassword||changes||changeNumber||changeType||changeTime||targetDN||newRDN||newSuperior||deleteOldRDN||targetEntryUUID||targetUniqueID||changeInitiatorsName||changeLogCookie\")(version 3.0; acl \"Anonymous read access\"; allow (read,search,compare) userdn=\"ldap:///anyone\";)"
4124N/A elif UPGRADE_OPENDJNAME != '' and re.search('2.5.*',UPGRADE_OPENDJNAME) is not None:
4124N/A # UPGRADE MODE
3860N/A # Only for upgrade from 2.5.x
3860N/A GLOBAL_ACI_SEARCH="(targetattr!=\"userPassword||authPassword||changes||changeNumber||changeType||changeTime||targetDN||newRDN||newSuperior||deleteOldRDN||targetEntryUUID||targetUniqueID||changeInitiatorsName||changeLogCookie\")(version 3.0; acl \"Anonymous read access\"; allow (read,search,compare) userdn=\"ldap:///anyone\";)"
4124N/A elif UPGRADE_OPENDJNAME != '' and re.search('2.6.*',UPGRADE_OPENDJNAME) is not None:
3860N/A # UPGRADE MODE
3860N/A # Only for upgrade from 2.6.x
4124N/A GLOBAL_ACI_SEARCH="(targetattr!=\"userPassword||authPassword||changes||changeNumber||changeType||changeTime||targetDN||newRDN||newSuperior||deleteOldRDN||targetEntryUUID||targetUniqueID||changeInitiatorsName||changeLogCookie\")(version 3.0; acl \"Anonymous read access\"; allow (read,search,compare) userdn=\"ldap:///anyone\";)"
3860N/A else:
3860N/A # NORMAL MODE
3860N/A GLOBAL_ACI_SEARCH="(targetattr!=\"userPassword||authPassword||debugsearchindex||changes||changeNumber||changeType||changeTime||targetDN||newRDN||newSuperior||deleteOldRDN\")(version 3.0; acl \"Anonymous read access\"; allow (read,search,compare) userdn=\"ldap:///anyone\";)"
3860N/A </script>
3860N/A
3860N/A <call function="'testGroup_Preamble'" />
3860N/A <script>
3860N/A suiteList = []
3860N/A suiteList.append(['client_auth','client_auth'])
3860N/A suiteList.append(['jks','security_jks'])
3860N/A suiteList.append(['pkcs12','security_pkcs12'])
3860N/A suiteList.append(['startTLS','security_startTLS'])
3860N/A suiteList.append(['sasl','security_sasl'])
3860N/A suiteList.append(['auth_pwd_syntax','security_auth_pwd_syntax'])
3860N/A suiteList.append(['pwd_validator','security_pwd_validator'])
3860N/A suiteList.append(['pwd_storage','security_pwd_storage'])
3860N/A suiteList.append(['bind_no_pwd','security_bind_no_pwd'])
3914N/A suiteList.append(['account_activation','security_account_activation'])
4124N/A </script>
4124N/A
3860N/A <!-- Run the test suites -->
3860N/A <iterate var="_suite" in="suiteList">
3860N/A <sequence>
3860N/A <try>
3860N/A <sequence>
3860N/A <import machine="STAF_LOCAL_HOSTNAME"
4124N/A file="'%s/testcases/%s/%s/%s.xml' % (TESTS_DIR,_group,_suite[0],_suite[1])"/>
3860N/A <call function="'%s' % _suite[1]" />
3860N/A </sequence>
3860N/A <catch exception="'STAFException.TestSuite.SetupException'">
3968N/A <sequence>
4124N/A <message log="1" level="'fatal'">'Setup of test suite %s failed.' % _suite[0]</message>
3860N/A </sequence>
3860N/A </catch>
3860N/A <catch exception="'STAFException.TestSuite.MainException'">
3860N/A <sequence>
3860N/A <message log="1" level="'fatal'">'Main part of test suite %s failed.' % _suite[0]</message>
4124N/A </sequence>
3860N/A </catch>
3860N/A <catch exception="'STAFException.TestSuite.CleanupException'">
3860N/A <sequence>
3860N/A <message log="1" level="'fatal'">'Cleanup of test suite %s failed.' % _suite[0]</message>
3860N/A </sequence>
4124N/A </catch>
4124N/A </try>
4124N/A </sequence>
4124N/A </iterate>
4124N/A
4124N/A </sequence>
3860N/A </block>
4124N/A <catch exception="'STAXException.TestGroupException'">
3860N/A <sequence>
3860N/A <message log="1" level="'fatal'">'Execution of Test Group Failed'</message>
4124N/A </sequence>
4124N/A </catch>
4124N/A <finally>
3860N/A <!-- Test Group postamble -->
3860N/A <call function="'testGroup_Postamble'"/>
3860N/A </finally>
3860N/A </try>
3860N/A </sequence>
3860N/A </function>
3860N/A</stax>
3860N/A