Relationships
#5035 Docs: vault-seeded OAuth secret rotation, env variables hidden from expressions, and serve daemon enable OAuth checks
Opened by stack72 · 11/24/2026
swamp-club#4372 (swamp PR #3934) shipped changes the manual does not cover yet.
- Rotating a vault-seeded OAuth client secret has no effect (content/manual/how-to/swamp-serve/deploy-headless-oauth.md, content/manual/how-to/vaults/use-aws-sm.md)
With --keep-oauth-client-in-vault, oauth-client-id and oauth-client-secret stay in the user vault (for example AWS Secrets Manager). On its first start serve copies them into its own _token-secrets store and records a migration marker. After that, serve reads only its own copy: changing oauth-client-secret in the user vault has no effect while the datastore persists, and once the old secret stops working OAuth fails at token exchange.
Suggested content: in the "Rotate a client secret" section of deploy-headless-oauth.md, step 2 ("Give the server the new secret"), add that a secret seeded through --keep-oauth-client-in-vault cannot be rotated by updating the vault; start the server with --oauth-client-id and the new secret in --oauth-client-secret-file (or SWAMP_OAUTH_CLIENT_SECRET_FILE). Add the same caveat beside the --keep-oauth-client-in-vault bullet in use-aws-sm.md.
- Variables hidden from env in expressions (content/manual/reference/cel-expressions.md)
Expressions that read env no longer see SWAMP_API_KEY or SWAMP_OAUTH_CLIENT_SECRET, matched case-insensitively, because env values land in persisted model output. An expression that reads either one now fails with a missing-binding error. Method subprocesses already never inherited them.
Suggested content: in the env section of cel-expressions.md, list the two hidden variables, say why, and point to vault.get for secrets.
- serve daemon enable (content/manual/reference/swamp-serve/daemon.md, content/manual/how-to/swamp-serve/run-as-system-daemon.md)
run-as-system-daemon.md already says daemon enable does not carry SWAMP_OAUTH_CLIENT_ID into the service. Two new behaviors to add to daemon.md: in oauth mode, daemon enable refuses --oauth-client-secret-file when neither --oauth-client-id nor auth.oauth-client-id in serve.yaml names a client (it never reads the file); and it warns, in log output and in a new warnings array in --json output, when SWAMP_OAUTH_CLIENT_ID, SWAMP_OAUTH_CLIENT_SECRET_FILE or SWAMP_OAUTH_CLIENT_SECRET is set in the shell without its flag, since the service never receives them.
Open
No activity in this phase yet.
Sign in to post a ripple.