Overview
Argo CD supports SSO authentication through two methods:- Bundled Dex OIDC provider: Use when your provider doesn’t support OIDC (SAML, LDAP) or to leverage Dex connector features
- External OIDC provider: Use with existing OIDC providers like Okta, Auth0, Keycloak, Google, or Microsoft
Dex Configuration
Argo CD embeds Dex for delegating authentication to external identity providers.GitHub OAuth2 Example
First, register an OAuth application in GitHub with the callback URL:https://argocd.example.com/api/dex/callback
Then configure the argocd-cm ConfigMap:
Dex will automatically use the correct
redirectURI to match your Argo CD URL. No need to set it explicitly.GitHub Enterprise
Secret References
By default, secrets like$dex.github.clientSecret are looked up in the argocd-secret Secret. To use a different Secret:
OIDC Configuration with Dex
Use Dex as an OIDC intermediary to fetch information from the UserInfo endpoint:Requesting Additional Claims
Request additional scopes like groups:Using UserInfo Endpoint
When claims aren’t available in the ID token, retrieve them from the UserInfo endpoint:Direct OIDC Configuration
Connect directly to an OIDC provider without Dex:TLS Configuration
RBAC with SSO
Configure which OIDC scopes to use for RBAC:scopes field specifies which OIDC claims to examine for RBAC (defaults to [groups]).
Session Configuration
Configure session duration and behavior:Multiple Base URLs
Support multiple URLs for Argo CD access:Dex Static Clients
Reuse Dex with other services:Provider-Specific Examples
Okta
Google (G Suite)
Using Dex:Auth0
Keycloak
Microsoft Azure AD
Disabling Admin User
Once SSO is configured, disable the built-in admin user:Adding Local Users
Create additional local users in theargocd-cm ConfigMap:
apiKey: Allows generating API keyslogin: Allows UI login
Failed Login Rate Limiting
Configure via environment variables on theargocd-server deployment:
ARGOCD_SESSION_FAILURE_MAX_FAIL_COUNT: Max failed logins (default: 5)ARGOCD_SESSION_FAILURE_WINDOW_SECONDS: Failure window duration (default: 300)ARGOCD_SESSION_MAX_CACHE_SIZE: Max cache entries (default: 1000)ARGOCD_MAX_CONCURRENT_LOGIN_REQUESTS_COUNT: Max concurrent logins (default: 50)
Complete Example
Best Practices
Use SSO for Teams
Implement SSO with group-based access control instead of managing individual local users.
Secure Secrets
Store sensitive values like client secrets in Kubernetes Secrets, not directly in ConfigMaps.
Session Duration
Set appropriate session durations based on your security requirements.
Disable Admin
Disable the built-in admin user once SSO and RBAC are properly configured.