Skip to content

Commit e25552e

Browse files
DOCSP-35651 oidc atlasdatabaseuser example (#10)
* added oidc atlasdatabaseuser example
1 parent c9e6aff commit e25552e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

source/atlasdatabaseuser-custom-resource.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,27 @@ specification with :ref:`X.509 authentication <ak8so-x509>`.
266266
projectRef:
267267
name: my-project
268268

269+
Database User with |oidc| Authentication
270+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
271+
272+
The following example shows an ``AtlasDatabaseUser`` custom resource
273+
specification with |oidc|.
274+
275+
.. code-block:: sh
276+
277+
apiVersion: atlas.mongodb.com/v1
278+
kind: AtlasDatabaseUser
279+
metadata:
280+
name: my-database-user
281+
spec:
282+
roles:
283+
- roleName: "readWriteAnyDatabase"
284+
databaseName: "admin"
285+
projectRef:
286+
name: my-project
287+
username: my-oidc-group-id/my-idp-group-name
288+
oidcAuthType: IDP_GROUP
289+
269290
Parameters
270291
----------
271292

@@ -292,6 +313,18 @@ to customize your specifications.
292313
If the database user authenticates with :ref:`X.509 <ak8so-x509>`,
293314
this value must be ``\$external``.
294315

316+
.. setting:: spec.oidcAuthType
317+
318+
*Type*: string
319+
320+
*Conditional*
321+
322+
|oidc| method by which the database authenticates the
323+
provided :setting:`spec.username`.
324+
325+
If the database user authenticates with :manual:`OpenID Connect
326+
</core/security-oidc>`, this value must be ``IDP_GROUP``.
327+
295328
.. setting:: spec.passwordSecretRef
296329

297330
*Type*: string
@@ -359,6 +392,10 @@ to customize your specifications.
359392
Human-readable label that identifies the user needed to authenticate
360393
to the MongoDB database or collection.
361394

395+
If the database user authenticates with :manual:`OpenID Connect
396+
</core/security-oidc>`, this value must be your |service| |oidc|
397+
|idp| followed by a forward slash ``/`` and your |idp| group name.
398+
362399
.. setting:: spec.x509Type
363400

364401
*Type*: string

0 commit comments

Comments
 (0)