diff --git a/.evergreen/activate-kms-venv.sh b/.evergreen/activate-kms-venv.sh deleted file mode 100755 index 4e8effc76c0..00000000000 --- a/.evergreen/activate-kms-venv.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -o errexit # Exit the script with error if any of the commands fail - -cd ${DRIVERS_TOOLS}/.evergreen/csfle -. ./activate-kmstlsvenv.sh - -if [ "Windows_NT" = "$OS" ]; then - echo "export PYTHON_EXEC='kmstlsvenv/Scripts/python.exe'" > prepare-kmsvenv.sh -else - echo "export PYTHON_EXEC='./kmstlsvenv/bin/python3'" > prepare-kmsvenv.sh -fi diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index ab21ef1f009..caa7f202e83 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -92,43 +92,6 @@ functions: sleep 1 docker ps - "bootstrap kms servers": - - command: subprocess.exec - params: - binary: bash - working_dir: src - args: - - .evergreen/activate-kms-venv.sh - env: - DRIVERS_TOOLS: ${DRIVERS_TOOLS} - - command: subprocess.exec - params: - background: true - binary: bash - working_dir: src - args: - - .evergreen/run-kmip-server.sh - env: - DRIVERS_TOOLS: ${DRIVERS_TOOLS} - - command: subprocess.exec - params: - background: true - binary: bash - working_dir: src - args: - - .evergreen/run-kms-servers.sh - env: - DRIVERS_TOOLS: ${DRIVERS_TOOLS} - - command: subprocess.exec - params: - background: true - working_dir: src - binary: bash - args: - - .evergreen/run-azure-kms-mock-server.sh - env: - DRIVERS_TOOLS: ${DRIVERS_TOOLS} - "run tests": - command: ec2.assume_role params: @@ -761,7 +724,6 @@ tasks: tags: ["serverless"] commands: - func: install dependencies - - func: bootstrap kms servers - func: "run serverless tests" - name: "test-gcpkms-task" diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 384babe53f6..31610208b2d 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -65,42 +65,6 @@ functions: DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-image.sh sleep 1 docker ps - bootstrap kms servers: - - command: subprocess.exec - params: - binary: bash - working_dir: src - args: - - .evergreen/activate-kms-venv.sh - env: - DRIVERS_TOOLS: ${DRIVERS_TOOLS} - - command: subprocess.exec - params: - background: true - binary: bash - working_dir: src - args: - - .evergreen/run-kmip-server.sh - env: - DRIVERS_TOOLS: ${DRIVERS_TOOLS} - - command: subprocess.exec - params: - background: true - binary: bash - working_dir: src - args: - - .evergreen/run-kms-servers.sh - env: - DRIVERS_TOOLS: ${DRIVERS_TOOLS} - - command: subprocess.exec - params: - background: true - working_dir: src - binary: bash - args: - - .evergreen/run-azure-kms-mock-server.sh - env: - DRIVERS_TOOLS: ${DRIVERS_TOOLS} run tests: - command: ec2.assume_role params: @@ -685,7 +649,6 @@ tasks: - serverless commands: - func: install dependencies - - func: bootstrap kms servers - func: run serverless tests - name: test-gcpkms-task commands: @@ -941,7 +904,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-latest-replica_set tags: @@ -957,7 +919,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-latest-sharded_cluster tags: @@ -973,7 +934,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-rapid-server tags: @@ -989,7 +949,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-rapid-replica_set tags: @@ -1005,7 +964,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-rapid-sharded_cluster tags: @@ -1021,7 +979,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-8.0-server tags: @@ -1037,7 +994,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-8.0-replica_set tags: @@ -1053,7 +1009,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-8.0-sharded_cluster tags: @@ -1069,7 +1024,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-7.0-server tags: @@ -1085,7 +1039,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-7.0-replica_set tags: @@ -1101,7 +1054,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-7.0-sharded_cluster tags: @@ -1117,7 +1069,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-6.0-server tags: @@ -1133,7 +1084,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-6.0-replica_set tags: @@ -1149,7 +1099,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-6.0-sharded_cluster tags: @@ -1165,7 +1114,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-5.0-server tags: @@ -1181,7 +1129,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-5.0-replica_set tags: @@ -1197,7 +1144,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-5.0-sharded_cluster tags: @@ -1213,7 +1159,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.4-server tags: @@ -1229,7 +1174,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.4-replica_set tags: @@ -1245,7 +1189,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.4-sharded_cluster tags: @@ -1261,7 +1204,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.2-server tags: @@ -1277,7 +1219,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.2-replica_set tags: @@ -1293,7 +1234,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.2-sharded_cluster tags: @@ -1309,7 +1249,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.0-server tags: @@ -1325,7 +1264,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.0-replica_set tags: @@ -1341,7 +1279,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.0-sharded_cluster tags: @@ -1357,7 +1294,6 @@ tasks: - {key: AUTH, value: auth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-latest-server-v1-api tags: @@ -1378,7 +1314,6 @@ tasks: - {key: CLIENT_ENCRYPTION, value: 'true'} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-x509-authentication tags: @@ -1559,7 +1494,6 @@ tasks: - {key: TOPOLOGY, value: replica_set} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run socks5 tests - name: test-socks5-csfle tags: @@ -1574,7 +1508,6 @@ tasks: - {key: TEST_SOCKS5_CSFLE, value: 'true'} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run socks5 tests - name: test-socks5-tls tags: [] @@ -2257,7 +2190,6 @@ tasks: - {key: CLIENT_ENCRYPTION, value: 'true'} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: install mongodb-client-encryption - func: assume secrets manager rule - func: run custom csfle tests @@ -2276,7 +2208,6 @@ tasks: - {key: CLIENT_ENCRYPTION, value: 'true'} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: install mongodb-client-encryption - func: assume secrets manager rule - func: run custom csfle tests @@ -2295,7 +2226,6 @@ tasks: - {key: CLIENT_ENCRYPTION, value: 'true'} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: install mongodb-client-encryption - func: assume secrets manager rule - func: run custom csfle tests @@ -2314,7 +2244,6 @@ tasks: - {key: CLIENT_ENCRYPTION, value: 'true'} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: install package vars: PACKAGE: mongodb-client-encryption@6.0.0 @@ -2335,7 +2264,6 @@ tasks: - {key: MONGODB_BINARIES, value: '${PROJECT_DIRECTORY}/mongodb/bin'} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: assume secrets manager rule - func: build and test alpine FLE - name: test-latest-server-noauth @@ -2353,7 +2281,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-latest-replica_set-noauth tags: @@ -2370,7 +2297,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-latest-sharded_cluster-noauth tags: @@ -2387,7 +2313,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-rapid-server-noauth tags: @@ -2404,7 +2329,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-rapid-replica_set-noauth tags: @@ -2421,7 +2345,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-rapid-sharded_cluster-noauth tags: @@ -2438,7 +2361,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-8.0-server-noauth tags: @@ -2455,7 +2377,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-8.0-replica_set-noauth tags: @@ -2472,7 +2393,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-8.0-sharded_cluster-noauth tags: @@ -2489,7 +2409,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-7.0-server-noauth tags: @@ -2506,7 +2425,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-7.0-replica_set-noauth tags: @@ -2523,7 +2441,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-7.0-sharded_cluster-noauth tags: @@ -2540,7 +2457,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-6.0-server-noauth tags: @@ -2557,7 +2473,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-6.0-replica_set-noauth tags: @@ -2574,7 +2489,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-6.0-sharded_cluster-noauth tags: @@ -2591,7 +2505,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-5.0-server-noauth tags: @@ -2608,7 +2521,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-5.0-replica_set-noauth tags: @@ -2625,7 +2537,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-5.0-sharded_cluster-noauth tags: @@ -2642,7 +2553,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.4-server-noauth tags: @@ -2659,7 +2569,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.4-replica_set-noauth tags: @@ -2676,7 +2585,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.4-sharded_cluster-noauth tags: @@ -2693,7 +2601,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.2-server-noauth tags: @@ -2710,7 +2617,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.2-replica_set-noauth tags: @@ -2727,7 +2633,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.2-sharded_cluster-noauth tags: @@ -2744,7 +2649,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.0-server-noauth tags: @@ -2761,7 +2665,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.0-replica_set-noauth tags: @@ -2778,7 +2681,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.0-sharded_cluster-noauth tags: @@ -2795,7 +2697,6 @@ tasks: - {key: AUTH, value: noauth} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-lambda-example tags: @@ -2845,7 +2746,6 @@ tasks: - {key: TEST_NPM_SCRIPT, value: check:csfle} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-rapid-csfle-mongocryptd tags: @@ -2862,7 +2762,6 @@ tasks: - {key: TEST_NPM_SCRIPT, value: check:csfle} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-8.0-csfle-mongocryptd tags: @@ -2879,7 +2778,6 @@ tasks: - {key: TEST_NPM_SCRIPT, value: check:csfle} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-7.0-csfle-mongocryptd tags: @@ -2896,7 +2794,6 @@ tasks: - {key: TEST_NPM_SCRIPT, value: check:csfle} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-6.0-csfle-mongocryptd tags: @@ -2913,7 +2810,6 @@ tasks: - {key: TEST_NPM_SCRIPT, value: check:csfle} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-5.0-csfle-mongocryptd tags: @@ -2930,7 +2826,6 @@ tasks: - {key: TEST_NPM_SCRIPT, value: check:csfle} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.4-csfle-mongocryptd tags: @@ -2947,7 +2842,6 @@ tasks: - {key: TEST_NPM_SCRIPT, value: check:csfle} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests - name: test-4.2-csfle-mongocryptd tags: @@ -2964,7 +2858,6 @@ tasks: - {key: TEST_NPM_SCRIPT, value: check:csfle} - func: install dependencies - func: bootstrap mongo-orchestration - - func: bootstrap kms servers - func: run tests task_groups: - name: serverless_task_group diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index da4ed1ad61d..79d8b9b9543 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -73,7 +73,6 @@ function makeTask({ mongoVersion, topology, tags = [], auth = 'auth' }) { updateExpansions({ VERSION: mongoVersion, TOPOLOGY: topology, AUTH: auth }), { func: 'install dependencies' }, { func: 'bootstrap mongo-orchestration' }, - { func: 'bootstrap kms servers' }, { func: 'run tests' } ] }; @@ -111,7 +110,6 @@ BASE_TASKS.push({ }), { func: 'install dependencies' }, { func: 'bootstrap mongo-orchestration' }, - { func: 'bootstrap kms servers' }, { func: 'run tests' } ] }); @@ -168,7 +166,7 @@ TASKS.push( }), { func: 'install dependencies' }, { func: 'run kerberos tests' } - ] + ] }, { name: 'test-auth-ldap', @@ -185,7 +183,6 @@ TASKS.push( }), { func: 'install dependencies' }, { func: 'bootstrap mongo-orchestration' }, - { func: 'bootstrap kms servers' }, { func: 'run socks5 tests' } ] }, @@ -200,7 +197,6 @@ TASKS.push( }), { func: 'install dependencies' }, { func: 'bootstrap mongo-orchestration' }, - { func: 'bootstrap kms servers' }, { func: 'run socks5 tests' } ] }, @@ -473,7 +469,6 @@ const MONGOCRYPTD_CSFLE_TASKS = MONGODB_VERSIONS.filter( }), { func: 'install dependencies' }, { func: 'bootstrap mongo-orchestration' }, - { func: 'bootstrap kms servers' }, { func: 'run tests' } ] }; @@ -682,7 +677,6 @@ for (const version of ['5.0', 'rapid', 'latest']) { }), { func: 'install dependencies' }, { func: 'bootstrap mongo-orchestration' }, - { func: 'bootstrap kms servers' }, { func: 'install mongodb-client-encryption' }, { func: 'assume secrets manager rule' }, { func: 'run custom csfle tests' } @@ -703,7 +697,6 @@ customDependencyTests.push({ }), { func: 'install dependencies' }, { func: 'bootstrap mongo-orchestration' }, - { func: 'bootstrap kms servers' }, { func: 'install package', vars: { @@ -750,7 +743,6 @@ SINGLETON_TASKS.push( }), { func: 'install dependencies' }, { func: 'bootstrap mongo-orchestration' }, - { func: 'bootstrap kms servers' }, { func: 'assume secrets manager rule' }, { func: 'build and test alpine FLE' } ] diff --git a/.evergreen/run-azure-kms-mock-server.sh b/.evergreen/run-azure-kms-mock-server.sh deleted file mode 100644 index 944cdcd27aa..00000000000 --- a/.evergreen/run-azure-kms-mock-server.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /user/bin/env bash - -if [ -z ${DRIVERS_TOOLS+omitted} ]; then echo "DRIVERS_TOOLS is unset" && exit 1; fi - -set -o errexit - -pushd $DRIVERS_TOOLS/.evergreen/csfle -. ./activate-kmstlsvenv.sh -python bottle.py fake_azure:imds & -popd - -echo "Running Azure KMS idms server on port 8080" diff --git a/.evergreen/run-kmip-server.sh b/.evergreen/run-kmip-server.sh deleted file mode 100755 index c0a3f0f691d..00000000000 --- a/.evergreen/run-kmip-server.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -o errexit # Exit the script with error if any of the commands fail - -cd ${DRIVERS_TOOLS}/.evergreen/csfle -. ./prepare-kmsvenv.sh - -echo "$PYTHON_EXEC" - -$PYTHON_EXEC -u kms_kmip_server.py \ - --ca_file ../x509gen/ca.pem \ - --cert_file ../x509gen/server.pem \ - --port 5698 diff --git a/.evergreen/run-kms-servers.sh b/.evergreen/run-kms-servers.sh deleted file mode 100755 index 8181a4d2f51..00000000000 --- a/.evergreen/run-kms-servers.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -o errexit # Exit the script with error if any of the commands fail - -cd ${DRIVERS_TOOLS}/.evergreen/csfle -. ./prepare-kmsvenv.sh - -echo "$PYTHON_EXEC" - -$PYTHON_EXEC -u kms_http_server.py --ca_file ../x509gen/ca.pem --cert_file ../x509gen/expired.pem --port 8000 & -$PYTHON_EXEC -u kms_http_server.py --ca_file ../x509gen/ca.pem --cert_file ../x509gen/wrong-host.pem --port 8001 & -$PYTHON_EXEC -u kms_http_server.py --ca_file ../x509gen/ca.pem --cert_file ../x509gen/server.pem --port 8002 --require_client_cert & diff --git a/.evergreen/setup-fle.sh b/.evergreen/setup-fle.sh index 4f6f4287c88..a14bfbf4c53 100644 --- a/.evergreen/setup-fle.sh +++ b/.evergreen/setup-fle.sh @@ -3,10 +3,13 @@ bash ${DRIVERS_TOOLS}/.evergreen/csfle/setup-secrets.sh source secrets-export.sh +# start KMS servers +bash ${DRIVERS_TOOLS}/.evergreen/csfle/start-servers.sh + if [ -z "${RUN_WITH_MONGOCRYPTD}" ]; then - echo "crypt shared: $CRYPT_SHARED_LIB_PATH" + echo "crypt shared: $CRYPT_SHARED_LIB_PATH" else - rm $CRYPT_SHARED_LIB_PATH - unset CRYPT_SHARED_LIB_PATH - echo "CRYPT_SHARED_LIB_PATH not set; using mongocryptd" + rm $CRYPT_SHARED_LIB_PATH + unset CRYPT_SHARED_LIB_PATH + echo "CRYPT_SHARED_LIB_PATH not set; using mongocryptd" fi diff --git a/test/integration/client-side-encryption/client_side_encryption.prose.test.js b/test/integration/client-side-encryption/client_side_encryption.prose.test.js index c017892e4c8..afbb83b7a8a 100644 --- a/test/integration/client-side-encryption/client_side_encryption.prose.test.js +++ b/test/integration/client-side-encryption/client_side_encryption.prose.test.js @@ -1394,13 +1394,13 @@ describe('Client Side Encryption Prose Tests', metadata, function () { }; const clientNoTlsOptions = { keyVaultNamespace, - kmsProviders: getKmsProviders(null, null, '127.0.0.1:8002', '127.0.0.1:8002'), + kmsProviders: getKmsProviders(null, null, '127.0.0.1:9002', '127.0.0.1:9002'), tlsOptions: tlsCaOptions, extraOptions: getEncryptExtraOptions() }; const clientWithTlsOptions = { keyVaultNamespace, - kmsProviders: getKmsProviders(null, null, '127.0.0.1:8002', '127.0.0.1:8002'), + kmsProviders: getKmsProviders(null, null, '127.0.0.1:9002', '127.0.0.1:9002'), tlsOptions: { aws: { tlsCAFile: process.env.CSFLE_TLS_CA_FILE, @@ -1423,13 +1423,13 @@ describe('Client Side Encryption Prose Tests', metadata, function () { }; const clientWithTlsExpiredOptions = { keyVaultNamespace, - kmsProviders: getKmsProviders(null, '127.0.0.1:8000', '127.0.0.1:8000', '127.0.0.1:8000'), + kmsProviders: getKmsProviders(null, '127.0.0.1:9000', '127.0.0.1:9000', '127.0.0.1:9000'), tlsOptions: tlsCaOptions, extraOptions: getEncryptExtraOptions() }; const clientWithInvalidHostnameOptions = { keyVaultNamespace, - kmsProviders: getKmsProviders(null, '127.0.0.1:8001', '127.0.0.1:8001', '127.0.0.1:8001'), + kmsProviders: getKmsProviders(null, '127.0.0.1:9001', '127.0.0.1:9001', '127.0.0.1:9001'), tlsOptions: tlsCaOptions, extraOptions: getEncryptExtraOptions() }; @@ -1506,10 +1506,10 @@ describe('Client Side Encryption Prose Tests', metadata, function () { const masterKey = { region: 'us-east-1', key: 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', - endpoint: '127.0.0.1:8002' + endpoint: '127.0.0.1:9002' }; - const masterKeyExpired = { ...masterKey, endpoint: '127.0.0.1:8000' }; - const masterKeyInvalidHostname = { ...masterKey, endpoint: '127.0.0.1:8001' }; + const masterKeyExpired = { ...masterKey, endpoint: '127.0.0.1:9000' }; + const masterKeyInvalidHostname = { ...masterKey, endpoint: '127.0.0.1:9001' }; it('should fail with no TLS', metadata, async function () { try { @@ -1730,12 +1730,12 @@ describe('Client Side Encryption Prose Tests', metadata, function () { tenantId: providers.azure.tenantId, clientId: providers.azure.clientId, clientSecret: providers.azure.clientId, - identityPlatformEndpoint: '127.0.0.1:8002' + identityPlatformEndpoint: '127.0.0.1:9002' }, 'gcp:no_client_cert': { email: providers.gcp.email, privateKey: providers.gcp.privateKey, - endpoint: '127.0.0.1:8002' + endpoint: '127.0.0.1:9002' }, 'kmip:no_client_cert': { endpoint: '127.0.0.1:5698' @@ -1748,12 +1748,12 @@ describe('Client Side Encryption Prose Tests', metadata, function () { tenantId: providers.azure.tenantId, clientId: providers.azure.clientId, clientSecret: providers.azure.clientId, - identityPlatformEndpoint: '127.0.0.1:8002' + identityPlatformEndpoint: '127.0.0.1:9002' }, 'gcp:with_tls': { email: providers.gcp.email, privateKey: providers.gcp.privateKey, - endpoint: '127.0.0.1:8002' + endpoint: '127.0.0.1:9002' }, 'kmip:with_tls': { endpoint: '127.0.0.1:5698' @@ -1800,7 +1800,7 @@ describe('Client Side Encryption Prose Tests', metadata, function () { masterKey: { region: 'us-east-1', key: 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', - endpoint: '127.0.0.1:8002' + endpoint: '127.0.0.1:9002' } }) .catch(e => e); @@ -1816,7 +1816,7 @@ describe('Client Side Encryption Prose Tests', metadata, function () { masterKey: { region: 'us-east-1', key: 'arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0', - endpoint: '127.0.0.1:8002' + endpoint: '127.0.0.1:9002' } }) .catch(e => e); diff --git a/test/readme.md b/test/readme.md index 5673fa02854..e0f39cada0c 100644 --- a/test/readme.md +++ b/test/readme.md @@ -520,15 +520,7 @@ source .evergreen/setup-fle.sh > By default, `setup-fle.sh` installs crypt_shared. If you want to test with mongocryptd instead, set the RUN_WITH_MONGOCRYPTD environment variable before > sourcing `setup-fle.sh`. - -3. Start the KMS and KMIP servers: - -```bash -bash .evergreen/run-kms-servers.sh -bash .evergreen/run-kmip-server.sh & -``` - -4. Run the functional tests: +3. Run the functional tests: ```bash export TEST_CSFLE=true npm run check:test