Skip to content
Snippets Groups Projects
Select Git revision
  • b7c6eea3413a2c01a096825cea4ee9c657020944
  • master default protected
  • prompt-none
  • connector-ldap-fix-tests
  • approval
  • also-push-image-with-commit-sha-tag
  • hdacloud
  • dependabot/go_modules/api/v2/google.golang.org/grpc-1.69.4
  • dependabot/go_modules/examples/google.golang.org/grpc-1.69.4
  • dependabot/docker/distroless/static-debian12-6ec5aa9
  • dependabot/docker/golang-2314d93
  • dependabot/go_modules/golang.org/x/net-0.34.0
  • dependabot/go_modules/google.golang.org/api-0.216.0
  • dependabot/github_actions/actions/cache-4.2.0
  • dependabot/github_actions/docker/setup-buildx-action-3.8.0
  • dependabot/github_actions/helm/kind-action-1.12.0
  • dependabot/github_actions/docker/setup-qemu-action-3.3.0
  • dependabot/github_actions/anchore/sbom-action-0.17.9
  • update-go
  • dependabot/go_modules/examples/go_modules-232a611e2d
  • dependabot/go_modules/go_modules-232a611e2d
  • api/v2.2.0
  • v2.41.1
  • v2.41.0
  • v2.40.0
  • v2.39.1
  • v2.39.0
  • v2.38.0
  • v2.37.0
  • v2.36.0
  • v2.35.3
  • v2.35.2
  • v2.35.1
  • v2.35.0
  • v2.32.1
  • v2.34.0
  • v2.33.1
  • v2.33.0
  • v2.32.0
  • v2.31.2
  • v2.31.1
41 results

dex

  • Open with
  • Download source code
  • Your workspaces

      A workspace is a virtual sandbox environment for your code in GitLab.

      No agents available to create workspaces. Please consult Workspaces documentation for troubleshooting.

  • user avatar
    Eric Chiang authored
    b7c6eea3
    History

    dex - A federated OpenID Connect provider

    Caution image

    This is an experimental version of dex that is likely to change in incompatible ways.

    dex is an OAuth2 server that presents clients with a low overhead framework for identifying users while leveraging existing identity services such as Google Accounts, FreeIPA, GitHub, etc, for actual authentication. dex sits between your applications and an identity service, providing a backend agnostic flavor of OAuth2 called OpenID Connect, a spec will allows dex to support:

    • Short-lived, signed tokens with predefined fields (such as email) issued on behalf of users.
    • Well known discovery of OAuth2 endpoints.
    • OAuth2 mechanisms such as refresh tokens and revocation for long term access.
    • Automatic signing key rotation.

    Any system which can query dex can cryptographically verify a users identity based on these tokens, allowing authentication events to be passed between backend services.

    One such application that consumes OpenID Connect tokens is the Kubernetes API server, allowing dex to provide identity for any Kubernetes clusters.

    Getting started

    dex requires a Go installation and a GOPATH configured. Clone it down the correct place, and simply type make to compile dex.

    git clone https://github.com/coreos/dex.git $GOPATH/src/github.com/coreos/dex
    cd $GOPATH/src/github.com/coreos/dex
    git checkout dev
    make

    dex is a single, scalable binary that pulls all configuration from a config file (no command line flags at the moment). Use one of the config files defined in the examples folder to start up dex with an in-memory data store.

    ./bin/dex serve examples/config-dev.yaml

    dex allows OAuth2 clients to be defined statically through the config file. In another window, run the example-app (an OAuth2 client). By default this is configured to use the client ID and secret defined in the config file.

    ./bin/example-app

    Then to interact with dex, like any other OAuth2 provider, you must first visit a client app, then be prompted to login through dex. This can be achieved using the following steps:

    NOTE: The UIs are extremely bare bones at the moment.

    1. Navigate to http://localhost:5555/ in your browser.
    2. Hit "login" on the example app to be redirected to dex.
    3. Choose the "mock" option to login as a predefined user.
    4. Approve the example app's request.
    5. See the resulting token the example app claims from dex.