dex

by Helm

Helm chartv4.0.4App v2.28.1

OpenID Connect Identity (OIDC) and OAuth 2.0 Provider with Pluggable Connectors

About this chart

dex

dex is an OpenID Connect Identity (OIDC) and OAuth 2.0 Provider with Pluggable Connectors

TL;DR

helm install gabibbo97/dex

Introduction

This chart bootstraps an in-cluster dex identity provider

Configuration options

ParameterDescriptionDefault
connectorsList of Dex connectors[]
staticClientsList of Dex clients[]
staticPasswordsList of Dex users[]
JSONLoggingEnable JSON format for logsfalse
dexExternalURLURL that Dex will use as its ownValue of ingress.hosts[0].host
OAuth2.responseTypesThe OAuth2 flows that will be supported['code']
OAuth2.skipApprovalScreenIf possible avoid showing an approval screentrue
OAuth2.alwaysShowLoginScreenAlways show a login screenfalse
OAuth2.passwordConnectorUse one of the predefined connectors instead of Dex to perform password grants``
prometheusOperator.serviceMonitor.enableDeploy a ServiceMonitor resourcefalse

Connectors

See the documentation for details

connectors:
- type: <Connector kind>
  name: <Connector name>
  id: <Connector ID>
  config:
    <YAML Configuration>

Static clients

staticClients:
- id: <Client ID>
  redirectURIs:
  - <Redirect URI pattern>
  name: <Client name>
  secret: <Client secret>
  # Allow other client to issue tokens
  # Valid for this one
  # e.g. auth webapp and backend
  trustedPeers:
  - <Other client ID>

Easy generation of client secrets

tr -dc a-zA-Z0-9 < /dev/urandom | head -c 32; echo ''

Static passwords

- email: "<email>"
  hash: "<bcrypt hash>"
  username: "<username>"

Easy generation of bcrypt secrets

htpasswd -bnBC 10 "usr" <Password> | cut -d ':' -f 2 | sed 's/2y/2a/'

Trying out your Dex installation

kubectl port-forward svc/dex 5555:http
curl -k 127.0.0.1:5555/.well-known/openid-configuration | jq

Advanced configuration

This chart provides a plug and play installation of Dex.

If you desire to manually configure Dex you can set up the variables dexConfig and dexEnvironment to have a completely custom installation of Dex.

Deploy dex with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has dex on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdex is pinned at v4.0.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply