{ 'host' : STAF_REMOTE_HOSTNAME, 'port' : 8500, } { 'host' : STAF_REMOTE_HOSTNAME, 'port' : 8520, } { 'host' : STAF_REMOTE_HOSTNAME, 'port' : 8540, } { 'host' : STAF_REMOTE_HOSTNAME, 'port' : 8600, } { 'host' : STAF_REMOTE_HOSTNAME, 'port' : 8620, } { 'host' : STAF_REMOTE_HOSTNAME, 'port' : 8640, } 'Got these free ports for I1: %s, %s, %s' % (SEC_I1_PORT, \ SEC_I1_SPORT, SEC_I1_REPL_PORT) 'Got these free ports for I2: %s, %s, %s' % (SEC_I2_PORT, \ SEC_I2_SPORT, SEC_I2_REPL_PORT) { 'file' : KEYTOOL } '++ Setup of I1' { 'name' : 'Create directory to contain I1', 'location' : STAF_REMOTE_HOSTNAME, 'service' : 'FS', 'request' : 'CREATE', 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % SEC_I1_BASE } { 'returncode' : RC, 'expected' : 0, 'result' : 'FAIL to create directory', } { 'name' : 'Extract OpenDS ZIP file', 'location' : STAF_REMOTE_HOSTNAME, 'service' : 'ZIP', 'request' : 'UNZIP', 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \ % (DIRECTORY_INSTANCE_DIR, ZIPNAME, SEC_I1_BASE) } { 'returncode' : RC, 'expected' : 0, 'result' : 'FAIL to unzip OpenDS ZIP file', } '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Launch setup command for I1', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-setup-i1.txt' % OUT_GROUP, } '++ Check status of I1' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Launch status command for I1', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-status-i1.txt' % OUT_GROUP, } { 'location' : STAF_REMOTE_HOSTNAME, 'filename' : grepFile, 'testString': 'Server Run Status: Started', 'expectedRC': 0, } '++ Check file config/keystore exists' { 'file' : ks } '++ Check StartTLS is disabled' { 'dsInstancePort' : SEC_I1_PORT, 'dsInstanceDn' : DM_DN, 'dsInstancePswd' : DM_PW, 'dsBaseDN' : ent, 'dsFilter' : 'objectclass=*', 'dsAttributes' : 'ds-cfg-allow-start-tls', 'expectedRC' : 0, 'outputPath' : OUT_GROUP, 'outputFile' : 'sec-ldapsearch-i1.txt', } { 'location' : STAF_REMOTE_HOSTNAME, 'filename' : grepFile, 'testString': 'ds-cfg-allow-start-tls: false', 'expectedRC': 0, } '++ Setup I2' { 'name' : 'Create directory to contain I2', 'location' : STAF_REMOTE_HOSTNAME, 'service' : 'FS', 'request' : 'CREATE', 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % SEC_I2_BASE } { 'returncode' : RC, 'expected' : 0, 'result' : 'FAIL to create directory', } { 'name' : 'Extract OpenDS ZIP file', 'location' : STAF_REMOTE_HOSTNAME, 'service' : 'ZIP', 'request' : 'UNZIP', 'arguments' : 'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \ % (ZIPPATH, ZIPNAME, SEC_I2_BASE) } { 'returncode' : RC, 'expected' : 0, 'result' : 'FAIL to unzip OpenDS ZIP file', } '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Launch setup command for I2', 'command' : c, 'arguments' : p, 'path' : SEC_I2_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-setup-i2.txt' % OUT_GROUP, } '++ Check status of I2' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Launch status command for I2', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-status-i2.txt' % OUT_GROUP, } { 'location' : STAF_REMOTE_HOSTNAME, 'filename' : grepFile, 'testString': 'Server Run Status: Started', 'expectedRC': 0, } '++ Check file config/keystore exists' { 'file' : ks } '++ Check StartTLS is enabled on I2' { 'dsInstancePort' : SEC_I2_PORT, 'dsInstanceDn' : DM_DN, 'dsInstancePswd' : DM_PW, 'dsBaseDN' : ent, 'dsFilter' : 'objectclass=*', 'dsAttributes' : 'ds-cfg-allow-start-tls', 'expectedRC' : 0, 'outputPath' : OUT_GROUP, 'outputFile' : 'sec-ldapsearch-i2.txt', } { 'location' : STAF_REMOTE_HOSTNAME, 'filename' : grepFile, 'testString': 'ds-cfg-allow-start-tls: true', 'expectedRC': 0, } '++ create backend on I1' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Create backend on I1', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-create-backend-i1.txt' % OUT_GROUP, } '++ create backend on I2' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Create backend on I2', 'command' : c, 'arguments' : p, 'path' : SEC_I2_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-create-backend-i2.txt' % OUT_GROUP, } '++ Import data on I1' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Import data on I1', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-import-ldif-i1.txt' % OUT_GROUP, } '++ Enable replication I1-I2' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Enable I1 - I2 replication', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-enable-repl.txt' % OUT_GROUP, } '++ Initialize replication I1-I2' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Initialize I1 - I2 replication', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-initialize-repl.txt' % OUT_GROUP, } '++ Check SSL I1' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'SSL Search on I1', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-ldapsearch-ssl-i1.txt' % OUT_GROUP, } { 'location' : STAF_REMOTE_HOSTNAME, 'filename' : grepFile, 'testString': 'dn: cn=user_2,o=o1', 'expectedRC': 0, } '++ Check SSL I2' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'SSL Search on I2', 'command' : c, 'arguments' : p, 'path' : SEC_I2_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-ldapsearch-ssl-i2.txt' % OUT_GROUP, } { 'location' : STAF_REMOTE_HOSTNAME, 'filename' : grepFile, 'testString': 'dn: cn=user_2,o=o1', 'expectedRC': 0, } '++ Check not-StartTLS I1' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'StartTLS Search on I1', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 52, 'outputFile': '%s/sec-ldapsearch-starttls-i1.txt' % OUT_GROUP, } '++ Check StartTLS OK on I2' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'StartTLS Search on I2', 'command' : c, 'arguments' : p, 'path' : SEC_I2_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-ldapsearch-starttls-i2.txt' % OUT_GROUP, } { 'location' : STAF_REMOTE_HOSTNAME, 'filename' : grepFile, 'testString': 'dn: cn=user_2,o=o1', 'expectedRC': 0, } '++ Export server cert I1' { 'name' : 'Get content of keystore.pin file for I1', 'location' : STAF_REMOTE_HOSTNAME, 'service' : 'FS', 'request' : 'GET', 'arguments' : 'FILE %s TEXT' % KEYSTORE1_PIN_FILE } { 'returncode' : RC, 'expected' : 0, 'result' : 'FAIL to get content of keystore.pin file', } '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Export I1 server cert', 'command' : KEYTOOL, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-export-cert-i1.txt' % OUT_GROUP, } '++ Export server cert I2' { 'name' : 'Get content of keystore.pin file for I2', 'location' : STAF_REMOTE_HOSTNAME, 'service' : 'FS', 'request' : 'GET', 'arguments' : 'FILE %s TEXT' % KEYSTORE2_PIN_FILE } { 'returncode' : RC, 'expected' : 0, 'result' : 'FAIL to get content of keystore.pin file', } '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Export I2 server cert', 'command' : KEYTOOL, 'arguments' : p, 'path' : SEC_I2_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-export-cert-i2.txt' % OUT_GROUP, } '++ Create new JKS keystore with I1 cert' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Import I1 cert in new JKS keystore', 'command' : KEYTOOL, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-import-cert-i1.txt' % OUT_GROUP, } '++ Import cert on I2' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Import I2 cert in new JKS keystore', 'command' : KEYTOOL, 'arguments' : p, 'path' : SEC_I2_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-import-cert-i2.txt' % OUT_GROUP, } '++ Uninstall I1 (should fail)' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Uninstall I1', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 2, 'outputFile': '%s/sec-uninstall1-i1.txt' % OUT_GROUP, } '++ Uninstall I1' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Uninstall I1', 'command' : c, 'arguments' : p, 'path' : SEC_I1_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-uninstall2-i1.txt' % OUT_GROUP, } 'Stop I1' { 'location' : STAF_REMOTE_HOSTNAME, 'dsPath' : SEC_I1_ROOT, 'dsPort' : SEC_I1_PORT, 'dsBindDN' : DM_DN , 'dsBindPwd' : DM_PW , 'expectedRC' : 'noCheck' } '++ Uninstall I2' '%s %s' % (c, p) { 'location' : STAF_REMOTE_HOSTNAME, 'name' : 'Uninstall I2', 'command' : c, 'arguments' : p, 'path' : SEC_I2_ROOT, 'expectedRC': 0, 'outputFile': '%s/sec-uninstall-i2.txt' % OUT_GROUP, } 'Stop I2' { 'location' : STAF_REMOTE_HOSTNAME, 'dsPath' : SEC_I2_ROOT, 'dsPort' : SEC_I2_PORT, 'dsBindDN' : DM_DN , 'dsBindPwd' : DM_PW , 'expectedRC' : 'noCheck' }