Skip to content

feat: self-hosted Authentik IdP PoC (platform cluster, cloudflared tunnel) - #42

Draft
jonathandieu wants to merge 3 commits into
mainfrom
feat/authentik-poc
Draft

feat: self-hosted Authentik IdP PoC (platform cluster, cloudflared tunnel)#42
jonathandieu wants to merge 3 commits into
mainfrom
feat/authentik-poc

Conversation

@jonathandieu

Copy link
Copy Markdown
Owner

Proof-of-concept for a self-hosted Authentik IdP on the platform cluster, exposed via a
Cloudflare Tunnel (no public LB). Foundation for SSO across *.dieu.dev; the first
consumer is whereis.dieu.dev (#16).

Changes

  • charts/platform/authentik/ — Authentik server + worker + bundled Postgres + a small
    ephemeral Redis (the chart bundles no Redis). Secrets (AUTHENTIK_SECRET_KEY, DB
    password, bootstrap admin) come from 1Password via an ExternalSecret, nothing in git.
  • charts/platform/cloudflared/ — token-based HA Cloudflare Tunnel; token from 1Password.
  • argocd/apps/platform/appset.yaml — added both to the platform appset, which is scoped
    to purpose: platform, so they deploy only to the platform cluster.

Architecture

Authentik runs on the platform (management) cluster. cloudflared exposes auth.dieu.dev
via an outbound tunnel (no inbound LB). Apps on any cluster authenticate over OIDC
(browser redirects + JWKS over public HTTPS), so the cluster boundary is a non-issue.

Verified

helm lint + helm template clean on both charts; the platform appset passes a server
dry-run against the live ApplicationSet CRD.

Prerequisites before this can deploy (not in this PR)

  • Platform node bump for memory headroom: terraform PR whereis.dieu.dev: decide requester auth/identity approach #16 (s-2vcpu-8gb -> s-4vcpu-16gb).
  • Two 1Password items (authentik-secrets fields + the tunnel credential), and fill the
    onePasswordItem UUIDs in the two values files.
  • A Cloudflare Tunnel + a public-hostname route auth.dieu.dev -> http://authentik-server.authentik:80.

Known open item

Validate the bundled Bitnami Postgres image actually pulls (Bitnami deprecated their free
Docker Hub catalog in 2025). If it 404s on deploy, repoint to bitnamilegacy/postgresql
or a plain postgres image. Needs the live cluster to confirm.

Draft until deployed end-to-end.

Related: #16, terraform#16.

Authentik (server + worker + bundled Postgres) exposed via a Cloudflare Tunnel
(cloudflared, token-based, HA). Secrets (authentik-secrets, tunnel token) come
from 1Password via ExternalSecrets against the onepassword ClusterSecretStore.

WIP: still needs a Redis (chart bundles none), Bitnami Postgres image validation,
and platform-scoped appset wiring, to be finished against the live cluster.
Move the Authentik IdP and cloudflared tunnel charts to charts/platform/ and add
them to the platform ApplicationSet, which is scoped to purpose=platform, so they
run only on the platform cluster (not every cluster like the infra appset).
@github-actions

Copy link
Copy Markdown

Helm template diff

Only in /tmp/head: authentik.yaml
Only in /tmp/head: cloudflared.yaml
diff -u --recursive --label base --label head base head
--- base
+++ head
@@ -219,7 +219,7 @@
     app.kubernetes.io/managed-by: Helm
 type: Opaque
 data:
-  SECRET_KEY_BASE: NG1yQ0F1OGFKYW1hS2ZSMVhrTWo5YWROWW9OMmRFOG83eFNBSHVRVXV4cjJlY0VWSzVKVm9LbHZvZWo4Y0QxVENqRUpZcFM2V1Raa2k1akZRWkg1eHlJdTVq
+  SECRET_KEY_BASE: SXJtWTNjUHdoZllreHNWYUxQRWZIZHMyQXdjbzNuWlpvYUFrN0tUTjFRU0hoMFkzRld4SWxhUVRXcGxUUUkzRmJSc0JYSjd6MjdPckZFUmJVTHRGTU1CM1lP
   TOTP_VAULT_KEY: ZHN4dmJuM2p4RGQxNmF6MlFwc1g1QjhPK2xseGpRMlNKRTJpNUJ6eDM4ST0=
   DATABASE_URL: cG9zdGdyZXM6Ly9wb3N0Z3Jlczpwb3N0Z3Jlc0BwbGF1c2libGUtcG9zdGdyZXNxbDo1NDMyL3BsYXVzaWJsZV9kYg==
   CLICKHOUSE_DATABASE_URL: aHR0cDovL2NsaWNraG91c2U6cGFzc3dvcmRAcGxhdXNpYmxlLWNsaWNraG91c2U6ODEyMy9wbGF1c2libGVfZXZlbnRzX2Ri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant