@@ -381,6 +381,17 @@ functions:
381
381
params :
382
382
file : src/deps-expansion.yml
383
383
384
+ " install aws-credential-providers " :
385
+ - command : shell.exec
386
+ type : setup
387
+ params :
388
+ shell : bash
389
+ working_dir : " src"
390
+ script : |
391
+ ${PREPARE_SHELL}
392
+ source "${PROJECT_DIRECTORY}/.evergreen/init-nvm.sh"
393
+ npm install @aws-sdk/credential-providers
394
+
384
395
" run atlas tests " :
385
396
- command : shell.exec
386
397
type : test
@@ -520,7 +531,12 @@ functions:
520
531
"iam_auth_assume_role_name" : "${iam_auth_assume_role_name}",
521
532
"iam_auth_ec2_instance_account" : "${iam_auth_ec2_instance_account}",
522
533
"iam_auth_ec2_instance_secret_access_key" : "${iam_auth_ec2_instance_secret_access_key}",
523
- "iam_auth_ec2_instance_profile" : "${iam_auth_ec2_instance_profile}"
534
+ "iam_auth_ec2_instance_profile" : "${iam_auth_ec2_instance_profile}",
535
+ "iam_auth_assume_web_role_name": "${iam_auth_assume_web_role_name}",
536
+ "iam_web_identity_issuer": "${iam_web_identity_issuer}",
537
+ "iam_web_identity_rsa_key": "${iam_web_identity_rsa_key}",
538
+ "iam_web_identity_jwks_uri": "${iam_web_identity_jwks_uri}",
539
+ "iam_web_identity_token_file": "${iam_web_identity_token_file}"
524
540
}
525
541
EOF
526
542
@@ -672,6 +688,55 @@ functions:
672
688
${PREPARE_SHELL}
673
689
${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh
674
690
691
+ " run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME set " :
692
+ - command : shell.exec
693
+ type : test
694
+ params :
695
+ working_dir : " src"
696
+ silent : true
697
+ script : |
698
+ cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
699
+ . ./activate_venv.sh
700
+ ${MONGODB_BINARIES}/mongo --verbose aws_e2e_web_identity.js
701
+ cd -
702
+ cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
703
+ export AWS_WEB_IDENTITY_TOKEN_FILE=${iam_web_identity_token_file}
704
+ export AWS_ROLE_ARN=${iam_auth_assume_web_role_name}
705
+ export AWS_ROLE_SESSION_NAME='test'
706
+ export MONGODB_URI="mongodb://localhost:27017/aws?authMechanism=MONGODB-AWS"
707
+ EOF
708
+ - command : shell.exec
709
+ type : test
710
+ params :
711
+ working_dir : " src"
712
+ script : |
713
+ ${PREPARE_SHELL}
714
+ ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh
715
+
716
+ " run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME unset " :
717
+ - command : shell.exec
718
+ type : test
719
+ params :
720
+ working_dir : " src"
721
+ silent : true
722
+ script : |
723
+ cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
724
+ . ./activate_venv.sh
725
+ ${MONGODB_BINARIES}/mongo --verbose aws_e2e_web_identity.js
726
+ cd -
727
+ cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
728
+ export AWS_WEB_IDENTITY_TOKEN_FILE=${iam_web_identity_token_file}
729
+ export AWS_ROLE_ARN=${iam_auth_assume_web_role_name}
730
+ export MONGODB_URI="mongodb://localhost:27017/aws?authMechanism=MONGODB-AWS"
731
+ EOF
732
+ - command : shell.exec
733
+ type : test
734
+ params :
735
+ working_dir : " src"
736
+ script : |
737
+ ${PREPARE_SHELL}
738
+ ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh
739
+
675
740
" run aws ECS auth test " :
676
741
- command : shell.exec
677
742
type : test
0 commit comments