security.xml revision f663ea9d0bb4be0405c57f1c930df7a8cbcbfd27
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller<?xml version="1.0" encoding="UTF-8" standalone="no"?>
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! CDDL HEADER START
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! The contents of this file are subject to the terms of the
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! Common Development and Distribution License, Version 1.0 only
52a38c0fe76475c93300961068ea9332cb9854d6Brendan Mmiller ! (the "License"). You may not use this file except in compliance
52a38c0fe76475c93300961068ea9332cb9854d6Brendan Mmiller ! with the License.
52a38c0fe76475c93300961068ea9332cb9854d6Brendan Mmiller ! You can obtain a copy of the license at
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! See the License for the specific language governing permissions
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! and limitations under the License.
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! When distributing Covered Code, exclude this CDDL HEADER in each
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! file and exclude the License file at
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! add the following below this CDDL HEADER, with the fields enclosed
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! by brackets "[]" replaced with your own identifying information:
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! Portions Copyright [yyyy] [name of copyright owner]
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! CDDL HEADER END
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller ! Copyright 2008 Sun Microsystems, Inc.
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller <!--- Test Suite information
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller #@TestSuiteName Setup-Uninstall security Tests
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller #@TestSuitePurpose Test all secuirty related options of the
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller setup and uninstall commands
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller #@TestSuiteGroup security
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller #@TestSuiteID security Tests
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller #@TestGroup Setup-Uninstall
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller CurrentTestPath['group'] = 'setup'
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller CurrentTestPath['suite'] = 'security'
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller 'host' : STAF_REMOTE_HOSTNAME,
56d301d296cef7b6d0abc01314b4d65fe22e67a5Brendan Mmiller 'port' : 8500,
p.append('--cli --no-prompt --ldapPort %s' % (SEC_I1_PORT))
p.append('--ldapsPort %s' % SEC_I1_SPORT)
p.append('--rootUserDN "%s"' % DM_DN)
p.append('--rootUserPassword "%s"' % DM_PW)
p.append('--generateSelfSignedCertificate')
p.append('--no-prompt')
p.append('--bindDN "%s" --bindPassword "%s"' % (DM_DN, DM_PW))
'outputFile' : 'sec-ldapsearch-i1.txt',
p.append('--cli --no-prompt --ldapPort %s' % (SEC_I2_PORT))
p.append('--ldapsPort %s' % SEC_I2_SPORT)
p.append('--rootUserDN "%s"' % DM_DN)
p.append('--rootUserPassword "%s"' % DM_PW)
p.append('--generateSelfSignedCertificate --enableStartTLS')
p.append('--no-prompt')
p.append('--bindDN "%s" --bindPassword "%s"' % (DM_DN, DM_PW))
'outputFile' : 'sec-ldapsearch-i2.txt',
p.append('create-backend --bindDN "%s"' % DM_DN)
p.append('--bindPassword "%s" --port %s' % (DM_PW, SEC_I1_PORT))
p.append('--backend-name o1 --type local-db --no-prompt')
p.append('--set enabled:true --set writability-mode:enabled')
p.append('--set base-dn:"o=o1"')
p.append('create-backend --bindDN "%s"' % DM_DN)
p.append('--bindPassword "%s" --port %s' % (DM_PW, SEC_I2_PORT))
p.append('--backend-name o1 --type local-db --no-prompt')
p.append('--set enabled:true --set writability-mode:enabled')
p.append('--set base-dn:"o=o1"')
p.append('--bindDN "%s" --bindPassword "%s"' % (DM_DN, DM_PW))
p.append('--port %s --backendID o1' % SEC_I1_PORT)
p.append('--ldifFile %s' % SEC_O1_LDIF)
p.append('enable --host1 %s' % STAF_REMOTE_HOSTNAME)
p.append('--bindDN1 "%s"' % DM_DN)
p.append('--bindPassword1 "%s"' % DM_PW)
p.append('--port1 %s' % SEC_I1_PORT)
p.append('--replicationPort1 %s' % SEC_I1_REPL_PORT)
p.append('--host2 %s --bindDN2 "%s"' % (STAF_REMOTE_HOSTNAME, DM_DN))
p.append('--bindPassword2 "%s"' % DM_PW)
p.append('--port2 %s' % (SEC_I2_PORT))
p.append('--replicationPort2 %s' % SEC_I2_REPL_PORT)
p.append('-I admin -w secret12')
p.append('--baseDN "o=o1" --no-prompt')
p.append('initialize -I admin -w secret12 --baseDN "o=o1"')
p.append('--hostSource %s' % STAF_REMOTE_HOSTNAME)
p.append('--portSource %s' % SEC_I1_PORT)
p.append('--hostDestination %s' % STAF_REMOTE_HOSTNAME)
p.append('--portDestination %s' % SEC_I2_PORT)
p.append('--no-prompt')
p.append('--hostname %s' % STAF_REMOTE_HOSTNAME)
p.append('--port %s' % SEC_I1_SPORT)
p.append('--trustAll --useSSL')
p.append('--baseDN "cn=user_2,o=o1"')
p.append('--searchScope base "(objectClass=*)"')
p.append('--hostname %s' % STAF_REMOTE_HOSTNAME)
p.append('--port %s' % SEC_I2_SPORT)
p.append('--trustAll --useSSL')
p.append('--baseDN "cn=user_2,o=o1"')
p.append('--searchScope base "(objectClass=*)"')
p.append('--hostname %s' % STAF_REMOTE_HOSTNAME)
p.append('--port %s' % SEC_I1_PORT)
p.append('--trustAll --useStartTLS')
p.append('--baseDN "cn=user_2,o=o1"')
p.append('--searchScope base "(objectClass=*)"')
p.append('--hostname %s' % STAF_REMOTE_HOSTNAME)
p.append('--port %s' % SEC_I2_PORT)
p.append('--trustAll --useStartTLS')
p.append('--baseDN "cn=user_2,o=o1"')
p.append('--searchScope base "(objectClass=*)"')
{ 'name' : 'Get content of keystore.pin file for I1',
'result' : 'FAIL to get content of keystore.pin file',
p.append('-export -keystore %s' % KEYSTORE1_FILE)
p.append('-storepass "%s"' % KEYSTORE1_PIN)
p.append('-alias server-cert -file %s' % CERT1_FILE)
{ 'name' : 'Get content of keystore.pin file for I2',
'result' : 'FAIL to get content of keystore.pin file',
p.append('-export -keystore %s' % KEYSTORE2_FILE)
p.append('-storepass "%s"' % KEYSTORE2_PIN)
p.append('-alias server-cert -file %s' % CERT2_FILE)
p.append('-import -storetype JKS -keystore %s' % MY_KEYSTORE)
p.append('-file %s' % CERT1_FILE)
p.append('-storepass secret12 -alias server-cert1')
p.append('-noprompt')
p.append('-import -storetype JKS -keystore %s' % MY_KEYSTORE)
p.append('-file %s' % CERT2_FILE)
p.append('-storepass secret12 -alias server-cert2')
p.append('-noprompt')
p.append('--cli --no-prompt')
p.append('--adminUID admin --bindPassword %s' % DM_PW)
p.append('--useSSL --useStartTLS --remove-all')
p.append('--trustStorePath %s' % MY_KEYSTORE)
p.append('--trustStorePassword secret12')
p.append('--cli --no-prompt')
p.append('--adminUID admin --bindPassword %s' % DM_PW)
p.append('--useSSL --remove-all')
p.append('--trustStorePath %s' % MY_KEYSTORE)
p.append('--trustStorePassword secret12')
p.append('--cli --no-prompt')
p.append('--adminUID admin --bindPasswordFile %s' % DM_PW_FILE)
p.append('--useStartTLS --remove-all')
p.append('--trustAll')