Skip to content

Commit 032b45f

Browse files
authored
(DOCSP-37914): Update federated authentication CRD example (#42) (#45)
* Update federated auth example * Copy review feedback * copy review 2
1 parent 389a185 commit 032b45f

File tree

3 files changed

+69
-20
lines changed

3 files changed

+69
-20
lines changed

source/ak8so-configure-federated-authentication.txt

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Configure Federated Authentication from Kubernetes
1414

1515
|ak8so| supports configuring :ref:`federated authentication
1616
<atlas-federated-authentication>` for your |service| organization.
17-
To configure federated authentication through |ak8so|, you must
17+
To configure federated authentication through the |ak8so|, you must
1818
specify and update the :ref:`atlasfederatedauth-custom-resource`.
1919

2020
.. include:: /includes/fact-ak8so-federated-auth.rst
@@ -33,12 +33,27 @@ you must have:
3333
|ak8so| can use to :ref:`connect <ak8so-access-to-atlas-ref>` to |service|.
3434
The API keys must have the :authrole:`Organization Owner` role.
3535

36+
- At least one :ref:`role <user-roles>` within an active |service| organization
37+
or the projects in the organization.
38+
3639
Update an Organization Configuration
3740
------------------------------------
3841

39-
To update an organization configuration
40-
for your federation, specify the parameters in the
41-
:ref:`atlasfederatedauth-custom-resource`.
42+
To configure federated authentication through the |ak8so|,
43+
update the organization configuration for your federation
44+
by specifying the :ref:`atlasfederatedauth-custom-resource`.
45+
46+
.. include:: /includes/fact-atlasfederatedauth-example.rst
47+
48+
To learn more, see :ref:`atlasfederatedauth-parameters`.
49+
50+
.. note::
51+
52+
The :ref:`spec.roleMappings.roleAssignments
53+
<atlasfederatedauth-roleAssignments>`
54+
parameter must include at least one organization role
55+
within the current organization or the projects in
56+
the organization.
4257

4358
**Example:**
4459

@@ -51,21 +66,25 @@ for your federation, specify the parameters in the
5166
name: atlas-default-federated-auth
5267
namespace: mongodb-atlas-system
5368
spec:
54-
enabled: true
69+
enabled: true
5570
connectionSecretRef:
5671
name: my-org-secret
5772
namespace: mongodb-atlas-system
5873
domainAllowList:
5974
- my-org-domain.com
60-
domainRestrictionEnabled: true
61-
ssoDebugEnabled: true
62-
postAuthRoleGrants:
63-
- GLOBAL_AUTOMATION_ADMIN
75+
domainRestrictionEnabled: true
76+
ssoDebugEnabled: false
77+
postAuthRoleGrants:
78+
- ORG_MEMBER
6479
roleMappings:
65-
- externalGroupName: myTestGroup
80+
- externalGroupName: org-admin
81+
roleAssignments:
82+
- role: ORG_OWNER
83+
- externalGroupName: dev-team
6684
roleAssignments:
67-
- projectName: myTestProject
68-
role: ORG_OWNER
85+
- role: ORG_GROUP_CREATOR
86+
- projectName: dev-project
87+
role: GROUP_OWNER
6988

7089
EOF
7190

source/atlasfederatedauth-custom-resource.txt

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ To learn more, see :ref:`ak8so-federated-auth`.
2727
Examples
2828
--------
2929

30-
The following example shows an ``AtlasFederatedAuth`` custom resource
31-
that configures federated authentication for an organization:
30+
.. include:: /includes/fact-atlasfederatedauth-example.rst
3231

3332
.. code-block::
3433

@@ -45,14 +44,18 @@ that configures federated authentication for an organization:
4544
domainAllowList:
4645
- my-org-domain.com
4746
domainRestrictionEnabled: true
48-
ssoDebugEnabled: true
47+
ssoDebugEnabled: false
4948
postAuthRoleGrants:
50-
- GLOBAL_AUTOMATION_ADMIN
49+
- ORG_MEMBER
5150
roleMappings:
52-
- externalGroupName: myTestGroup
51+
- externalGroupName: org-admin
5352
roleAssignments:
54-
- projectName: myTestProject
55-
role: ORG_OWNER
53+
- role: ORG_OWNER
54+
- externalGroupName: dev-team
55+
roleAssignments:
56+
- role: ORG_GROUP_CREATOR
57+
- projectName: dev-project
58+
role: GROUP_OWNER
5659
status:
5760
conditions:
5861
- type: Ready
@@ -68,6 +71,9 @@ that configures federated authentication for an organization:
6871
which describes the update process. To learn more,
6972
see :ref:`ak8so-create-update-process`.
7073

74+
75+
.. _atlasfederatedauth-parameters:
76+
7177
Parameters
7278
----------
7379

@@ -216,6 +222,12 @@ API documentation to customize your specifications.
216222

217223
Role mappings that are configured in this organization.
218224

225+
The :ref:`spec.roleMappings.roleAssignments
226+
<atlasfederatedauth-roleAssignments>`
227+
parameter must include at least one organization role
228+
within the current organization or the projects in
229+
the organization.
230+
219231
.. _atlasfederatedauth-externalGroupName:
220232

221233
``spec.roleMappings.externalGroupName``
@@ -234,7 +246,10 @@ API documentation to customize your specifications.
234246
*Optional*
235247

236248
|service| roles and the unique identifiers of the groups and
237-
organizations associated with each role.
249+
organizations associated with each role. This parameter
250+
must include at least one organization role
251+
within the current organization or the projects in
252+
the organization.
238253

239254
.. _atlasfederatedauth-projectName:
240255

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
The following example configures an ``AtlasFederatedAuth`` custom resource
2+
that does the following:
3+
4+
- Enables federated authentication for the organization linked
5+
to the specified |k8s-secret|.
6+
- Adds ``my-org-domain.com`` as an approved domain.
7+
- Enables domain restriction for the organization.
8+
- Disables debugging for :abbr:`SSO (Single Sign-On)`.
9+
- Grants the :authrole:`Organization Member` role to users
10+
after authenticating.
11+
- Maps the :authrole:`Organization Owner` role for the organization
12+
and applies the role mapping to an |idp| group named ``org-admin``.
13+
- Maps the :authrole:`Organization Project Creator` and :authrole:`Project Owner`
14+
roles for a project in the organization named ``dev-project`` and applies the
15+
role mapping to an |idp| group named ``dev-team``.

0 commit comments

Comments
 (0)