Secrets and encryption
OpenPanel seals the secrets that give access to your servers, your Git accounts and your services before it stores them. It keeps only hashes of your password, API keys and the agents' enrolment tokens, and encrypts your two-factor secret.
Sealed secrets
| Secret | Where it comes from | Who can read it |
|---|---|---|
| A server's SSH private key | Made by OpenPanel during the setup, one per server | Nobody in the console. Only OpenPanel uses it, to sign in to that server. |
| A server's console password | Made by OpenPanel at the end of the setup, for root, openpanel and the user you connected with | The Owner and Admins, under Console access on the server's page. |
| A Git account's token or password | Pasted by the Owner or an Admin when adding the account | Nobody in the console. Only OpenPanel uses it, to reach the account. |
| An SSH Git account's private deploy key | Made by OpenPanel when the account is added | Nobody in the console. Its public half is shown, to add to the repository. |
| A secret variable's value | Set by a member with deploy access to the project | Not shown again: the API and the CLI list a secret without its value. The service's containers get it when they are deployed. See Secrets. |
| A service's push-to-deploy secret | Made by OpenPanel when push to deploy is turned on | Shown once, to add to the Git host's webhook. Only OpenPanel uses it afterwards, to check each delivery. See Push to deploy. |
How sealing works
- AES-256-GCM, authenticated encryption: a sealed value that has been changed does not open.
- A fresh random 12-byte nonce for every value.
- Bound to its place. Each sealed value is tied to the table, column and row it belongs to, so a sealed value copied anywhere else does not open.
- A key of its own, 32 random bytes kept in OpenPanel's environment, separate from the key that signs sessions, so rotating one never affects the other. The key is never stored in the database. Each sealed value records which key version sealed it, so the key can be replaced and every value sealed again under the new one.
- Checked before anything starts. If the key is not set, connecting a server or adding a Git account is refused before any work, so nothing is ever kept unsealed.
A sealed value is opened only inside OpenPanel's own server, at the moment it is needed: to sign in to your server, to reach a Git account, to show the console password to the Owner or an Admin, or to send a secret on to a server. It never travels to the browser otherwise.
How secrets reach your servers
A secret variable for a service's containers, and the Git credentials a build clones with, travel to the server's agent without ever resting in clear:
- OpenPanel's app seals the value again, with AES-256-GCM, under a second key that only the app and OpenPanel's gateway hold. The sealed value is bound to the server, the revision of its instructions and the variable, or to the one build job.
- The gateway opens it and sends the value to the agent over the agent's authenticated TLS connection.
- The agent hands it to the container. The gateway keeps no value in memory after sending it.
Changing a secret restarts nothing by itself: the service's next deploy carries the new value.
Hashed
| What | How |
|---|---|
An API key (opk_…) | Only its SHA-256 hash is kept. The key is shown once, when it is made. |
An agent's enrolment token (ope_…) | Only its SHA-256 hash is kept. It works once, within an hour. |
An agent's own key is never sent to OpenPanel: OpenPanel keeps only its public half.
Hashed or encrypted by the sign-in system
| What | How |
|---|---|
| Your password | Hashed with scrypt. It cannot be read back, only checked. |
| Your two-factor secret | Encrypted (XChaCha20-Poly1305) with the sign-in system's own key. |
| Your two-factor backup codes | Encrypted the same way. |
Never stored
- The password you type to connect a server. OpenPanel uses it once, to sign in for the setup, then forgets it.
- Your card. Our payment processor keeps it.
Stored as they are
These are kept in OpenPanel's database without sealing:
- your name, email address and picture;
- organizations, members, roles and invitations;
- each server's address, SSH port, SSH host key, system facts and setup steps;
- each Git account's address, username and name;
- projects, services, deployments and domains, and the value of every variable that is not a secret;
- enterprise sign-in settings: the domain, the identity provider's sign-in URL and its signing certificate, which is public by nature;
- the tokens Google, Microsoft or GitHub return when you sign in with them.
Server hardening
How the setup hardens every connected server, in short, with a link to every change in detail.
Firewall
The ufw rules the setup writes on every connected server, the rules that keep ports Docker publishes closed, the private network's rules, the fail2ban settings, and what a disconnect leaves.