Skip to content

Commit 2359487

Browse files
committed
edits
1 parent 3526b8d commit 2359487

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

source/fundamentals/enterprise-auth.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ You can configure the OIDC for GCP IMDS by setting the ``mechanism`` field of yo
175175
specifies the authentication mechaism by using the following placeholders in the
176176
``mechanism_properties`` field:
177177

178-
- ``ENVIRONMENT``: Set this to ``gcp``.
179-
- ``TOKEN_RESOURCE``: Set this to the value of the audience parameter configured
178+
- ``ENVIRONMENT``: Set this property to ``gcp``.
179+
- ``TOKEN_RESOURCE``: Set this property to the value of the audience parameter configured
180180
on your MongoDB deployment.
181181

182182
.. literalinclude:: /includes/fundamentals/code-snippets/enterprise-auth.rs
@@ -196,9 +196,9 @@ including the AWS Elastic Kubernetes Service (EKS). To authenticate
196196
against unsupported platforms, you must define a custom callback
197197
function to use OIDC to authenticate.
198198

199-
The following example defines a custom callback for an EKS
200-
cluster with a configured IAM OIDC provider. The access token is
201-
read from a path set in the ``AWS_WEB_IDENTITY_TOKEN_FILE`` environment
199+
The following example defines a custom callback for an EKS cluster with a
200+
configured Identity and Access Management (IAM) OIDC provider. The access token
201+
is read from a path set in the ``AWS_WEB_IDENTITY_TOKEN_FILE`` environment
202202
variable. Then, you can set the ``oidc_callback`` field of your ``Credential``
203203
struct to ``oidc::Callback::machine``:
204204

@@ -207,16 +207,18 @@ struct to ``oidc::Callback::machine``:
207207
:dedent:
208208
:start-after: start-custom-callback-machine
209209
:end-before: end-custom-callback-machine
210+
:emphasize-lines: 3, 5-10
210211

211-
For workforce identity, you must configure the client by setting the
212-
``oidc_callback`` field of your ``Credential`` struct to
213-
``oidc::Callback::human`` instead of ``oidc::Callback::machine``. The
214-
{+driver-short+} uses the callback in the following process:
212+
When the workforce identity authentication process involves human interaction,
213+
you must configure the client by setting the ``oidc_callback`` field of your
214+
``Credential`` struct to ``oidc::Callback::human`` instead of
215+
``oidc::Callback::machine``. The {+driver-short+} uses the callback in the
216+
following process:
215217

216-
1. The driver retrieves the Identiy Provider Information (IDPInfo) for the
218+
1. The driver retrieves the Identity Provider Information (IDPInfo) for the
217219
provided username.
218220
2. The callback negotiates with the IDP to obtain an ``AccessToken``, possible
219-
``RefreshToken``, and any times. Then, it returns them, similar to the
221+
``RefreshToken``, and any timeouts. Then, it returns them, similar to the
220222
``OIDCMachineCallbacks``.
221223

222224
The following example defines a custom callback to handle workforce identity.

source/includes/fundamentals/code-snippets/enterprise-auth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async fn main() -> mongodb::error::Result<()> {
8383
async fn cb(params: CallbackContext) -> mongodb::error::Result<IdpServerResponse> {
8484
idp_info := params.idp_info.ok_or(Error::NoIDPInfo)?;
8585
let (access_token, expires, refresh_token) = negotiate_with_idp(ctx, idpInfo.Issuer).await?;
86-
Ok(oidc::IdpServerResponse {
86+
Ok(oidc::IdpServerResponse {
8787
access_token,
8888
expires: Some(expires),
8989
refresh_token: Some(refresh_token),

0 commit comments

Comments
 (0)