dex
by QuenchWorks
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
| Port | Name | Purpose |
|---|---|---|
5556 | http | OIDC issuer + login UI |
5557 | grpc | gRPC API |
5558 | telemetry | health (/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, orkubernetes(CRDs). Forsqlite3, add a writable volume viaextraVolumes/extraVolumeMountsand pointstorage.config.fileat it (read-only rootfs blocks writes elsewhere). - Replace
staticPasswordswith a real connector (LDAP, SAML, OIDC, GitHub, Google, etc.).
| Value | Default | Notes |
|---|---|---|
image.repository | ghcr.io/quenchworks/images/dex | |
image.digest | (CI-maintained) | signed multi-arch index |
replicaCount | 1 | safe only with shared storage |
config.yaml | in-memory example | inline Dex config (rendered + mounted) |
config.existingConfigMap | "" | external config ConfigMap (key config.yaml, wins) |
configMountPath | /etc/dex/config.yaml | where the config is mounted |
command / args | dex / serve <config> | container command override |
service.type | ClusterIP | |
service.ports.http | 5556 | OIDC issuer + UI |
service.ports.grpc | 5557 | gRPC API |
service.ports.telemetry | 5558 | health + metrics |
service.ports.https | 443 | HTTPS listener (container 8443), published instead of http when tls.enabled. |
tls.enabled | false | Serve 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.enabled | false | Request a cert-manager Certificate from tls.certManager.issuerRef (2nd choice). |
tls.selfSigned.validityDays | 365 | Otherwise Helm generates a CA + certificate, kept across upgrades. |
ingress.enabled | false | Create 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.servicePort | null | Backend 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartdex is pinned at v0.0.22 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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