Dex: An OpenID Connect Bridge to Existing Identity
Dex solves one specific problem: your applications speak OpenID Connect and your identity lives somewhere that does not.
A bridge rather than a directory
Dex stores no users. It authenticates against connectors to upstream sources: LDAP, SAML, GitHub, GitLab, Google, Microsoft, and others. Applications integrate with Dex over OIDC, and Dex translates.
So it is not an alternative to OpenLDAP or FreeIPA, it is something you put in front of them. If you already run a directory and your new applications all want OIDC, Dex is the shortest path between the two.
Where it is most commonly found
Kubernetes. Dex became the standard way to give kubectl OIDC authentication backed by a corporate directory, and it appears in a great many cluster setups for that reason. Our k3s guide covers the cluster side.
It also shows up in front of internal tooling that supports OIDC but not LDAP, which is an increasing share of modern software.
Deliberately small
Dex does not manage users, does not provide a registration flow, has no administrative interface, and does almost no authorisation. It issues tokens based on an upstream decision.
That narrowness is the feature. Compared with Keycloak, which does all of those things, Dex is a single small Go binary with a YAML config. Compared with Authelia, it is an OIDC provider rather than a forward-auth gateway, which is a different integration model entirely.
Configuration
A static YAML file listing connectors and the clients permitted to use them, with storage in Kubernetes CRDs, PostgreSQL, SQLite or etcd.
connectors:
- type: ldap
id: ldap
name: LDAP
config:
host: ldap.example.com:636
insecureNoSSL: false
insecureNoSSL must stay false. Our nsswitch and SSSD guide makes the same point about directory connections carrying credentials.
Operational caution
Dex issues tokens, so its signing keys matter. Back up the storage and keep clock sync working, since token validation is time-sensitive and our timedatectl guide covers getting that right.
License
Dex is released under the Apache License 2.0.