summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/evergreen.yml6
-rw-r--r--src/mongo/client/sasl_iam_client_conversation.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 133984092da..d8909386408 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -5865,7 +5865,11 @@ tasks:
"iam_auth_assume_aws_account" : "${iam_auth_assume_aws_account}",
"iam_auth_assume_aws_secret_access_key" : "${iam_auth_assume_aws_secret_access_key}",
- "iam_auth_assume_role_name" : "${iam_auth_assume_role_name}"
+ "iam_auth_assume_role_name" : "${iam_auth_assume_role_name}",
+
+ "iam_auth_ec2_instance_account" : "${iam_auth_ec2_instance_account}",
+ "iam_auth_ec2_instance_secret_access_key" : "${iam_auth_ec2_instance_secret_access_key}",
+ "iam_auth_ec2_instance_profile" : "${iam_auth_ec2_instance_profile}"
}
EOF
- command: shell.exec
diff --git a/src/mongo/client/sasl_iam_client_conversation.cpp b/src/mongo/client/sasl_iam_client_conversation.cpp
index 89fdc13794e..1c3768a5940 100644
--- a/src/mongo/client/sasl_iam_client_conversation.cpp
+++ b/src/mongo/client/sasl_iam_client_conversation.cpp
@@ -112,7 +112,7 @@ iam::AWSCredentials SaslIAMClientConversation::_getEc2Credentials() const {
// Get the token for authenticating with Instance Metadata Version 2
// Set a lifetime of 30 seconds since we are only going to use this token for one set of
// requests.
- std::vector<std::string> headers{"X-aws-ec2-metadata-token-ttl-seconds: 30"};
+ std::vector<std::string> headers{"X-aws-ec2-metadata-token-ttl-seconds: 30", "Expect:"};
httpClient->setHeaders(headers);
DataBuilder getToken = httpClient->put(getDefaultEC2Host() + "/latest/api/token",
ConstDataRange(nullptr, nullptr));