Skip to content

triauth for DexOIDC

Let your team sign in to everything behind Dex with one approval on their own device.

  • Identity and access
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every Dex installation
Set up in
The Dex configuration file

About Dex

Dex is a small identity server that sits between applications and the place people actually sign in. Kubernetes clusters, Argo CD, Grafana, and many other tools talk OpenID Connect to Dex once, and Dex hands the login to a connector such as LDAP, GitHub, or another OpenID Connect provider, then issues its own tokens.

Connect Dex to triauth

Dex signs people in through the triauth OpenID Connect bridge, with its OpenID Connect connector. Once connected, Dex's login page shows Log in with and your domain's name, or goes straight to the bridge when it is the only connector. People on your team type their username and approve on their own device, and every app behind Dex accepts them. When someone leaves, removing their identity records at your domain ends their access to all of it.

How it works

  1. Open oidc.triauth.org and enter your domain. Paste Dex's redirect address, its own issuer address followed by /callback, such as https://dex.example.com/dex/callback, and click Connect app. The bridge gives you a client ID and a client secret.

  2. Add the connector below to Dex's configuration file and restart Dex. Replace example.com with your domain, dex.example.com/dex with your Dex issuer, and the two placeholders with the client ID and the client secret from the bridge.

    yaml
    connectors:
      - type: oidc
        id: triauth
        name: example.com
        config:
          issuer: https://oidc.triauth.org/example.com
          clientID: <client ID from the bridge>
          clientSecret: <client secret from the bridge>
          redirectURI: https://dex.example.com/dex/callback
          scopes: [profile, email, groups, offline_access]
          insecureEnableGroups: true
  3. Open an app behind Dex and click Log in with example.com.

Checkpoint

Dex's login page shows Log in with example.com. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve. The app behind Dex then opens.

Good to know

  • Dex keeps no accounts. Everyone with an identity at your domain can sign in, and allowedGroups on the connector or the group limit on the bridge narrows that to one team.
  • The groups published at your domain pass through to the apps as Dex's groups claim, which is what Kubernetes role bindings and Argo CD policies read.
  • Apps that ask Dex to keep them signed in, such as kubectl and the Argo CD command line, make Dex renew the sign-in through the bridge each time. Each renewal re-reads the person's groups, and a removed identity loses its session. So access ends in one place for everything behind Dex.

For the person who connects the app

SettingValue
Redirect address<your Dex issuer>/callback, which must match redirectURI exactly
Where in Dexthe connectors list of the configuration file
Issuerhttps://oidc.triauth.org/<your domain>, which Dex compares with the discovery document
PKCEpicked from the discovery document on Dex 2.45 and newer, S256 with the bridge. Client authentication is HTTP Basic, or the request body with basicAuthUnsupported: true
Refreshoffline_access in scopes is what lets Dex renew through the bridge, since Dex adds nothing to the upstream scopes itself. Whenever an app renews with Dex, Dex renews with the bridge. A refusal from the bridge reaches the app as an error, and the app asks the person to sign in again. With sessions on (DEX_SESSIONS_ENABLED=true on Dex 2.46 and newer), Dex renews from the claims it cached at sign-in and never asks the bridge again. Dex's own session limits must then end a session
LogoutDex 2.46 ends its own session on logout and skips the upstream step, since the bridge has no sign-out endpoint

Dex keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. Dex's OpenID Connect connector page lists every key, and the tokens page explains refresh tokens and sessions.

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.