@@ -350,6 +350,23 @@ functions:
350
350
chmod +x $i
351
351
done
352
352
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
+
353
370
run-make :
354
371
- command : shell.exec
355
372
type : test
@@ -560,8 +577,6 @@ functions:
560
577
working_dir : src/go.mongodb.org/mongo-driver
561
578
script : |
562
579
${PREPARE_SHELL}
563
-
564
- IS_SERVERLESS_PROXY="${IS_SERVERLESS_PROXY}" \
565
580
bash etc/run-serverless-test.sh
566
581
567
582
run-atlas-data-lake-test :
@@ -1954,6 +1969,60 @@ tasks:
1954
1969
popd
1955
1970
./.evergreen/run-deployed-lambda-aws-tests.sh
1956
1971
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
+
1957
2026
- name : " test-search-index"
1958
2027
commands :
1959
2028
- func : " bootstrap-mongo-orchestration"
@@ -2014,7 +2083,7 @@ axes:
2014
2083
- id : " windows-64-go-1-20"
2015
2084
display_name : " Windows 64-bit"
2016
2085
run_on :
2017
- - windows-vsCurrent-latest- small
2086
+ - windows-vsCurrent-small
2018
2087
variables :
2019
2088
GCC_PATH : " /cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
2020
2089
GO_DIST : " C:\\ golang\\ go1.20"
@@ -2038,7 +2107,7 @@ axes:
2038
2107
- id : " windows-64-go-1-20"
2039
2108
display_name : " Windows 64-bit"
2040
2109
run_on :
2041
- - windows-vsCurrent-latest- small
2110
+ - windows-vsCurrent-small
2042
2111
variables :
2043
2112
GCC_PATH : " /cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
2044
2113
GO_DIST : " C:\\ golang\\ go1.20"
@@ -2070,7 +2139,7 @@ axes:
2070
2139
- id : " windows-64-vsCurrent-latest-small-go-1-20"
2071
2140
display_name : " Windows 64-bit"
2072
2141
run_on :
2073
- - windows-vsCurrent-latest- small
2142
+ - windows-vsCurrent-small
2074
2143
variables :
2075
2144
GCC_PATH : " /cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
2076
2145
GO_DIST : " C:\\ golang\\ go1.20"
@@ -2108,17 +2177,6 @@ axes:
2108
2177
variables :
2109
2178
GO_DIST : " /opt/golang/go1.20"
2110
2179
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
-
2122
2180
task_groups :
2123
2181
- name : serverless_task_group
2124
2182
setup_group_can_fail_task : true
@@ -2247,6 +2305,79 @@ task_groups:
2247
2305
tasks :
2248
2306
- testazurekms-task
2249
2307
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
+
2250
2381
- name : test-aws-lambda-task-group
2251
2382
setup_group :
2252
2383
- func : fetch-source
@@ -2391,23 +2522,48 @@ buildvariants:
2391
2522
tasks :
2392
2523
- name : " test-docker-runner"
2393
2524
2394
- - matrix_name : " tests-36-with-zlib-support"
2525
+ - matrix_name : " tests-rhel- 36-with-zlib-support"
2395
2526
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"] }
2397
2528
display_name : " ${version} ${os-ssl-32}"
2398
2529
tasks :
2399
2530
- name : " .test !.enterprise-auth !.snappy !.zstd"
2400
2531
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"
2402
2539
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"] }
2404
2547
display_name : " ${version} ${os-ssl-40}"
2405
2548
tasks :
2406
2549
- name : " .test !.enterprise-auth !.snappy !.zstd"
2407
2550
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"
2409
2565
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"] }
2411
2567
display_name : " ${version} ${os-ssl-40}"
2412
2568
tasks :
2413
2569
- name : " .test !.enterprise-auth !.snappy"
@@ -2494,14 +2650,8 @@ buildvariants:
2494
2650
2495
2651
- matrix_name : " serverless"
2496
2652
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}"
2505
2655
tasks :
2506
2656
- " serverless_task_group"
2507
2657
@@ -2561,3 +2711,17 @@ buildvariants:
2561
2711
- name : testazurekms_task_group
2562
2712
batchtime : 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README
2563
2713
- 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