You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c2ff178
Browse filesBrowse the repository at this point in the historyBrowse files
fix(helm): reject placeholder secrets and stop shipping them in example values (#10052)
* fix(helm): reject placeholder secrets and stop shipping them in example values
The production example values files filled BETTER_AUTH_SECRET, ENCRYPTION_KEY, INTERNAL_API_SECRET, CRON_SECRET, API_ENCRYPTION_KEY and the Postgres password with fixed 'your-...' strings. sim.validateSecrets only rejected empty values and exact 'CHANGE-ME-...' literals, so an install that omitted one --set override rendered cleanly with a publicly known secret.
- Blank those keys in the production/aws/gcp/azure/whitelabeled examples so the existing required-key checks fail the install
- Replace the exact-literal comparisons with sim.rejectPlaceholderSecret, a shape check for change-me/your- values, applied to every app, realtime, copilot and database secret
- Add CRON_SECRET to the README install snippet and update the self-hosting docs callout
* fix(helm): skip copilot placeholder check when ESO supplies the secrets
* chore(helm): bump chart to 1.11.20
* fix(helm): only check the realtime placeholder when realtime is enabled
The example values files ship literal placeholders such as `your-secure-production-auth-secret-here`. That includes `postgresql.auth.password`. The chart only rejects empty values and its own `CHANGE-ME` strings, so a deployment that inherits those placeholders installs cleanly with a publicly known session-signing secret and database password. Override every secret, or use External Secrets and set none of them inline.
177
+
The example values files leave every secret empty, and the chart refuses to install while a required secret is empty or still holds a placeholder such as `your-...` or `CHANGE-ME-...`. Examples from chart versions before `1.11.20` shipped literal placeholders that passed this check, so if you installed from one of them, rotate any secret you did not override.
178
178
</Callout>
179
179
180
180
Pin `version` above. Empty image tags use the selected chart's `appVersion`, so a pinned chart also selects that default app version. Explicit image tags or digests override it; pin them separately when you need that control, and keep app, realtime, and migrations aligned. Chart `1.11.8` was published with app version `v0.9.17`; local checkout metadata can differ. See [Upgrades](/platform/self-hosting/upgrades).
{{- fail "app.env.INTERNAL_API_SECRET is required for production deployment (shared auth between sim-app and sim-realtime pods). Generate one with: openssl rand -hex 32" }}
{{- fail "realtime.env.BETTER_AUTH_SECRET must not use the default placeholder value. Generate a secure secret with: openssl rand -hex 32" }}
289
+
{{- range$key:= list "BETTER_AUTH_SECRET""ENCRYPTION_KEY""INTERNAL_API_SECRET""CRON_SECRET""API_ENCRYPTION_KEY" }}
290
+
{{- include "sim.rejectPlaceholderSecret" (list (printf"app.env.%s"$key) (index$.Values.app.env$key)) }}
291
+
{{- end }}
292
+
{{- if.Values.realtime.enabled }}
293
+
{{- include "sim.rejectPlaceholderSecret" (list "realtime.env.BETTER_AUTH_SECRET".Values.realtime.env.BETTER_AUTH_SECRET) }}
285
294
{{- end }}
286
295
{{- /* CRON_SECRET is required when cronjobs are enabled — pods reference it via secretKeyRef and would fail to start if the key is missing from the Secret. */ -}}
{{- fail "externalDatabase.password must only contain alphanumeric characters, hyphens, underscores, or periods to ensure DATABASE_URL compatibility." }}
0 commit comments