Skip to content

Commit

Permalink
clean up secrets handling
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Aug 28, 2023
1 parent 3bd9612 commit c576e85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ functions:
run-atlas-test:
- command: ec2.assume_role
params:
role_arn: "arn:aws:iam::857654397073:role/drivers-test-secrets-role"
role_arn: "${aws_test_secrets_role}"
- command: shell.exec
type: test
params:
Expand Down
15 changes: 2 additions & 13 deletions etc/get_aws_secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,5 @@ if [ -z "$DRIVERS_TOOLS" ]; then
exit 1
fi

pushd ${DRIVERS_TOOLS}/.evergreen/auth_aws
. ./activate-authawsvenv.sh
popd

# TODO: Add a section to https://wiki.corp.mongodb.com/display/DRIVERS/Using+AWS+Secrets+Manager+to+Store+Testing+Secrets
# about using a bash script that can be run locally
# Add this note:
# Note: for local testing using AWS SSO credentials,
# you may need to set the AWS_PROFILE environment variable
# to point to your local profile name.
echo "Getting secrets: $@"
python ${DRIVERS_TOOLS}/.evergreen/auth_aws/setup_secrets.py $@
echo "Got secrets"
bash $DRIVERS_TOOLS/.evergreen/auth_aws/setup_secrets.sh $@
. ./secrets-export.sh
4 changes: 2 additions & 2 deletions etc/run-atlas-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
set -eu
set +x

bash etc/get_aws_secrets.sh drivers/atlas_connect
. ./secrets-export.sh
# Get the atlas secrets.
. etc/get_aws_secrets.sh drivers/atlas_connect

echo "Running cmd/testatlas/main.go"
go run ./cmd/testatlas/main.go "$ATLAS_REPL" "$ATLAS_SHRD" "$ATLAS_FREE" "$ATLAS_TLS11" "$ATLAS_TLS12" "$ATLAS_SERVERLESS" "$ATLAS_SRV_REPL" "$ATLAS_SRV_SHRD" "$ATLAS_SRV_FREE" "$ATLAS_SRV_TLS11" "$ATLAS_SRV_TLS12" "$ATLAS_SRV_SERVERLESS"

0 comments on commit c576e85

Please sign in to comment.