Security
This page covers how CTRL stores your keys and secrets, and what CTRL itself can see.
What is stored, and how#
| What | How it's stored |
|---|---|
| API keys | Only an HMAC-SHA256 hash, made with a server-side secret. The key itself is shown once, when you create it, and can't be recovered. |
| Environment variables | Encrypted at rest with AES-256-GCM. |
| Database passwords | Encrypted at rest. A copy is also kept in the app's environment variables, which are encrypted too. |
| Your GitHub access token | Encrypted at rest. It's used to read your repositories, and is passed to the build node when your app builds. |
| Private registry credentials | Not stored. They're passed through for the first deploy only, which is why an app from a private image can't be redeployed. |
| Your dashboard session | A signed token in an HttpOnly cookie, valid for 7 days. |
What CTRL can see#
Encryption at rest protects against a copy of the database leaking. It doesn't hide anything from CTRL itself:
- Environment variables are decrypted to start your app, and the API returns them to anyone holding your API key or session. Treat everyone with access to your account as able to read them.
- Your app's traffic passes through CTRL's proxies on the way to your app.
- Logs and metrics your app produces are kept so you can read them in the dashboard.
What you can check#
- The audit log (ctrl audit, at the bottom of the Account page) records actions on your account: key changes, deploys, env var changes, domains and deletes. Env var changes are logged by key name only, never with values.
- API keys show when each was last used. See API keys.
Good practice#
- Give each place that needs access its own named key, and revoke it when that place no longer needs it. Keys have no scopes yet, so each one can do everything your account can.
- Set secrets with
ctrl env set <app> --stdinso they stay out of your shell history. See Environment variables. - Don't commit keys or secrets to your repository.