fix(config): reject the Vault placeholder in every secret field

Every secret field now rejects the string VAULT_MANAGED at config validation, so a secret that Vault failed to inject stops the service at boot instead of being used as if it were real.

Here is the problem, one step at a time.

The production config files committed to this repo set every secret to the literal VAULT_MANAGED: the service token, the OAuth HMAC secret and signing key, the third-party provider client secrets, and the database credentials. Anyone with repo access can read that string.

Vault is supposed to overwrite them. At deploy time Runway injects the real values as environment variables, and the config loader prefers an env var over the file value. That is how the placeholder is meant to disappear.

If Vault does not deliver, nothing notices. A renamed secret, a missing binding, or an env var that simply does not show up leaves the file value in place. The running config then has, say, a service token equal to VAULT_MANAGED. The validators only checked for an empty string, and the placeholder is not empty, so the service started.

What that exposed depends on the field. The service token guards every relationship RPC on data-access and, worse, the internal login, consent, session, client and token gRPC services on auth, which take no user credential at all. With the placeholder in place anyone who could reach those endpoints held the shared secret. The HMAC secret signs authorization codes and refresh tokens; with it public the secret adds no protection. The provider client secrets would only break third-party login. The RSA signing key and database credentials already failed closed on their own, since a placeholder cannot be parsed as a key or accepted by the database.

This matters right now because the write bug fixed in !900 (merged) was blocked for outside users only by the data-access service token. If that token had ever degraded to the placeholder, the block would have vanished.

The fix defines the placeholder once, next to the platform config, and has each secret validator reject it after its existing empty check: both service-token rotation slots on auth and data-access, the OAuth HMAC secret and signing key, provider client ids and secrets, and the service and migration database credentials. The README and the data-access runbook now say that a missing injection fails at boot rather than leaking through.

Found as finding 2 of the internal security review of 2026-10-12.

Merge request reports

Loading
Loading