Credentials

Credentials

Prompt for the secrets a hook needs and keep them in the OS keychain, in memory, or nowhere. They are never written to muster.json or git.

Credentials or muster env?

Credentials are for values a person types at deploy time, such as a registry password. For app config and secrets that the whole team and CI share, use muster env, which stores them encrypted in the repo.

Turn on credentials for a service

muster.json
"api": {
  "credentials": {
    "enabled": true,
    "mode": "save",
    "required": ["DATABASE_URL", "API_KEY"]
  }
}

Or at setup time:

Terminal
muster setup --creds api=session

Use them in a hook

Each entry in required is exported as MUSTER_CRED_<KEY>, uppercased:

.muster/hooks/api/deploy.sh
curl -H "Authorization: Bearer $MUSTER_CRED_API_KEY" https://api.example.com/deploy

Don't echo credential values in hooks: hook output goes to the deploy log.

In CI

muster never prompts without a terminal. Set MUSTER_CRED_<KEY> in the job's environment and muster uses it instead of asking.

Modes

ModeBehaviour
offNo credentials.
savePrompted once, then kept in the OS keychain (macOS Keychain, Linux secret-tool).
sessionPrompted once, kept in memory for this run.
alwaysPrompted every time.