이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 2. Configuring SSO for Argo CD using Dex
After the Red Hat OpenShift GitOps Operator is installed, Argo CD automatically creates a user with admin permissions. To manage multiple users, cluster administrators can use Argo CD to configure Single Sign-On (SSO).
The spec.dex parameter in the ArgoCD CR is no longer supported from Red Hat OpenShift GitOps v1.10.0 onwards. Consider using the .spec.sso parameter instead.
2.1. Configuration to enable the Dex OpenShift OAuth Connector 링크 복사링크가 클립보드에 복사되었습니다!
Dex is installed by default for all the Argo CD instances created by the Operator. You can configure Red Hat OpenShift GitOps to use Dex as the SSO authentication provider by setting the .spec.sso parameter.
Dex uses the users and groups defined within OpenShift Container Platform by checking the OAuth server provided by the platform.
Procedure
To enable Dex, set the
.spec.sso.providerparameter todexin the YAML resource of the Operator:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The
openShiftOAuthproperty triggers the Operator to automatically configure the built-in OpenShift Container PlatformOAuthserver when the value is set totrue.
2.1.1. Mapping users to specific roles 링크 복사링크가 클립보드에 복사되었습니다!
Argo CD cannot map users to specific roles if they have a direct ClusterRoleBinding role. You can manually change the role as role:admin on SSO through OpenShift.
Procedure
Create a group named
cluster-admins.oc adm groups new cluster-admins
$ oc adm groups new cluster-adminsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Add the user to the group.
oc adm groups add-users cluster-admins USER
$ oc adm groups add-users cluster-admins USERCopy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the
cluster-adminClusterRoleto the group:oc adm policy add-cluster-role-to-group cluster-admin cluster-admins
$ oc adm policy add-cluster-role-to-group cluster-admin cluster-adminsCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2. Disabling Dex by replacing .spec.sso 링크 복사링크가 클립보드에 복사되었습니다!
-
To disable dex, either remove the
spec.ssoelement from the Argo CD custom resource or specify a different SSO provider.