Skip to content
Skip to Content

Secrets and encryption

Which secrets OpenPanel seals, with AES-256-GCM under keys of their own, which it only hashes, how secrets reach your servers, and who can read each one.

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

SecretWhere it comes fromWho can read it
A server's SSH private keyMade by OpenPanel during the setup, one per serverNobody in the console. Only OpenPanel uses it, to sign in to that server.
A server's console passwordMade by OpenPanel at the end of the setup, for root, openpanel and the user you connected withThe Owner and Admins, under Console access on the server's page.
A Git account's token or passwordPasted by the Owner or an Admin when adding the accountNobody in the console. Only OpenPanel uses it, to reach the account.
An SSH Git account's private deploy keyMade by OpenPanel when the account is addedNobody in the console. Its public half is shown, to add to the repository.
A secret variable's valueSet by a member with deploy access to the projectNot 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 secretMade by OpenPanel when push to deploy is turned onShown 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:

  1. 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.
  2. The gateway opens it and sends the value to the agent over the agent's authenticated TLS connection.
  3. 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

WhatHow
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

WhatHow
Your passwordHashed with scrypt. It cannot be read back, only checked.
Your two-factor secretEncrypted (XChaCha20-Poly1305) with the sign-in system's own key.
Your two-factor backup codesEncrypted 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.