Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Credentials vault

Credentials (API keys, passwords, OAuth2 tokens, private keys) are stored encrypted and decrypted only for the moment a node needs them.

Envelope encryption

TAPPET_ENCRYPTION_KEY (KEK, version n)
        |
        | wraps (AES-256-GCM)
        v
per-credential data key (DEK) --encrypts (AES-256-GCM)--> credential fields
  • Each credential has its own random 256-bit data encryption key (DEK).
  • The credential’s secret fields are encrypted with the DEK using AES-256-GCM with a fresh random 96-bit nonce for every encryption.
  • The associated data binds the ciphertext to its tenant, credential ID and key version, so a ciphertext copied to another credential row does not decrypt.
  • The DEK is stored only in wrapped form, encrypted by the key-encryption key (KEK).
  • The KEK is never stored in the database.

A database dump or backup alone does not reveal any secret.

Key sources

SourceConfigurationNotes
Environment variableTAPPET_ENCRYPTION_KEY: base64 of 32 random bytesSimplest. Inject from your secret manager.
Key file (development only)Generated at ${TAPPET_DATA}/encryption.key with mode 0600Only when TAPPET_ENV is not production.
HashiCorp Vault TransitVault address, token or auth method, key nameThe KEK never leaves Vault; Tappet asks Vault to wrap and unwrap DEKs.
AWS KMSKMS key ARN, standard AWS credentialsBuilt with the kms feature.

Generate a key:

openssl rand -base64 32

In production mode (TAPPET_ENV=production), Tappet refuses to start without a configured KEK, rather than generating one silently.

Back up the key separately from the database. Losing it makes every stored credential unrecoverable. Storing it next to the database backup defeats the encryption.

Secrets in memory

Decrypted values are held in zeroizing secret types that wipe memory on drop. They are never serialized into workflow exports, API responses, logs or execution data, and every resolved value is added to the execution’s redaction set (see Redaction).

Secret fields are write-only through the API: you can replace them but not read them back. The editor shows that a value is set, not the value.

OAuth2 tokens

  • Connecting: the credential page starts the authorization code flow (with PKCE where the provider supports it). The state parameter is signed, single-use, valid for 10 minutes and bound to the user and the credential. The callback is <TAPPET_PUBLIC_URL>/api/v1/oauth2/callback.
  • Refreshing: access tokens are refreshed ahead of expiry (60 seconds by default). Concurrent executions that need a refresh at the same time wait for a single refresh: within one process through a per-credential lock, and across processes in HA mode through a Postgres advisory lock, re-reading the token after acquiring the lock.
  • Rotating refresh tokens: providers that issue a new refresh token on every refresh have it persisted in the same transaction before the new access token is used.
  • Revoked access: if the provider answers invalid_grant, the credential moves to needs_reauth, executions that need it fail with a clear message, and the UI asks the owner to reconnect.

Key rotation

tappet keys rotate re-wraps every DEK under a new KEK version while Tappet keeps running. Credential ciphertexts are not touched, so rotation is fast even with many credentials. See Key rotation for the procedure.

Access to credentials

  • A credential belongs to a project and can only be used by workflows in that project.
  • Editors can attach credentials to nodes; they never see secret values.
  • Every decryption for an execution is recorded in the audit log with the execution ID.
  • Credential tests run the connector’s test request with the egress policy applied.