Skip to content

Commit dde0632

Browse files
committed
DRIVERS-2672 Rename OIDC integration name and values.
1 parent 345c243 commit dde0632

File tree

6 files changed

+37
-30
lines changed

6 files changed

+37
-30
lines changed

source/auth/auth.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,9 +1215,9 @@ in the MONGODB-OIDC specification, including sections or blocks that specificall
12151215

12161216
- mechanism_properties
12171217

1218-
- PROVIDER_NAME\
1219-
Drivers MUST allow the user to specify the name of a built-in OIDC provider integration to use to
1220-
obtain credentials. If provided, the value MUST be one of `["aws"]`. If both `PROVIDER_NAME` and an
1218+
- OIDC_ENV\
1219+
Drivers MUST allow the user to specify the name of a built-in OIDC application environment integration to
1220+
use to obtain credentials. If provided, the value MUST be one of `["k8s"]`. If both `OIDC_ENV` and an
12211221
[OIDC Callback](#oidc-callback) or [OIDC Human Callback](#oidc-human-callback) are provided for the same
12221222
`MongoClient`, the driver MUST raise an error.
12231223

@@ -1246,20 +1246,27 @@ in the MONGODB-OIDC specification, including sections or blocks that specificall
12461246
performed after SRV record resolution, if applicable. This property is only required for drivers that support the
12471247
[Human Authentication Flow](#human-authentication-flow).
12481248

1249-
#### Built-in Provider Integrations
1249+
#### Built-in OIDC Environment Integrations
12501250

1251-
Drivers MUST support all of the following built-in OIDC providers.
1251+
Drivers MUST support all of the following built-in OIDC application environment integrations.
12521252

1253-
####### AWS
1253+
####### Kubernetes
12541254

1255-
The AWS provider is enabled by setting auth mechanism property `PROVIDER_NAME:aws`.
1255+
The Kubernetes integration is enabled by setting auth mechanism property `OIDC_ENV:k8s`.
12561256

12571257
If enabled, drivers MUST read the file path from environment variable `AWS_WEB_IDENTITY_TOKEN_FILE` and then read the
12581258
OIDC access token from that file. The driver MUST use the contents of that file as value in the `jwt` field of the
12591259
`saslStart` payload.
12601260

1261-
Drivers MAY implement the AWS provider so that it conforms to the function signature of the
1262-
[OIDC Callback](#oidc-callback) to prevent having to re-implement the AWS provider logic in the OIDC prose tests.
1261+
> \[!NOTE\]
1262+
>
1263+
> The Kubernetes integration currently only supports the AWS-hosted EKS Kubernetes environment. Drivers MUST document
1264+
> that the "k8s" integration currently only supports AWS EKS, but will support more Kubernetes environments in the
1265+
> future.
1266+
1267+
Drivers MAY implement the Kubernetes integration so that it conforms to the function signature of the
1268+
[OIDC Callback](#oidc-callback) to prevent having to re-implement the Kubernetes integration logic in the OIDC prose
1269+
tests.
12631270

12641271
#### OIDC Callback
12651272

source/auth/tests/legacy/connection-string.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/auth/tests/legacy/connection-string.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -351,35 +351,35 @@ tests:
351351
mechanism_properties:
352352
AWS_SESSION_TOKEN: token!@#$%^&*()_+
353353
- description: should recognise the mechanism with aws provider (MONGODB-OIDC)
354-
uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:aws
354+
uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=OIDC_ENV:aws
355355
valid: true
356356
credential:
357357
username:
358358
password:
359359
source: "$external"
360360
mechanism: MONGODB-OIDC
361361
mechanism_properties:
362-
PROVIDER_NAME: aws
362+
OIDC_ENV: aws
363363
- description: should recognise the mechanism when auth source is explicitly specified and with provider (MONGODB-OIDC)
364-
uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authSource=$external&authMechanismProperties=PROVIDER_NAME:aws
364+
uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authSource=$external&authMechanismProperties=OIDC_ENV:aws
365365
valid: true
366366
credential:
367367
username:
368368
password:
369369
source: "$external"
370370
mechanism: MONGODB-OIDC
371371
mechanism_properties:
372-
PROVIDER_NAME: aws
372+
OIDC_ENV: aws
373373
- description: should throw an exception if supplied a password (MONGODB-OIDC)
374-
uri: mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:aws
374+
uri: mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=OIDC_ENV:aws
375375
valid: false
376376
credential:
377377
- description: should throw an exception if username is specified for aws (MONGODB-OIDC)
378-
uri: mongodb://principalName@localhost/?authMechanism=MONGODB-OIDC&PROVIDER_NAME:aws
378+
uri: mongodb://principalName@localhost/?authMechanism=MONGODB-OIDC&OIDC_ENV:aws
379379
valid: false
380380
credential:
381381
- description: should throw an exception if specified provider is not supported (MONGODB-OIDC)
382-
uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:invalid
382+
uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=OIDC_ENV:invalid
383383
valid: false
384384
credential:
385385
- description: should throw an exception if neither provider nor callbacks specified (MONGODB-OIDC)

source/auth/tests/mongodb-oidc.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ configured with `retryReads=false`.
2727
> \[!NOTE\]
2828
>
2929
> For test cases that create fail points, drivers MUST either use a unique `appName` or explicitly remove the fail point
30-
> after the test to prevent interaction between test cases.
30+
> aOIDC_ENV to prevent interaction between test cases.
3131
3232
Note that typically the preconfigured Atlas Dev clusters are used for testing, in Evergreen and locally. The URIs can be
3333
fetched from the `drivers/oidc` Secrets vault, see
@@ -36,7 +36,7 @@ Use `OIDC_ATLAS_URI_SINGLE` for the `MONGODB_URI`. If using local servers is pre
3636
[Local Testing](https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/auth_oidc/README.md#local-testing)
3737
method, use `mongodb://localhost/?authMechanism=MONGODB-OIDC` for `MONGODB_URI`.
3838

39-
### (1) OIDC Callback Authentication
39+
###OIDC_ENVlback Authentication
4040

4141
**1.1 Callback is called during authentication**
4242

@@ -101,7 +101,7 @@ method, use `mongodb://localhost/?authMechanism=MONGODB-OIDC` for `MONGODB_URI`.
101101
- Create a `MongoClient` configured with an OIDC callback that implements the AWS provider logic.
102102
- Set a fail point for `find` commands of the form:
103103

104-
```javascript
104+
```javascriptOIDC_ENV
105105
{
106106
configureFailPoint: "failCommand",
107107
mode: {

source/auth/tests/unified/mongodb-oidc-no-retry.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ createEntities:
1616
# The $$placeholder document should be replaced by auth mechanism
1717
# properties that enable OIDC auth on the target cloud platform. For
1818
# example, when running the test on AWS, replace the $$placeholder
19-
# document with {"PROVIDER_NAME": "aws"}.
19+
# document with {"OIDC_ENV": "aws"}.
2020
authMechanismProperties: { $$placeholder: 1 }
2121
retryReads: false
2222
retryWrites: false

source/unified-test-format/unified-test-format.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ The structure of this object is as follows:
422422
uriOptions:
423423
authMechanism: "MONGODB-OIDC"
424424
authMechanismProperties:
425-
PROVIDER_NAME: { $$placeholder: 1 }
425+
OIDC_ENV: { $$placeholder: 1 }
426426
```
427427
428428
<div id="entity_client_useMultipleMongoses">

0 commit comments

Comments
 (0)