@@ -69,6 +69,7 @@ functions:
6969 PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
7070 PREPARE_SHELL: |
7171 set -o errexit
72+ export SKIP_LEGACY_SHELL=1
7273 export DRIVERS_TOOLS="$DRIVERS_TOOLS"
7374 export MONGO_ORCHESTRATION_HOME="$MONGO_ORCHESTRATION_HOME"
7475 export MONGODB_BINARIES="$MONGODB_BINARIES"
@@ -556,11 +557,9 @@ functions:
556557 add_expansions_to_env : true
557558 working_dir : " src"
558559 script : |
559- # Disable xtrace for security reasons (just in case it was accidentally set).
560- set +x
561- set -o errexit
562-
563- bash ${PROJECT_DIRECTORY}/.evergreen/tox.sh -m aws-secrets -- drivers/aws_auth
560+ ${PREPARE_SHELL}
561+ cd $DRIVERS_TOOLS/.evergreen/auth_aws
562+ ./setup_secrets.sh drivers/aws_auth
564563
565564 " run aws auth test with regular aws credentials " :
566565 - command : shell.exec
@@ -569,13 +568,8 @@ functions:
569568 shell : " bash"
570569 working_dir : " src"
571570 script : |
572- # Disable xtrace for security reasons (just in case it was accidentally set).
573- set +x
574- set -o errexit
575-
576- PYTHON_BINARY="${PYTHON_BINARY}" \
577- DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
578- .evergreen/run-mongodb-aws-test.sh regular
571+ ${PREPARE_SHELL}
572+ .evergreen/run-mongodb-aws-test.sh regular
579573
580574 " run aws auth test with assume role credentials " :
581575 - command : shell.exec
@@ -584,15 +578,8 @@ functions:
584578 shell : " bash"
585579 working_dir : " src"
586580 script : |
587- # Disable xtrace for security reasons (just in case it was accidentally set).
588- set +x
589- set -o errexit
590-
591- DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
592- ASSUME_ROLE_CREDENTIALS=true \
593- PYTHON_BINARY="${PYTHON_BINARY}" \
594- .evergreen/run-mongodb-aws-test.sh assume-role
595-
581+ ${PREPARE_SHELL}
582+ .evergreen/run-mongodb-aws-test.sh assume-role
596583
597584 " run aws auth test with aws EC2 credentials " :
598585 - command : shell.exec
@@ -605,16 +592,8 @@ functions:
605592 echo "This platform does not support the EC2 auth test, skipping..."
606593 exit 0
607594 fi
608-
609- # Disable xtrace for security reasons (just in case it was accidentally set).
610- set +x
611- set -o errexit
612-
613- PYTHON_BINARY=${PYTHON_BINARY} \
614- DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
615- ASSERT_NO_URI_CREDS=true \
616- SKIP_PREPARE_AWS_ENV=true \
617- .evergreen/run-mongodb-aws-test.sh ec2
595+ ${PREPARE_SHELL}
596+ .evergreen/run-mongodb-aws-test.sh ec2
618597
619598 " run aws auth test with aws web identity credentials " :
620599 - command : shell.exec
@@ -627,25 +606,12 @@ functions:
627606 echo "This platform does not support the web identity auth test, skipping..."
628607 exit 0
629608 fi
630-
631- DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
632- PYTHON_BINARY="${PYTHON_BINARY}" \
633- ASSERT_NO_URI_CREDS=true \
634- USE_WEB_IDENTITY_CREDS=true \
609+ ${PREPARE_SHELL}
610+ # Test with and without AWS_ROLE_SESSION_NAME set.
611+ .evergreen/run-mongodb-aws-test.sh web-identity
612+ AWS_ROLE_SESSION_NAME="test" \
635613 .evergreen/run-mongodb-aws-test.sh web-identity
636614
637- if [ "${skip_web_identity_auth_test}" = "true" ]; then
638- echo "This platform does not support the web identity auth test, skipping..."
639- else
640- DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
641- PYTHON_BINARY=${PYTHON_BINARY} \
642- ASSERT_NO_URI_CREDS=true \
643- SKIP_PREPARE_AWS_ENV=true \
644- AWS_ROLE_SESSION_NAME="test" \
645- USE_WEB_IDENTITY_CREDS=true \
646- .evergreen/run-mongodb-aws-test.sh
647- fi
648-
649615 " run oidc auth test with aws credentials " :
650616 - command : ec2.assume_role
651617 params :
@@ -667,17 +633,8 @@ functions:
667633 working_dir : " src"
668634 shell : bash
669635 script : |
670- # Disable xtrace for security reasons (just in case it was accidentally set).
671- set +x
672- set -o errexit
673-
674- PYTHON_BINARY="${PYTHON_BINARY}" \
675- DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
676- PROJECT_DIRECTORY="${PROJECT_DIRECTORY}" \
677- ASSERT_NO_URI_CREDS=true \
678- SKIP_PREPARE_AWS_ENV=true \
679- USE_ENV_VAR_CREDS=true \
680- .evergreen/run-mongodb-aws-test.sh
636+ ${PREPARE_SHELL}
637+ .evergreen/run-mongodb-aws-test.sh env-creds
681638
682639 " run aws auth test with aws credentials and session token as environment variables " :
683640 - command : shell.exec
@@ -686,16 +643,8 @@ functions:
686643 working_dir : " src"
687644 shell : bash
688645 script : |
689- # Disable xtrace for security reasons (just in case it was accidentally set).
690- set +x
691- set -o errexit
692-
693- PYTHON_BINARY="${PYTHON_BINARY}" \
694- DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
695- PROJECT_DIRECTORY="${PROJECT_DIRECTORY}" \
696- ASSERT_NO_URI_CREDS=true \
697- SESSION_TOKEN_CREDENTIALS=true \
698- .evergreen/run-mongodb-aws-test.sh
646+ ${PREPARE_SHELL}
647+ .evergreen/run-mongodb-aws-test.sh session-creds
699648
700649 " run aws ECS auth test " :
701650 - command : shell.exec
@@ -708,24 +657,8 @@ functions:
708657 echo "This platform does not support the ECS auth test, skipping..."
709658 exit 0
710659 fi
711-
712- # Disable xtrace for security reasons (just in case it was accidentally set).
713- set +x
714- set -o errexit
715-
716- # Try to source exported AWS Secrets
717- if [ -f ./secrets-export.sh ]; then
718- source ./secrets-export.sh
719- fi
720-
721- cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
722- . ./activate-authawsvenv.sh
723-
724- export MONGODB_BINARIES="${MONGODB_BINARIES}";
725- export PROJECT_DIRECTORY="${PROJECT_DIRECTORY}";
726-
727- python aws_tester.py ecs
728- cd -
660+ ${PREPARE_SHELL}
661+ .evergreen/run-mongodb-aws-test.sh session-creds
729662
730663 " cleanup " :
731664 - command : shell.exec
0 commit comments