yoigo/dex-form

By yoigo

Updated about 7 years ago

Simple form for getting dex credentials from Kubernetes

Image
0

95

Dex login for Yoigo

Simple go application to recover the id token and refresh token from Dex to use it with Kubernetes

How it works.

Just hitting the big ol' buton should provide an appropriate token, along with instructions on how to configure it. You can also request extra scopes by introducing them in the form.

Build it.

Building the docker container should also build the application itself.

Run it

Inside the container, the /usr/local/bin/form binary takes the following options:

ParameterDefaultWhat it does
client-idkubernetesThe oauth2 client id for authenticating with dex
client-secretThe client secret for Dex
scopesgroupsDefault list of scopes to request
redirect-urihttp://127.0.0.1:5555/callbackCallback url for Oauth2 response
issuerhttp://127.0.0.1:5556/dexUrl of the OpenID issuer (Dex)
listenhttp://127.0.0.1:5555interface, port and protocol to listen on
tls-certTls certificate to use when listening with https
tls-keyTls key to use when listening with https
issuer-root-caRoot CA to trust. If empty, the host truststore
debugIf present, logs all request to the OpenID issuer

When running it with docker, you can pass the options as docker cmd:

docker run yoigo/dex-form --redirect-uri https://auth.example.org --issuer https://auth.example.org/dex --listen http://0.0.0.0:5555

Credit

Based on CoreOS' dex example app

Docker Pull Command

docker pull yoigo/dex-form