security_root_user_tests.xml revision d81978a0815d5b8a75633c35e3e1f8708d36f017
<?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="root_user_tests"/>
<function name="root_user_tests">
<sequence>
<!--- Check Existence of ds-cfg-default-password-storage-scheme Attr -->
<testcase name="getTestCaseName('Default Pwd Scheme')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Policy Root: Checking default value ds-cfg-default-password-storage-scheme'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=Root Password Policy,cn=Password Policies,cn=config' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'ds-cfg-default-password-storage-scheme' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{ 'returnString' : returnString ,
'expectedString' : 'cn=Salted SHA-512' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Check Existence of ds-cfg-password-generator Attr -->
<testcase name="getTestCaseName('No Default Pwd Generator')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Policy Root: Checking for ds-cfg-password-generator'
</message>
<call function="'compareEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'attrToBeCompared' : 'ds-cfg-password-generator:cn=anything',
'entryToBeCompared' : 'cn=Root Password Policy,cn=Password Policies,cn=config',
'expectedRC' : 16 }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Check Existence of ds-cfg-password-change-requires-current-password Attr -->
<testcase name="getTestCaseName('Default Pwd Change Setting')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: Pwd Policy Root: Checking default value ds-cfg-password-change-requires-current-password'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=Root Password Policy,cn=Password Policies,cn=config' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'ds-cfg-password-change-requires-current-password' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{ 'returnString' : returnString ,
'expectedString' : 'true' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
</sequence>
</function>
</stax>