-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
a41846d
commit 8e87e5c
Showing
16 changed files
with
512 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -o errexit | ||
|
||
if [ -z ${AZUREKMS_RESOURCEGROUP+omitted} ]; then echo "AZUREKMS_RESOURCEGROUP is unset" && exit 1; fi | ||
if [ -z ${AZUREKMS_VMNAME+omitted} ]; then echo "AZUREKMS_VMNAME is unset" && exit 1; fi | ||
if [ -z ${AZUREKMS_PRIVATEKEYPATH+omitted} ]; then echo "AZUREKMS_PRIVATEKEYPATH is unset" && exit 1; fi | ||
|
||
source "${PROJECT_DIRECTORY}/.evergreen/init-nvm.sh" | ||
|
||
echo "compressing node driver source ... begin" | ||
tar -czf node-driver-source.tgz src | ||
echo "compressing node driver source ... end" | ||
|
||
export AZUREKMS_SRC=node-driver-source.tgz | ||
export AZUREKMS_DST="./" | ||
echo "copying node driver tar ... begin" | ||
"${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/copy-file.sh" | ||
echo "copying node driver tar ... end" | ||
|
||
echo "decompressing node driver tar on azure ... begin" | ||
export AZUREKMS_CMD="tar xf node-driver-source.tgz" | ||
"${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/run-command.sh" | ||
echo "decompressing node driver tar on azure ... end" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /user/bin/env bash | ||
|
||
if [ -z ${DRIVERS_TOOLS+omitted} ]; then echo "DRIVERS_TOOLS is unset" && exit 1; fi | ||
|
||
set -o errexit | ||
|
||
python3 $DRIVERS_TOOLS/.evergreen/csfle/bottle.py fake_azure:imds & | ||
|
||
echo "Running Azure KMS idms server on port 8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -o errexit | ||
|
||
pushd "src" | ||
PROJECT_DIRECTORY="$(pwd)" | ||
export PROJECT_DIRECTORY | ||
source ".evergreen/init-nvm.sh" | ||
|
||
set -o xtrace | ||
|
||
npm install --force 'mongodb-client-encryption@latest' | ||
|
||
export MONGODB_URI="mongodb://localhost:27017" | ||
|
||
export EXPECTED_AZUREKMS_OUTCOME=${EXPECTED_AZUREKMS_OUTCOME:-omitted} | ||
export TEST_CSFLE=true | ||
export CSFLE_KMS_PROVIDERS='not json' | ||
|
||
npx mocha --config test/mocha_mongodb.json test/integration/client-side-encryption/client_side_encryption.prose.19.on_demand_azure.test.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#! /usr/bin/env bash | ||
|
||
echo "${testazurekms_publickey}" > /tmp/testazurekms_publickey | ||
echo "${testazurekms_privatekey}" > /tmp/testazurekms_privatekey | ||
|
||
# Set 600 permissions on private key file. Otherwise ssh / scp may error with permissions "are too open". | ||
chmod 600 /tmp/testazurekms_privatekey | ||
export AZUREKMS_CLIENTID=${AZUREKMS_CLIENTID} | ||
export AZUREKMS_TENANTID=${AZUREKMS_TENANTID} | ||
export AZUREKMS_SECRET=${AZUREKMS_SECRET} | ||
export AZUREKMS_DRIVERS_TOOLS=$DRIVERS_TOOLS | ||
export AZUREKMS_RESOURCEGROUP=${AZUREKMS_RESOURCEGROUP} | ||
export AZUREKMS_PUBLICKEYPATH=/tmp/testazurekms_publickey | ||
export AZUREKMS_PRIVATEKEYPATH=/tmp/testazurekms_privatekey | ||
export AZUREKMS_SCOPE=${AZUREKMS_SCOPE} | ||
export AZUREKMS_VMNAME_PREFIX=NODEDRIVER | ||
|
||
$DRIVERS_TOOLS/.evergreen/csfle/azurekms/create-and-setup-vm.sh | ||
|
||
echo "AZUREKMS_PRIVATEKEYPATH: /tmp/testazurekms_privatekey" >> testazurekms-expansions.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.