Skip to content

triauth for Argo CDOIDC

Let your platform team open the Argo CD dashboard with one approval on their own device, and no Argo CD passwords.

  • Code and DevOps
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every Argo CD, for the web dashboard
Set up in
The argocd-cm ConfigMap

About Argo CD

Argo CD keeps the applications on your Kubernetes clusters in line with what is written in a Git repository, and shows in a dashboard whether what runs matches what was approved. Platform teams use it to roll out and track every deployment.

Connect Argo CD to triauth

Argo CD signs people in through the triauth OpenID Connect bridge. Once connected, the dashboard's sign-in page shows Log in via and your domain's name. People on your team click it, type their username, and approve on their own device. Nobody keeps an Argo CD password, and when someone leaves, removing their identity records at your domain ends their access to Argo CD as well.

This page is about the web dashboard. The argocd login --sso command works without the client secret, so the bridge cannot renew its sign-in, and people in a terminal keep an API token or a local account.

How it works

  1. Open oidc.triauth.org and enter your domain. Paste Argo CD's redirect address, https://argocd.example.com/auth/callback with your own Argo CD address in place of argocd.example.com, and click Connect app. The bridge gives you a client ID and a client secret.

  2. Store the client secret in the argocd-secret Secret:

    sh
    kubectl -n argocd patch secret argocd-secret --type merge \
      -p '{"stringData": {"oidc.triauth.clientSecret": "<client secret from the bridge>"}}'
  3. In the argocd-cm ConfigMap, under data, add the settings below. Replace example.com with your domain, argocd.example.com with your Argo CD address, and the placeholder with the client ID from the bridge.

    yaml
    url: https://argocd.example.com
    oidc.config: |
      name: example.com
      issuer: https://oidc.triauth.org/example.com
      clientID: <client ID from the bridge>
      clientSecret: $oidc.triauth.clientSecret
      requestedScopes: [openid, profile, email, groups, offline_access]
      enablePKCEAuthentication: true
      refreshTokenThreshold: 55m
  4. In the argocd-rbac-cm ConfigMap, give a group its role, for example g, platform@example.com, role:admin in policy.csv, and set policy.default to role:readonly.

  5. Open the dashboard and click Log in via example.com.

Checkpoint

The dashboard's sign-in page shows Log in via example.com under the local login. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve. The applications page then opens with the person's permissions.

Good to know

  • Argo CD keeps no accounts. Everyone with an identity at your domain can sign in and gets the default policy, and the groups published at your domain get their roles in policy.csv. To let only one team in, limit the app to a group when you connect it.
  • Argo CD renews the sign-in through the bridge while a person works and re-reads their groups each time, so a removed identity or a changed group takes effect at the next renewal. Argo CD's own limit per sign-in, usually 24 hours, still applies.
  • Scripts and people in a terminal use argocd account generate-token or a local account, since the command line's own sign-in cannot be renewed by the bridge and would end whenever its token expires.

For the person who connects the app

SettingValue
Redirect addresshttps://<your-argocd>/auth/callback
Where in Argo CDthe oidc.config key of the argocd-cm ConfigMap, roles in argocd-rbac-cm, the secret in argocd-secret
Issuerhttps://oidc.triauth.org/<your domain>, from which Argo CD reads the rest
Client secret$oidc.triauth.clientSecret refers to the key of that name in argocd-secret
ScopesrequestedScopes with offline_access, which lets Argo CD renew the token it uses as the session. Without it, people would sign in again whenever the bridge's short-lived token expires. A bridge error at a renewal also sends them to sign in again
Refresh thresholdrefreshTokenThreshold: 55m. Argo CD measures this threshold against the access token, not against the ID token it signs people in with. So it must sit a little below the access token's lifetime, an hour at the bridge. A small value, such as the 30s in Argo CD's docs, leaves the session dying with the ID token
Groupsscopes: '[groups]' in argocd-rbac-cm is usually the default, so g, <group>, <role> lines match the groups published at your domain. enableUserInfoGroups stays off, since Argo CD never renews the token that setting relies on
Sign-outleave logoutURL unset, since the bridge has no sign-out endpoint

Argo CD keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. Argo CD's user management guide explains every key, and the RBAC guide covers the policies.

Next steps

All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.