dex

by QuenchWorks

Helm chartv0.0.22App 2.45.1Apache-2.0Verified publisher

Dex, the CNCF OpenID Connect (OIDC) identity provider and federated SSO gateway with pluggable connectors (LDAP, SAML, GitHub, Google, OIDC). Hardened by QuenchWorks as a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest.

About this chart

Quenchworks Dex

Hardened Dex (the CNCF OpenID Connect identity provider and federated SSO gateway) on a minimal, nonroot, CVE-gated image, pinned by digest and cosign-signed.

Install

helm install dex oci://ghcr.io/quenchworks/charts/dex

Dex runs nonroot on a read-only root filesystem. The image entrypoint is dex serve; this chart starts it as dex serve /etc/dex/config.yaml, rendering config.yaml into a ConfigMap and mounting it at /etc/dex/config.yaml.

Ports

PortNamePurpose
5556httpOIDC issuer + login UI
5557grpcgRPC API
5558telemetryhealth (/healthz) + Prometheus metrics

Liveness/readiness probe GET /healthz on the telemetry port (5558).

Check the discovery document over a port-forward:

kubectl port-forward svc/dex-dex 5556:5556 5558:5558
curl http://127.0.0.1:5558/healthz
curl http://127.0.0.1:5556/dex/.well-known/openid-configuration

Verify the image

cosign verify ghcr.io/quenchworks/images/dex \
  --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Each build also ships an SPDX SBOM and SLSA provenance attestation. Verify them with gh attestation verify oci://ghcr.io/quenchworks/images/dex --owner quenchworks.

Configuration

Dex is configured entirely through a single YAML config file. Set config.yaml to a Dex configuration (issuer, storage, web, grpc, telemetry, connectors, staticClients, staticPasswords); it is written to a ConfigMap and mounted at config.yaml. Point config.existingConfigMap at an externally-managed ConfigMap (key config.yaml) to manage the config out of band (e.g. to keep connector secrets separate); when set it wins over config.yaml.

Production note: default storage is in-memory

The default config uses storage: { type: memory } so the chart boots on a read-only root filesystem with no volume. In-memory storage loses all clients, refresh tokens, and signing keys on every restart and cannot be scaled out, so it is for evaluation only. The default also ships a static example user ([email protected] / password) and binds the issuer to 0.0.0.0.

For production:

  • Set a stable, externally reachable issuer URL (e.g. https://dex.example.com).
  • Switch storage to a shared backend: postgres, etcd, or kubernetes (CRDs). For sqlite3, add a writable volume via extraVolumes/extraVolumeMounts and point storage.config.file at it (read-only rootfs blocks writes elsewhere).
  • Replace staticPasswords with a real connector (LDAP, SAML, OIDC, GitHub, Google, etc.).
ValueDefaultNotes
image.repositoryghcr.io/quenchworks/images/dex
image.digest(CI-maintained)signed multi-arch index
replicaCount1safe only with shared storage
config.yamlin-memory exampleinline Dex config (rendered + mounted)
config.existingConfigMap""external config ConfigMap (key config.yaml, wins)
configMountPath/etc/dex/config.yamlwhere the config is mounted
command / argsdex / serve <config>container command override
service.typeClusterIP
service.ports.http5556OIDC issuer + UI
service.ports.grpc5557gRPC API
service.ports.telemetry5558health + metrics
service.ports.https443HTTPS listener (container 8443), published instead of http when tls.enabled.
tls.enabledfalseServe the OIDC issuer and login UI over HTTPS on the app's own listener; the certificate is mounted at /tls.
tls.existingSecret""Use this kubernetes.io/tls Secret (1st choice).
tls.certManager.enabledfalseRequest a cert-manager Certificate from tls.certManager.issuerRef (2nd choice).
tls.selfSigned.validityDays365Otherwise Helm generates a CA + certificate, kept across upgrades.
ingress.enabledfalseCreate an Ingress. With tls.enabled it routes to 443: set the backend protocol to HTTPS.
ingress.className""IngressClass to claim it. Empty leaves it unset, so the cluster default applies.
ingress.annotations{}Controller annotations (rewrite targets, body size, cert-manager issuer, ...).
ingress.servicePortnullBackend port. Unset: service.ports.https with tls.enabled, else service.ports.http.
ingress.hosts[]e.g. [{host: app.example.com}]. A host with no paths gets a single / Prefix path.
ingress.tls[]Standard Ingress TLS list, e.g. [{hosts: [app.example.com], secretName: app-tls}].

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 v0.0.22 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