dex is a free, open source identity & access management (iam) project written in Go and released under Apache-2.0. It has 11,097 GitHub stars, 1,981 forks and 547 open issues, and was last pushed 18 hours ago. On this registry it ranks #14 of 23 tracked projects in Identity & Access Management (IAM), with 5 head-to-head comparisons available.

What is dex?

Dex is an OpenID Connect (OIDC) and OAuth 2.0 identity provider written in Go and released under the Apache-2.0 licence, built for teams that want one authentication endpoint in front of many upstream identity sources instead of one integration per application.

What it is

Dex is an identity service that uses OpenID Connect to drive authentication for other applications. It acts as a portal to other identity providers through "connectors," which lets dex defer authentication to LDAP servers, SAML providers, or established identity providers such as GitHub, Google, and Active Directory. Clients write their authentication logic once to talk to dex, and dex then handles the protocols required by a given backend.

The concrete problem dex solves is integration sprawl. Without a federation layer, every client application has to understand the protocol of every user-management system it authenticates against. Dex acts as a shim between a client app and the upstream identity provider: the client only needs to understand OpenID Connect to query dex, while dex implements an array of protocols for querying the other user-management systems. It lives in the cloud-native and Kubernetes ecosystem, is published from the dexidp organisation, and is documented at https://dexidp.io.

Key capabilities

  • Issues ID Tokens, dex's primary feature: JSON Web Tokens (JWTs) signed by dex and returned as part of the OAuth2 response, attesting to the end user's identity.
  • Carries standards-based claims inside those tokens, including iss, sub, aud, exp, iat, at_hash, email, email_verified, groups, and name.
  • Supports pluggable connectors to LDAP directories, SAML providers, GitHub, Google, and Active Directory, so the upstream system of record stays where it is.
  • Runs natively on top of any Kubernetes cluster using Custom Resource Definitions, and can drive API server authentication through the OpenID Connect plugin.
  • Works with common Kubernetes clients such as kubectl and kubelogin, which can act on behalf of users who log in to the cluster through any identity provider dex supports.
  • Produces tokens that systems already able to consume OpenID Connect ID Tokens can use as service-to-service credentials, with Kubernetes and AWS STS named as examples.
  • Tracked under the identity-provider, idp, oidc, and kubernetes topics, with adopters listed in ADOPTERS.md.

Who uses it and how

  • Kubernetes platform teams that want API server authentication delegated to an external identity provider, with users signing in through kubectl or kubelogin.
  • Organisations that already hold user identity in LDAP, Active Directory, or a SAML provider and want a single OpenID Connect front door for internal applications.
  • Teams whose user accounts live in GitHub or Google organisations and who want those accounts to authenticate against self-hosted services.
  • Service-to-service scenarios where a signed ID Token from dex is accepted as a credential by downstream systems, including AWS STS.

Getting started

Upstream documentation is published at https://dexidp.io, with a dedicated guide at https://dexidp.io/docs/guides/kubernetes/ for running dex as a Kubernetes authenticator and a guide at https://dexidp.io/docs/using-dex/ for requesting and validating an ID Token. Deployment on Kubernetes is done natively through Custom Resource Definitions.

How it compares

The facts provided name no directly comparable products, so dex stands alone in this registry. Where overlap exists, dex is complementary rather than substitutive: GitHub, Google, Active Directory, LDAP, and SAML providers remain the systems of record, and dex federates to them instead of replacing them.

When to use it — and when not to

A self-hoster takes on running dex itself and configuring each connector against the upstream identity source, so an existing LDAP, SAML, Active Directory, GitHub, or Google deployment is effectively a prerequisite. Teams that want a hosted identity service with no operational surface should not pick this. The repository carries 547 open issues, and the available README material details the connector story well but gives limited deployment specifics beyond the Kubernetes path, so check the upstream documentation before committing.

project readme (upstream, from github) — read inline

dex - A federated OpenID Connect provider

GitHub Workflow Status OpenSSF Scorecard OpenSSF Best Practices Go Report Card LFX Health Score

logo

Dex is an identity service that uses OpenID Connect to drive authentication for other apps.

Dex acts as a portal to other identity providers through "connectors." This lets dex defer authentication to LDAP servers, SAML providers, or established identity providers like GitHub, Google, and Active Directory. Clients write their authentication logic once to talk to dex, then dex handles the protocols for a given backend.

ID Tokens

ID Tokens are an OAuth2 extension introduced by OpenID Connect and dex's primary feature. ID Tokens are JSON Web Tokens (JWTs) signed by dex and returned as part of the OAuth2 response that attests to the end user's identity. An example JWT might look like:

eyJhbGciOiJSUzI1NiIsImtpZCI6IjlkNDQ3NDFmNzczYjkzOGNmNjVkZDMyNjY4NWI4NjE4MGMzMjRkOTkifQ.eyJpc3MiOiJodHRwOi8vMTI3LjAuMC4xOjU1NTYvZGV4Iiwic3ViIjoiQ2djeU16UXlOelE1RWdabmFYUm9kV0kiLCJhdWQiOiJleGFtcGxlLWFwcCIsImV4cCI6MTQ5Mjg4MjA0MiwiaWF0IjoxNDkyNzk1NjQyLCJhdF9oYXNoIjoiYmk5NmdPWFpTaHZsV1l0YWw5RXFpdyIsImVtYWlsIjoiZXJpYy5jaGlhbmdAY29yZW9zLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJncm91cHMiOlsiYWRtaW5zIiwiZGV2ZWxvcGVycyJdLCJuYW1lIjoiRXJpYyBDaGlhbmcifQ.OhROPq_0eP-zsQRjg87KZ4wGkjiQGnTi5QuG877AdJDb3R2ZCOk2Vkf5SdP8cPyb3VMqL32G4hLDayniiv8f1_ZXAde0sKrayfQ10XAXFgZl_P1yilkLdknxn6nbhDRVllpWcB12ki9vmAxklAr0B1C4kr5nI3-BZLrFcUR5sQbxwJj4oW1OuG6jJCNGHXGNTBTNEaM28eD-9nhfBeuBTzzO7BKwPsojjj4C9ogU4JQhGvm_l4yfVi0boSx8c0FX3JsiB0yLa1ZdJVWVl9m90XmbWRSD85pNDQHcWZP9hR6CMgbvGkZsgjG32qeRwUL_eNkNowSBNWLrGNPoON1gMg

ID Tokens contains standard claims assert which client app logged the user in, when the token expires, and the identity of the user.

{
  "iss": "http://127.0.0.1:5556/dex",
  "sub": "CgcyMzQyNzQ5EgZnaXRodWI",
  "aud": "example-app",
  "exp": 1492882042,
  "iat": 1492795642,
  "at_hash": "bi96gOXZShvlWYtal9Eqiw",
  "email": "[email protected]",
  "email_verified": true,
  "groups": [
    "admins",
    "developers"
  ],
  "name": "Jane Doe"
}

Because these tokens are signed by dex and contain standard-based claims other services can consume them as service-to-service credentials. Systems that can already consume OpenID Connect ID Tokens issued by dex include:

For details on how to request or validate an ID Token, see "Writing apps that use dex".

Kubernetes and Dex

Dex runs natively on top of any Kubernetes cluster using Custom Resource Definitions and can drive API server authentication through the OpenID Connect plugin. Clients, such as kubelogin and kubectl, can act on behalf of users who can login to the cluster through any identity provider dex supports.

  • More docs for running dex as a Kubernetes authenticator can be found here.
  • You can find more about companies and projects which use dex, here.

Connectors

When a user logs in through dex, the user's identity is usually stored in another user-management system: a LDAP directory, a GitHub org, etc. Dex acts as a shim between a client app and the upstream identity provider. The client only needs to understand OpenID Connect to query dex, while dex implements an array of protocols for querying other user-management systems.

A "connector" is a strategy used by dex for authenticating a user against another identity provider. Dex implements connectors that target specific platforms such as GitHub, LinkedIn, and Microsoft as well as established protocols like LDAP and SAML.

Depending on the connectors limitations in protocols can prevent dex from issuing refresh tokens or returning group membership claims. For example, because SAML doesn't provide a non-interactive way to refresh assertions, if a user logs in through the SAML connector dex won't issue a refresh token to its client. Refresh token support is required for clients that require offline access, such as kubectl.

Dex implements the following connectors:

Name supports refresh tokens supports groups claim supports preferred_username claim status notes
LDAP yes yes yes stable
GitHub yes yes yes stable
SAML 2.0 no yes no stable WARNING: Unmaintained and likely vulnerable to auth bypasses (#1884)
GitLab yes yes yes beta
OpenID Connect yes yes yes beta Includes Salesforce, Azure, etc.
OAuth 2.0 no yes yes alpha
Google yes yes yes alpha
LinkedIn yes no no beta
Microsoft yes yes no beta
AuthProxy no yes no alpha Authentication proxies such as Apache2 mod_auth, etc.
Bitbucket Cloud yes yes no alpha
OpenShift yes yes no alpha
Atlassian Crowd yes yes yes * beta preferred_username claim must be configured through config
Gitea yes no yes beta
OpenStack Keystone yes yes no alpha

Stable, beta, and alpha are defined as:

  • Stable: well tested, in active use, and will not change in backward incompatible ways.
  • Beta: tested and unlikely to change in backward incompatible ways.
  • Alpha: may be untested by core maintainers and is subject to change in backward incompatible ways.

All changes or deprecations of connector features will be announced in the release notes.

Documentation

See the official documentation for getting started, configuration, and usage guides.

Reporting a vulnerability

Please see our security policy for details about reporting vulnerabilities.

Getting help

  • For feature requests and bugs, file an issue.
  • For general discussion about both using and developing Dex:

Contributing

Please see CONTRIBUTING.md for development setup, guidelines, and how to submit pull requests.

License

The project is licensed under the Apache License, Version 2.0.

Frequently asked questions

Is dex free to use?

dex is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does dex do?

OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors

What is dex written in?

dex is primarily written in Go. Its source is publicly available at https://github.com/dexidp/dex, and it has 11,097 GitHub stars.