-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCSP-40811 Authentication Mechanisms #22
Changes from 1 commit
13b4d17
88911c1
faf6ffb
4be63aa
f7c8a10
a1128b8
0c4c508
eebeea8
55427d9
be2a41a
71f5a99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -122,6 +122,7 @@ retrieve your AWS credentials from the following sources, in the order listed: | |||||
|
||||||
1. Named parameters passed to the Connection URI | ||||||
#. Environment variables | ||||||
#. AWS EKS AssumeRoleWithWebIdentity request | ||||||
#. ECS container metadata | ||||||
#. EC2 instance metadata | ||||||
|
||||||
|
@@ -189,6 +190,36 @@ following example: | |||||
:start-after: // start-aws-environment | ||||||
:end-before: // end-aws-environment | ||||||
|
||||||
AssumeRoleWithWebIdentity Request | ||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||
|
||||||
If your application authenticates users for your EKS cluster from an OpenID Connect (OIDC) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "from" an OIDC identity provider or "with" an OIDC identity provider? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sticking with "from" since this wording is taken from the AWS docs link at the bottom of the section |
||||||
identity provider, {+driver-short+} can make an ``AssumeRoleWithWebIdentity`` request | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
to exchange the OIDC token for temporary AWS credentials for your application. | ||||||
|
||||||
To authenticate with temporary AWS IAM credentials returned by an | ||||||
``AssumeRoleWithWebIdentity`` request, ensure that the AWS config file exists in your | ||||||
environment and is configured with the ``AWS_WEB_IDENTITY_TOKEN_FILE`` | ||||||
and ``AWS_ROLE_ARN`` environment variables. To learn how to create and configure | ||||||
an AWS config file, see `Configuration <https://docs.aws.amazon.com/sdkref/latest/guide/creds-config-files.html>`__ | ||||||
in the AWS documentation. | ||||||
|
||||||
After you configure your environment for an ``AssumeRoleWithWebIdentity`` request, | ||||||
set the ``authMechanism`` parameter in your connection URI to ``"MONGODB-AWS"``, | ||||||
as shown in the following example: | ||||||
|
||||||
.. literalinclude:: /includes/authentication.cpp | ||||||
:language: cpp | ||||||
:copyable: true | ||||||
:start-after: // start-aws-environment | ||||||
:end-before: // end-aws-environment | ||||||
|
||||||
For more information about using an ``AssumeRoleWithWebIdentity`` request to | ||||||
authenticate your application, see the following AWS documentation: | ||||||
|
||||||
- `AssumeRoleWithWebIdentity <https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html>`__ | ||||||
- `Authenticating users for your cluster from an OpenID Connect identity provider <https://docs.aws.amazon.com/eks/latest/userguide/authenticate-oidc-identity-provider.html>`__ | ||||||
|
||||||
ECS Metadata | ||||||
~~~~~~~~~~~~ | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest noting EKS. As of DRIVERS-1746, drivers also check for environment variables set in EKS environments. See: the auth spec section AssumeRoleWithWebIdentity for a description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a section on AssumeRoleWithWebIdentity