CICD 배포/CICD 배포

[ ArgoCD ] SSO with Google

김붕어87 2023. 2. 13. 11:46
반응형

1. 사전 조건

 

 

2. 연동 방법 (with Google )

Google 에서 App 추가

  • admin 페이지 > Security > Authentication > SSO with SAML applications 에서 SSO as Google IdP 확인

 

 

 

  • Apps > Web and mobile apps 에서 “Add app” 설정
    • argocd app을 추가해준다.

 

 

 

 

 

 

 

  • SAML Attribute mapping 적용
    • primary email → email

 

 

 

ArgoCD의 configmap 에서 google saml 값을 추가해 준다.

  • k get configmap argocd-cm -n argocd -o yaml
data:
  accounts.image-updater: apiKey
  admin.enabled: "true"
  application.instanceLabelKey: argocd.argoproj.io/instance
  dex.config: |
    connectors:
      - type: saml
        id: saml
        name: saml
        config:
          ssoURL: https://accounts.google.com/o/saml2/idp?idpid=C032c89sq
          entityIssuer: https://argocd.xxx.com/api/dex/callback
          caData: |
            LS0tLS1CRUdJTiBDRVJUS**************lRJRklDQVRFLS0tLS0=
          redirectURI: https://argocd.xxx.com/api/dex/callback
          usernameAttr: email
          emailAttr: email
          groupAttr: member
          ssoIssuer: https://accounts.google.com/o/saml2?idpid=C032c89sq
          org:
            - name: xxxx
  exec.enabled: "false"
  server.rbac.log.enforce.enable: "false"
  url: https://argocd.xxx.com
  • dex 구성이 정상적으로 되어 있는지 로그 확인
    • kubectl logs pod/argocd-dex-server-6948bcb86b-znl5k

 

 

3. 로그인 방법

argocd cli SSO 인증

  • > argocd login argocd.xxx.com --sso --username xxx@xxx.com

web url SSO 로그인

  • 우측 상단 Log in via SAML을 클릭하면 사용자 Google Authentication 인증할 수 있도록 redirect 됨.
    • 사용자명@xxx.com 와 구글 패스워드 입력 후 로그인 !

 

 

4. Troubleshooting

  • SAML SSO 로그인 시 아래와 같이 오류 메세지가 발생하면 아래와 같이 시도해보시길 권장합니다 ~
    • 1) Browser logout 접속해본다.
    • 2) Browser Cache를 모두 삭제한다.

 

403 app_not_configured_for_user

To resolve the 403 app_not_configured_for_user error:

 

403 app_not_enabled_for_user

To resolve the 403 app_not_enabled_for_user error:

 

5. Reference

 

 

 

 

 

 

반응형