@@ -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 'make -s evg-test-oidc-auth'
369+
353370 run-make :
354371 - command : shell.exec
355372 type : test
@@ -560,8 +577,6 @@ functions:
560577 working_dir : src/go.mongodb.org/mongo-driver
561578 script : |
562579 ${PREPARE_SHELL}
563-
564- IS_SERVERLESS_PROXY="${IS_SERVERLESS_PROXY}" \
565580 bash etc/run-serverless-test.sh
566581
567582 run-atlas-data-lake-test :
@@ -1954,6 +1969,60 @@ tasks:
19541969 popd
19551970 ./.evergreen/run-deployed-lambda-aws-tests.sh
19561971
1972+ - name : " oidc-auth-test-latest"
1973+ commands :
1974+ - func : " run-oidc-auth-test-with-test-credentials"
1975+
1976+ - name : " oidc-auth-test-azure-latest"
1977+ commands :
1978+ - command : shell.exec
1979+ params :
1980+ working_dir : src/go.mongodb.org/mongo-driver
1981+ shell : bash
1982+ script : |-
1983+ set -o errexit
1984+ ${PREPARE_SHELL}
1985+ export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-go-driver.tar.gz
1986+ # we need to statically link libc to avoid the situation where the VM has a different
1987+ # version of libc
1988+ go build -tags osusergo,netgo -ldflags '-w -extldflags "-static -lgcc -lc"' -o test ./cmd/testoidcauth/main.go
1989+ rm "$AZUREOIDC_DRIVERS_TAR_FILE" || true
1990+ tar -cf $AZUREOIDC_DRIVERS_TAR_FILE ./test
1991+ tar -uf $AZUREOIDC_DRIVERS_TAR_FILE ./etc
1992+ rm "$AZUREOIDC_DRIVERS_TAR_FILE".gz || true
1993+ gzip $AZUREOIDC_DRIVERS_TAR_FILE
1994+ export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-go-driver.tar.gz
1995+ # Define the command to run on the azure VM.
1996+ # Ensure that we source the environment file created for us, set up any other variables we need,
1997+ # and then run our test suite on the vm.
1998+ export AZUREOIDC_TEST_CMD="PROJECT_DIRECTORY='.' OIDC_ENV=azure OIDC=oidc ./etc/run-oidc-test.sh ./test"
1999+ bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
2000+
2001+ - name : " oidc-auth-test-gcp-latest"
2002+ commands :
2003+ - command : shell.exec
2004+ params :
2005+ working_dir : src/go.mongodb.org/mongo-driver
2006+ shell : bash
2007+ script : |-
2008+ set -o errexit
2009+ ${PREPARE_SHELL}
2010+ export GCPOIDC_DRIVERS_TAR_FILE=/tmp/mongo-go-driver.tar.gz
2011+ # we need to statically link libc to avoid the situation where the VM has a different
2012+ # version of libc
2013+ go build -tags osusergo,netgo -ldflags '-w -extldflags "-static -lgcc -lc"' -o test ./cmd/testoidcauth/main.go
2014+ rm "$GCPOIDC_DRIVERS_TAR_FILE" || true
2015+ tar -cf $GCPOIDC_DRIVERS_TAR_FILE ./test
2016+ tar -uf $GCPOIDC_DRIVERS_TAR_FILE ./etc
2017+ rm "$GCPOIDC_DRIVERS_TAR_FILE".gz || true
2018+ gzip $GCPOIDC_DRIVERS_TAR_FILE
2019+ export GCPOIDC_DRIVERS_TAR_FILE=/tmp/mongo-go-driver.tar.gz
2020+ # Define the command to run on the gcp VM.
2021+ # Ensure that we source the environment file created for us, set up any other variables we need,
2022+ # and then run our test suite on the vm.
2023+ export GCPOIDC_TEST_CMD="PROJECT_DIRECTORY='.' OIDC_ENV=gcp OIDC=oidc ./etc/run-oidc-test.sh ./test"
2024+ bash $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/run-driver-test.sh
2025+
19572026 - name : " test-search-index"
19582027 commands :
19592028 - func : " bootstrap-mongo-orchestration"
@@ -2014,7 +2083,7 @@ axes:
20142083 - id : " windows-64-go-1-20"
20152084 display_name : " Windows 64-bit"
20162085 run_on :
2017- - windows-vsCurrent-latest- small
2086+ - windows-vsCurrent-small
20182087 variables :
20192088 GCC_PATH : " /cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
20202089 GO_DIST : " C:\\ golang\\ go1.20"
@@ -2038,7 +2107,7 @@ axes:
20382107 - id : " windows-64-go-1-20"
20392108 display_name : " Windows 64-bit"
20402109 run_on :
2041- - windows-vsCurrent-latest- small
2110+ - windows-vsCurrent-small
20422111 variables :
20432112 GCC_PATH : " /cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
20442113 GO_DIST : " C:\\ golang\\ go1.20"
@@ -2070,7 +2139,7 @@ axes:
20702139 - id : " windows-64-vsCurrent-latest-small-go-1-20"
20712140 display_name : " Windows 64-bit"
20722141 run_on :
2073- - windows-vsCurrent-latest- small
2142+ - windows-vsCurrent-small
20742143 variables :
20752144 GCC_PATH : " /cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
20762145 GO_DIST : " C:\\ golang\\ go1.20"
@@ -2108,17 +2177,6 @@ axes:
21082177 variables :
21092178 GO_DIST : " /opt/golang/go1.20"
21102179
2111- - id : serverless-type
2112- display_name : " Serverless Type"
2113- values :
2114- - id : " original"
2115- display_name : " Serverless"
2116- - id : " proxy"
2117- display_name : " Serverless Proxy"
2118- variables :
2119- VAULT_NAME : " serverless_next"
2120- IS_SERVERLESS_PROXY : " true"
2121-
21222180task_groups :
21232181 - name : serverless_task_group
21242182 setup_group_can_fail_task : true
@@ -2247,6 +2305,79 @@ task_groups:
22472305 tasks :
22482306 - testazurekms-task
22492307
2308+ - name : testoidc_task_group
2309+ setup_group :
2310+ - func : fetch-source
2311+ - func : prepare-resources
2312+ - func : fix-absolute-paths
2313+ - func : make-files-executable
2314+ - func : assume-ec2-role
2315+ - command : shell.exec
2316+ params :
2317+ shell : bash
2318+ include_expansions_in_env : ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
2319+ script : |
2320+ ${PREPARE_SHELL}
2321+ ${DRIVERS_TOOLS}/.evergreen/auth_oidc/setup.sh
2322+ teardown_task :
2323+ - command : subprocess.exec
2324+ params :
2325+ binary : bash
2326+ args :
2327+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/teardown.sh
2328+ setup_group_can_fail_task : true
2329+ setup_group_timeout_secs : 1800
2330+ tasks :
2331+ - oidc-auth-test-latest
2332+
2333+ - name : testazureoidc_task_group
2334+ setup_group :
2335+ - func : fetch-source
2336+ - func : prepare-resources
2337+ - func : fix-absolute-paths
2338+ - func : make-files-executable
2339+ - command : subprocess.exec
2340+ params :
2341+ binary : bash
2342+ env :
2343+ AZUREOIDC_VMNAME_PREFIX : " GO_DRIVER"
2344+ args :
2345+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
2346+ teardown_task :
2347+ - command : subprocess.exec
2348+ params :
2349+ binary : bash
2350+ args :
2351+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/delete-vm.sh
2352+ setup_group_can_fail_task : true
2353+ setup_group_timeout_secs : 1800
2354+ tasks :
2355+ - oidc-auth-test-azure-latest
2356+
2357+ - name : testgcpoidc_task_group
2358+ setup_group :
2359+ - func : fetch-source
2360+ - func : prepare-resources
2361+ - func : fix-absolute-paths
2362+ - func : make-files-executable
2363+ - command : subprocess.exec
2364+ params :
2365+ binary : bash
2366+ env :
2367+ AZUREOIDC_VMNAME_PREFIX : " GO_DRIVER"
2368+ args :
2369+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/setup.sh
2370+ teardown_task :
2371+ - command : subprocess.exec
2372+ params :
2373+ binary : bash
2374+ args :
2375+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/teardown.sh
2376+ setup_group_can_fail_task : true
2377+ setup_group_timeout_secs : 1800
2378+ tasks :
2379+ - oidc-auth-test-gcp-latest
2380+
22502381 - name : test-aws-lambda-task-group
22512382 setup_group :
22522383 - func : fetch-source
@@ -2391,23 +2522,48 @@ buildvariants:
23912522 tasks :
23922523 - name : " test-docker-runner"
23932524
2394- - matrix_name : " tests-36-with-zlib-support"
2525+ - matrix_name : " tests-rhel- 36-with-zlib-support"
23952526 tags : ["pullrequest"]
2396- matrix_spec : { version: ["3.6"], os-ssl-32: ["windows-64-go-1-20", " rhel87-64-go-1-20"] }
2527+ matrix_spec : { version: ["3.6"], os-ssl-32: ["rhel87-64-go-1-20"] }
23972528 display_name : " ${version} ${os-ssl-32}"
23982529 tasks :
23992530 - name : " .test !.enterprise-auth !.snappy !.zstd"
24002531
2401- - matrix_name : " tests-40-with-zlib-support"
2532+ - matrix_name : " tests-windows-36-with-zlib-support"
2533+ matrix_spec : { version: ["3.6"], os-ssl-32: ["windows-64-go-1-20"] }
2534+ display_name : " ${version} ${os-ssl-32}"
2535+ tasks :
2536+ - name : " .test !.enterprise-auth !.snappy !.zstd"
2537+
2538+ - matrix_name : " tests-rhel-40-with-zlib-support"
24022539 tags : ["pullrequest"]
2403- matrix_spec : { version: ["4.0"], os-ssl-40: ["windows-64-go-1-20", "rhel87-64-go-1-20"] }
2540+ matrix_spec : { version: ["4.0"], os-ssl-40: ["rhel87-64-go-1-20"] }
2541+ display_name : " ${version} ${os-ssl-40}"
2542+ tasks :
2543+ - name : " .test !.enterprise-auth !.snappy !.zstd"
2544+
2545+ - matrix_name : " tests-windows-40-with-zlib-support"
2546+ matrix_spec : { version: ["4.0"], os-ssl-40: ["windows-64-go-1-20"] }
24042547 display_name : " ${version} ${os-ssl-40}"
24052548 tasks :
24062549 - name : " .test !.enterprise-auth !.snappy !.zstd"
24072550
2408- - matrix_name : " tests-42-plus-zlib-zstd-support"
2551+ - matrix_name : " tests-rhel-42-plus-zlib-zstd-support"
2552+ tags : ["pullrequest"]
2553+ matrix_spec : { version: ["4.2", "4.4", "5.0", "6.0", "7.0", "8.0"], os-ssl-40: ["rhel87-64-go-1-20"] }
2554+ display_name : " ${version} ${os-ssl-40}"
2555+ tasks :
2556+ - name : " .test !.enterprise-auth !.snappy"
2557+
2558+ - matrix_name : " tests-windows-42-plus-zlib-zstd-support"
2559+ matrix_spec : { version: ["4.2", "4.4", "5.0", "6.0", "7.0"], os-ssl-40: ["windows-64-go-1-20"] }
2560+ display_name : " ${version} ${os-ssl-40}"
2561+ tasks :
2562+ - name : " .test !.enterprise-auth !.snappy"
2563+
2564+ - matrix_name : " tests-windows-80-zlib-zstd-support"
24092565 tags : ["pullrequest"]
2410- matrix_spec : { version: ["4.2", "4.4", "5.0", "6.0", "7.0", " 8.0"], os-ssl-40: ["windows-64-go-1-20", "rhel87 -64-go-1-20"] }
2566+ matrix_spec : { version: ["8.0"], os-ssl-40: ["windows-64-go-1-20"] }
24112567 display_name : " ${version} ${os-ssl-40}"
24122568 tasks :
24132569 - name : " .test !.enterprise-auth !.snappy"
@@ -2494,14 +2650,8 @@ buildvariants:
24942650
24952651 - matrix_name : " serverless"
24962652 tags : ["pullrequest"]
2497- matrix_spec : { os-serverless: "*", serverless-type: "original" }
2498- display_name : " ${serverless-type} ${os-serverless}"
2499- tasks :
2500- - " serverless_task_group"
2501-
2502- - matrix_name : " serverless-proxy"
2503- matrix_spec : { os-serverless: "*", serverless-type: "proxy" }
2504- display_name : " ${serverless-type} ${os-serverless}"
2653+ matrix_spec : { os-serverless: "*" }
2654+ display_name : " Serverless ${os-serverless}"
25052655 tasks :
25062656 - " serverless_task_group"
25072657
@@ -2561,3 +2711,17 @@ buildvariants:
25612711 - name : testazurekms_task_group
25622712 batchtime : 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README
25632713 - testazurekms-fail-task
2714+
2715+ - name : testoidc-variant
2716+ display_name : " OIDC"
2717+ run_on :
2718+ - ubuntu2204-large
2719+ expansions :
2720+ GO_DIST : " /opt/golang/go1.20"
2721+ tasks :
2722+ - name : testoidc_task_group
2723+ batchtime : 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README
2724+ - name : testazureoidc_task_group
2725+ batchtime : 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README
2726+ - name : testgcpoidc_task_group
2727+ batchtime : 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README
0 commit comments