@@ -127,7 +127,12 @@ functions:
127
127
"iam_auth_assume_role_name" : "${iam_auth_assume_role_name}",
128
128
"iam_auth_ec2_instance_account" : "${iam_auth_ec2_instance_account}",
129
129
"iam_auth_ec2_instance_secret_access_key" : "${iam_auth_ec2_instance_secret_access_key}",
130
- "iam_auth_ec2_instance_profile" : "${iam_auth_ec2_instance_profile}"
130
+ "iam_auth_ec2_instance_profile" : "${iam_auth_ec2_instance_profile}",
131
+ "iam_auth_assume_web_role_name": "${iam_auth_assume_web_role_name}",
132
+ "iam_web_identity_issuer": "${iam_web_identity_issuer}",
133
+ "iam_web_identity_jwks_uri": "${iam_web_identity_jwks_uri}",
134
+ "iam_web_identity_token_file": "${iam_web_identity_token_file}",
135
+ "iam_web_identity_rsa_key": "${iam_web_identity_rsa_key}"
131
136
}
132
137
EOF
133
138
@@ -297,6 +302,46 @@ functions:
297
302
cat setup.js
298
303
mongo --nodb setup.js aws_e2e_ecs.js
299
304
305
+ " run aws assume role with web identity test " :
306
+ - command : shell.exec
307
+ type : test
308
+ params :
309
+ shell : bash
310
+ working_dir : " src"
311
+ script : |
312
+ ${PREPARE_SHELL}
313
+ cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
314
+ . ./activate-authawsvenv.sh
315
+ mongo aws_e2e_web_identity.js
316
+ - command : shell.exec
317
+ type : test
318
+ params :
319
+ working_dir : " src"
320
+ silent : true
321
+ script : |
322
+ # DO NOT ECHO WITH XTRACE (which PREPARE_SHELL does)
323
+ cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
324
+ export AWS_ROLE_ARN="${iam_auth_assume_web_role_name}"
325
+ export AWS_WEB_IDENTITY_TOKEN_FILE="${iam_web_identity_token_file}"
326
+ EOF
327
+ - command : shell.exec
328
+ type : test
329
+ params :
330
+ shell : bash
331
+ working_dir : " src"
332
+ script : |
333
+ # the test should be run with and without a session name set
334
+ ASYNC_RUNTIME=${ASYNC_RUNTIME} \
335
+ PROJECT_DIRECTORY=${PROJECT_DIRECTORY} \
336
+ ASSERT_NO_URI_CREDS=true \
337
+ AWS_ROLE_SESSION_NAME="test" \
338
+ .evergreen/run-aws-tests.sh
339
+ ASYNC_RUNTIME=${ASYNC_RUNTIME} \
340
+ PROJECT_DIRECTORY=${PROJECT_DIRECTORY} \
341
+ ASSERT_NO_URI_CREDS=true \
342
+ .evergreen/run-aws-tests.sh
343
+
344
+
300
345
" run x509 tests " :
301
346
- command : shell.exec
302
347
type : test
@@ -1023,6 +1068,7 @@ tasks:
1023
1068
- func : " run aws auth test with aws credentials and session token as environment variables"
1024
1069
- func : " run aws auth test with aws EC2 credentials"
1025
1070
- func : " run aws ECS auth test"
1071
+ - func : " run aws assume role with web identity test"
1026
1072
1027
1073
- name : " test-5.0-standalone"
1028
1074
tags : ["5.0", "standalone"]
@@ -1083,6 +1129,7 @@ tasks:
1083
1129
- func : " run aws auth test with aws credentials and session token as environment variables"
1084
1130
- func : " run aws auth test with aws EC2 credentials"
1085
1131
- func : " run aws ECS auth test"
1132
+ - func : " run aws assume role with web identity test"
1086
1133
1087
1134
- name : " test-6.0-standalone"
1088
1135
tags : ["6.0", "standalone"]
@@ -1143,6 +1190,7 @@ tasks:
1143
1190
- func : " run aws auth test with aws credentials and session token as environment variables"
1144
1191
- func : " run aws auth test with aws EC2 credentials"
1145
1192
- func : " run aws ECS auth test"
1193
+ - func : " run aws assume role with web identity test"
1146
1194
1147
1195
- name : " test-7.0-standalone"
1148
1196
tags : ["7.0", "standalone"]
@@ -1203,6 +1251,7 @@ tasks:
1203
1251
- func : " run aws auth test with aws credentials and session token as environment variables"
1204
1252
- func : " run aws auth test with aws EC2 credentials"
1205
1253
- func : " run aws ECS auth test"
1254
+ - func : " run aws assume role with web identity test"
1206
1255
1207
1256
- name : " test-rapid-standalone"
1208
1257
tags : ["rapid", "standalone"]
@@ -1263,6 +1312,7 @@ tasks:
1263
1312
- func : " run aws auth test with aws credentials and session token as environment variables"
1264
1313
- func : " run aws auth test with aws EC2 credentials"
1265
1314
- func : " run aws ECS auth test"
1315
+ - func : " run aws assume role with web identity test"
1266
1316
1267
1317
- name : " test-latest-standalone"
1268
1318
tags : ["latest", "standalone"]
@@ -1324,6 +1374,7 @@ tasks:
1324
1374
- func : " run aws auth test with aws credentials and session token as environment variables"
1325
1375
- func : " run aws auth test with aws EC2 credentials"
1326
1376
- func : " run aws ECS auth test"
1377
+ - func : " run aws assume role with web identity test"
1327
1378
1328
1379
- name : " test-connection-string"
1329
1380
commands :
0 commit comments