Skip to content

venezia/dex-k8s-authenticator

 
 

Repository files navigation

Dex K8s Authenticator

A helper web-app which talks to one or more Dex Identity services to generate kubectl commands for creating and modifying a kubeconfig.

  • The Web UI supports generating tokens against multiple clusters
    • Dev / Staging / Production etc
  • Generates appropriate kubectl config commands (user/cluster/context)
  • SSL Support

Screen shots

Index Page

Kubeconfig Page

Building a binary

make 

Creates ./bin/dex-k8s-authenticator

Building a container

make container

Running

Start Dex Server instance

Follow the example here: https://github.com/coreos/dex/blob/master/Documentation/getting-started.md

Start it with using the provided ./examples/dex-server-config-dev.yaml

Start Dex K8s Authenticator

./bin/dex-k8s-authenticator --config ./examples/config.yaml
  • Browse to http://localhost:5555
  • Click 'Example Cluster'
  • Click 'Log in with Email'
  • Login with [email protected] followed by the password password
  • You should be redirected back to the dex-k8s-authenticator

Deploying using Helm

This project provides helm charts for deploying both dex and dex-k8s-authenticator to your Kubernetes cluster. Instructions are provided for each chart.

Multiple Clusters

You can run multiple Dex Server instances with different backends if required.

Just update the examples/config.yaml to add an extra cluster to the list with the required settings.

SSL

Docker

Mount a directory containing your self signed certificates to /certs and the entrypoint will update the local trust store before starting dex-k8s-authenticator

docker run --rm -t -i -v /tmp/certs:/certs:ro -v /tmp/config.yml:/tmp/config.yml:ro mintel/dex-k8s-authenticator:latest --config /tmp/config.yml

HELM

Add list of Certificates to your values.yaml file, certificates need to be base64 encoded and their names need to end with either ".crt" or ".pem"

Alternatives

A similar web UI that generates kubectl configurations without using dex to authenticate first

OIDC helpers that run locally to setup kubectl:

A Kubernetes JWT webhook helper with a similar UX to Kuberos

About

A Kubernetes Dex Client Authenticator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 49.1%
  • HTML 22.4%
  • CSS 13.5%
  • Smarty 11.4%
  • Makefile 2.4%
  • Shell 1.2%