Auth0 연동

Auth0 연동

이 문서는 Auth0를 OIDC 프로바이더로 사용해 Argo CD SSO를 구성하는 방법을 안내합니다. 앱 등록, 권한 규칙, OIDC/RBAC 구성 순서로 진행합니다.

출처: 문서

본문

Auth0

사용자 정의(User-definitions)

Auth0에서의 사용자 정의는 이 가이드의 범위를 벗어납니다. Auth0 데이터베이스에 직접 추가하거나 엔터프라이즈 레지스트리를 사용하거나 "소셜 로그인"을 사용하세요. 참고: 구성으로 접근을 제한하지 않는 한 모든 사용자는 Auth0에 정의된 모든 앱에 접근할 수 있습니다. argo가 인터넷에 노출되어 있다면 이 점을 유의하세요. 그렇지 않으면 아무나 로그인할 수 있습니다.

Auth0에 앱 등록

register app 지침에 따라 Auth0에 argocd 앱을 생성하세요. 앱 정의에서:

다른 설정은 인증이 작동하는 데 필수적이지 않습니다.

Auth0에 권한 규칙 추가

Auth0 authorization 가이드에 따라 권한(authorization)을 설정하세요. 여기서 중요한 점은 그룹 멤버십(group-membership)이 비표준 클레임이므로 FQDN 클레임 이름(예: http://your.domain/groups) 아래에 두어야 한다는 것입니다.

argo 구성

ArgoCD용 OIDC 구성

kubectl edit configmap argocd-cm

...
data:
  application.instanceLabelKey: argocd.argoproj.io/instance
  url: https://your.argoingress.address
  oidc.config: |
    name: Auth0
    issuer: https://<yourtenant>.<eu|us>.auth0.com/
    clientID: <theClientId>
    clientSecret: <theClientSecret>
    domain_hint: <theDomainHint>
    requestedScopes:
    - openid
    - profile
    - email
    # not strictly necessary - but good practice:
    - 'http://your.domain/groups'
...

ArgoCD용 RBAC 구성

kubectl edit configmap argocd-rbac-cm (또는 helm values 사용).

...
data:
  policy.csv: |
    # let members with group someProjectGroup handle apps in someProject
    # this can also be defined in the UI in the group-definition to avoid doing it there in the configmap
    p, someProjectGroup, applications, *, someProject/*, allow
    # let the group membership argocd-admins from OIDC become role:admin - needs to go into the configmap
    g, argocd-global-admins, role:admin
  policy.default: role:readonly
  # essential to get argo to use groups for RBAC:
  scopes: '[http://your.domain/groups, email]' 
...

참고: clientSecret 저장 — clientSecret을 안전하고 올바르게 저장하는 방법에 대한 자세한 내용은 사용자 관리 개요(User Management Overview) 페이지에서 확인할 수 있습니다.

더 알아보기 (Learn more)