@@ -350,6 +350,23 @@ functions:
350350 chmod +x $i
351351 done
352352
353+ assume-ec2-role :
354+ - command : ec2.assume_role
355+ params :
356+ role_arn : ${aws_test_secrets_role}
357+
358+ run-oidc-auth-test-with-test-credentials :
359+ - command : shell.exec
360+ type : test
361+ params :
362+ working_dir : src/go.mongodb.org/mongo-driver
363+ shell : bash
364+ include_expansions_in_env : ["DRIVERS_TOOLS", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
365+ script : |
366+ ${PREPARE_SHELL}
367+ export OIDC="oidc"
368+ bash ${PROJECT_DIRECTORY}/etc/run-oidc-test.sh
369+
353370 run-make :
354371 - command : shell.exec
355372 type : test
@@ -1954,6 +1971,10 @@ tasks:
19541971 popd
19551972 ./.evergreen/run-deployed-lambda-aws-tests.sh
19561973
1974+ - name : " oidc-auth-test-latest"
1975+ commands :
1976+ - func : " run-oidc-auth-test-with-test-credentials"
1977+
19571978 - name : " test-search-index"
19581979 commands :
19591980 - func : " bootstrap-mongo-orchestration"
@@ -2247,6 +2268,31 @@ task_groups:
22472268 tasks :
22482269 - testazurekms-task
22492270
2271+ - name : testoidc_task_group
2272+ setup_group :
2273+ - func : fetch-source
2274+ - func : prepare-resources
2275+ - func : fix-absolute-paths
2276+ - func : make-files-executable
2277+ - func : assume-ec2-role
2278+ - command : shell.exec
2279+ params :
2280+ shell : bash
2281+ include_expansions_in_env : ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
2282+ script : |
2283+ ${PREPARE_SHELL}
2284+ ${DRIVERS_TOOLS}/.evergreen/auth_oidc/setup.sh
2285+ teardown_task :
2286+ - command : subprocess.exec
2287+ params :
2288+ binary : bash
2289+ args :
2290+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/teardown.sh
2291+ setup_group_can_fail_task : true
2292+ setup_group_timeout_secs : 1800
2293+ tasks :
2294+ - oidc-auth-test-latest
2295+
22502296 - name : test-aws-lambda-task-group
22512297 setup_group :
22522298 - func : fetch-source
@@ -2586,3 +2632,13 @@ buildvariants:
25862632 - name : testazurekms_task_group
25872633 batchtime : 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README
25882634 - testazurekms-fail-task
2635+
2636+ - name : testoidc-variant
2637+ display_name : " OIDC"
2638+ run_on :
2639+ - ubuntu2204-large
2640+ expansions :
2641+ GO_DIST : " /opt/golang/go1.20"
2642+ tasks :
2643+ - name : testoidc_task_group
2644+ batchtime : 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README
0 commit comments