Skip to main content
This guide covers one behavior change in @outputai/core credentials init. Nothing in your workflow code needs to change. If a deploy ships the encrypted credentials file the worker would decrypt, without a valid matching key, the worker will refuse to start instead of running until the first credential read.

What changed

At worker startup, credentials init loads global credentials through the same path later reads use (loadGlobal):
  1. config/credentials/<NODE_ENV>.yml.enc when NODE_ENV is production or development and that file exists
  2. otherwise config/credentials.yml.enc when that file exists
That decrypts and caches the file. A missing key, wrong or malformed key, or corrupt ciphertext fails the process before any activity runs. Custom providers set with setProvider() skip this eager load. A missing key names the expected env var and key file, for example:
or, when only the default file is present:
See Deploying to Production.

Deploys that withhold the key on purpose

Some images copy an encrypted credentials file into the image and rely on never reading credentials in that environment, or on setting the key later. After v0.19.0 those workers crash-loop at boot whenever that file is the one the worker would load — including when a key is set but does not match the file. Pick one:
  1. Provide a valid key - set the env var or mount the key file that matches the file on disk (OUTPUT_CREDENTIALS_KEY_PRODUCTION / config/credentials/production.key for the env-scoped file, or OUTPUT_CREDENTIALS_KEY / config/credentials.key for the default file). An env-scoped file does not fall back to the global key.
  2. Remove or rename the enc file in images that must not decrypt credentials, so the eager load finds nothing to decrypt.
  3. Use a custom provider - call setProvider() before credentials init; the encrypted-YAML eager load runs only for the default provider.
Option 1 is the normal path. Options 2 and 3 are for environments that intentionally never decrypt that file.

Checklist

  • Bump @outputai/core to 0.19.0.
  • Confirm every worker deploy that includes config/credentials/production.yml.enc, config/credentials/development.yml.enc, or config/credentials.yml.enc also supplies a valid matching key for the file that will be loaded.
  • If a deploy must ship an enc file without a valid key, remove that file from the image or switch to a custom credentials provider before upgrade.