From 87e6e06a6c74708adcb7fe320ccf836f73410744 Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Mon, 16 Nov 2026 03:05:44 +0100 Subject: [PATCH] feat(business-site): switch portal sign-in on, invite-only The maintainer chose to switch the portal on, invite-only (business-site#302). business-site-runtime's portal-settings now carries the five dependency keys: the portal database as portal_web over verified TLS, the customer Dex as issuer, and its business-portal client and callback. It also carries the production identity profile with portal-identity enabled. portal_web's password comes from OpenBao apps/business-site/portal-db, as for CNPG. No billing key is set, so orders and payments stay off, and access still needs an invitation. The web pods read the file only at startup. The change takes effect with the next business-site rollout, which also publishes the privacy notice's portal section (business-site#628). Co-Authored-By: Claude Opus 5.5 --- .../external-secret-runtime.yaml | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/k8s/providers/hetzner/apps/business-site/external-secret-runtime.yaml b/k8s/providers/hetzner/apps/business-site/external-secret-runtime.yaml index 896543c30..f393b01d2 100644 --- a/k8s/providers/hetzner/apps/business-site/external-secret-runtime.yaml +++ b/k8s/providers/hetzner/apps/business-site/external-secret-runtime.yaml @@ -7,10 +7,17 @@ # (business-site#21). The package selects it in its WebApp; until then nothing # reads it, and the portal sends nothing while its flags are off. # -# portal-settings is the portal's on/off switch. While sign-in is off it holds -# no settings, so the public site never depends on the portal database or the -# customer Dex. Switching on is a reviewed change to this template that adds -# the settings and the production activation profile (business-site#302). +# portal-settings is the portal's on/off switch (business-site deploy/README.md, +# "Portal settings and invitations"). Sign-in is on, invite-only, since the +# maintainer chose to switch it on (business-site#302): the five dependency keys +# (the portal database as portal_web over verified TLS, the customer Dex as +# issuer and its business-portal client) and the production identity profile +# with portal-identity enabled. No billing key is set, so orders and payments +# stay off. With these settings the web pods check their database login, +# grants and the migrated schema, and discover the customer Dex, before they +# serve, so the public site now depends on both. The pods read the file only at +# startup: a change here reaches them with the next rollout. To switch sign-in +# off, remove PORTAL_IDENTITY_PROFILE and PORTAL_IDENTITY_FLAG, or every key. apiVersion: external-secrets.io/v1 kind: ExternalSecret metadata: @@ -26,7 +33,14 @@ spec: data: company-disclosure: "{{ .company_disclosure }}" portal-settings: | - # Portal sign-in is off (business-site#302). + # Portal sign-in is on, invite-only (business-site#302). + PORTAL_DATABASE_URL=postgres://portal_web:{{ .portal_web_password | urlquery }}@business-site-portal-db-rw.business-site.svc:5432/portal?sslmode=verify-full&sslrootcert=/run/webapp-inputs/portal-database-ca + PORTAL_OIDC_ISSUER=https://login.devantler.tech + PORTAL_OIDC_CLIENT_ID=business-portal + PORTAL_CALLBACK_URL=https://portal.devantler.tech/callback + PORTAL_CLIENT_SECRET_PROJECTION_FILE=/run/webapp-inputs/portal-client-secret + PORTAL_IDENTITY_PROFILE=production + PORTAL_IDENTITY_FLAG={"defaultVariant":"on","variants":[{"name":"on","value":true}]} portal-client-secret: "{{ .portal_client_secret }}" portal-database-ca: "{{ .portal_database_ca }}" smtp-username: "{{ .smtp_username }}" @@ -58,6 +72,16 @@ spec: remoteRef: key: apps/business-site/portal-db-ca property: ca + # The portal database's runtime login, as external-secret-portal-db-web.yaml + # reads it for CNPG. + - secretKey: portal_web_password + sourceRef: + storeRef: + name: openbao + kind: ClusterSecretStore + remoteRef: + key: apps/business-site/portal-db + property: web-password # The mail sender's SES SMTP credential, read the same way as ZITADEL's # zitadel-smtp: From no-reply@devantler.tech only. - secretKey: smtp_username