Atlas Kubernetes Operator supports using federated authentication for your Atlas organization.
注意
You can't use Atlas Kubernetes Operator to set up an IdP. To set up an IdP, see Configure Database Deployment Authentication and Authorization.
IdP を設定すると、 IdPを使用するようにユーザーを認証するロール マッピングを管理できます。
Atlas Kubernetes Operator を通じてフェデレーティッド認証を構成するには、 AtlasFederatedAuthカスタム リソースを指定して更新する必要があります。
When you create the AtlasFederatedAuth custom resource, Atlas Kubernetes Operator uses the Federated Authentication API Resource to update the organization configuration for the federation. In the organization configuration, you specify federation settings for your Atlas organization such as organization and role mappings.
The AtlasFederatedAuth Custom Resource is not required to map database users to an IdP, both any existing authentication IdP or workload and workforce IdP. You can use the AtlasDatabaseUser custom resource to manage database users, in which you specify the authentication method used for a given database user. The AtlasDatabaseUser custom resource must be configured in conjunction with federated authentication to associate users and roles in the IdP with users and groups in MongoDB.
The AtlasFederatedAuth Custom Resource is optional to use any federated authentication, provided that you have configured it elsewhere in Atlas.
前提条件
Atlas Kubernetes Operator を使用してフェデレーティッド認証を設定する前に、次のものが必要です。
An existing identity provider (IdP) linked to Atlas. To learn how to link an IdP to Atlas, see Manage Identity Providers.
Atlas Kubernetes Operator が Atlas に接続するために使用できるAPIキーを持つシークレット。 APIキーには
Organization Ownerロールが必要です。アクティブな Atlas 組織または組織内のプロジェクト内の少なくとも 1 つのロール。
組織構成の更新
Atlas Kubernetes Operator を通じてフェデレーティッド認証を構成するには、 AtlasFederatedAuthカスタム リソースを指定してフェデレーションの組織構成を更新します。
次の例では、次の操作を実行するAtlasFederatedAuthカスタム リソースを構成します。
指定されたシークレットにリンクされた組織のフェデレーティッド認証を有効にします。
承認されたドメインとして
my-org-domain.comを追加します。組織のドメイン制限を有効にします。
SSOのデバッグを無効にします。
Grants the
Organization Memberrole to users after authenticating.Maps the
Organization Ownerrole for the organization and applies the role mapping to an IdP group namedorg-admin.Maps the
Organization Project CreatorandProject Ownerroles for a project in the organization nameddev-projectand applies the role mapping to an IdP group nameddev-team.
詳細については、「パラメーター 」を参照してください。
注意
spec.roleMappings.roleAssignments パラメーターには、現在の組織内の少なくとも 1 つの組織ロールまたは組織内のプロジェクトを含める必要があります。
例:
cat <<EOF | kubectl apply -f - apiVersion: atlas.mongodb.com/v1 kind: AtlasFederatedAuth metadata: name: atlas-default-federated-auth namespace: mongodb-atlas-system spec: enabled: true dataAccessIdentityProviders: - 32b6e34b3d91647abb20e7b8 - 42d8v92k5a34184rnv93f0c1 connectionSecretRef: name: my-org-secret namespace: mongodb-atlas-system domainAllowList: - my-org-domain.com domainRestrictionEnabled: true ssoDebugEnabled: false postAuthRoleGrants: - ORG_MEMBER roleMappings: - externalGroupName: org-admin roleAssignments: - role: ORG_OWNER - externalGroupName: dev-team roleAssignments: - role: ORG_GROUP_CREATOR - projectName: dev-project role: GROUP_OWNER EOF
更新プロセスのステータスを確認するには、次のコマンドを実行します。
kubectl get atlasfederatedauth -o yaml
Atlas Kubernetes Operator はカスタム リソースを返し、次の例のようなステータス セクションを含めます。
status: conditions: - type: Ready status: True - type: RolesReady status: True - type: UsersReady status: True
このリソースで利用可能なパラメータについて詳しくは、「 AtlasFederatedAuthカスタム リソース 」を参照してください。