@@ -68,6 +68,59 @@ functions:
68
68
- .evergreen/run-kms-servers.sh
69
69
env :
70
70
DRIVERS_TOOLS : ${DRIVERS_TOOLS}
71
+ bootstrap oidc :
72
+ - command : ec2.assume_role
73
+ params :
74
+ role_arn : ${OIDC_AWS_ROLE_ARN}
75
+ - command : shell.exec
76
+ type : test
77
+ params :
78
+ working_dir : src
79
+ shell : bash
80
+ script : |
81
+ ${PREPARE_SHELL}
82
+
83
+ # TODO(NODE-5035): Remove when merged - need to replace with branch just for OIDC.
84
+ rm -rf "${DRIVERS_TOOLS}"
85
+ git clone --branch DRIVERS-2415 https://github.com/blink1073/drivers-evergreen-tools.git "${DRIVERS_TOOLS}"
86
+
87
+ cd "${DRIVERS_TOOLS}"/.evergreen/auth_oidc
88
+
89
+ # This is a bit confusing but the ec2.assume_role command before
90
+ # this task will overwrite these variables to a different value
91
+ # than we have set in our evergreen project config. As these are
92
+ # now specific to the OIDC ARN, we re-export for the python
93
+ # scripts.
94
+ export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
95
+ export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
96
+ export AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
97
+ export AWS_TOKEN_DIR=/tmp/tokens
98
+
99
+ . ./activate_venv.sh
100
+ python oidc_write_orchestration.py
101
+ python oidc_get_tokens.py
102
+ setup oidc roles :
103
+ - command : subprocess.exec
104
+ params :
105
+ working_dir : src
106
+ binary : bash
107
+ args :
108
+ - .evergreen/setup-oidc-roles.sh
109
+ env :
110
+ DRIVERS_TOOLS : ${DRIVERS_TOOLS}
111
+ run oidc tests aws :
112
+ - command : shell.exec
113
+ type : test
114
+ params :
115
+ working_dir : src
116
+ timeout_secs : 300
117
+ shell : bash
118
+ script : |
119
+ ${PREPARE_SHELL}
120
+
121
+ AWS_WEB_IDENTITY_TOKEN_FILE="/tmp/tokens/test1" \
122
+ PROJECT_DIRECTORY="${PROJECT_DIRECTORY}" \
123
+ bash ${PROJECT_DIRECTORY}/.evergreen/run-oidc-tests.sh
71
124
run tests :
72
125
- command : shell.exec
73
126
type : test
@@ -1380,6 +1433,22 @@ tasks:
1380
1433
commands :
1381
1434
- func : install dependencies
1382
1435
- func : run ldap tests
1436
+ - name : test-auth-oidc
1437
+ tags :
1438
+ - latest
1439
+ - replica_set
1440
+ - oidc
1441
+ commands :
1442
+ - func : install dependencies
1443
+ - func : bootstrap oidc
1444
+ - func : bootstrap mongo-orchestration
1445
+ vars :
1446
+ VERSION : latest
1447
+ TOPOLOGY : replica_set
1448
+ AUTH : auth
1449
+ ORCHESTRATION_FILE : auth-oidc.json
1450
+ - func : setup oidc roles
1451
+ - func : run oidc tests aws
1383
1452
- name : test-socks5
1384
1453
tags : []
1385
1454
commands :
@@ -3005,6 +3074,7 @@ buildvariants:
3005
3074
- test-latest-load-balanced
3006
3075
- test-auth-kerberos
3007
3076
- test-auth-ldap
3077
+ - test-auth-oidc
3008
3078
- test-socks5
3009
3079
- test-socks5-csfle
3010
3080
- test-socks5-tls
@@ -3054,6 +3124,7 @@ buildvariants:
3054
3124
- test-latest-load-balanced
3055
3125
- test-auth-kerberos
3056
3126
- test-auth-ldap
3127
+ - test-auth-oidc
3057
3128
- test-socks5
3058
3129
- test-socks5-csfle
3059
3130
- test-socks5-tls
@@ -3101,6 +3172,7 @@ buildvariants:
3101
3172
- test-latest-load-balanced
3102
3173
- test-auth-kerberos
3103
3174
- test-auth-ldap
3175
+ - test-auth-oidc
3104
3176
- test-socks5
3105
3177
- test-socks5-csfle
3106
3178
- test-socks5-tls
@@ -3147,6 +3219,7 @@ buildvariants:
3147
3219
- test-6.0-load-balanced
3148
3220
- test-latest-load-balanced
3149
3221
- test-auth-ldap
3222
+ - test-auth-oidc
3150
3223
- test-socks5-csfle
3151
3224
- test-socks5-tls
3152
3225
- test-tls-support-latest
0 commit comments