Skip to main content

Credential Encryption and Recovery

Synth automatically encrypts values saved through Credentials using AES-256-GCM, including credentials imported through CaSC. Normal upgrades need no new settings or token re-entry. Keep the existing persistent data volume and use your ordinary stop-and-restart upgrade procedure.

This protection covers the managed credential store. Project content, inline configuration, environment variables, and backups need their own protection. An authorized running Synth process can still use the saved credentials.

Back Up and Restore​

Stop the app, ingestion worker, and any startup importer before taking a file-based backup. Back up the complete SYNTH_HOME, including hidden files. The default Docker and Helm data location is /var/lib/synth.

Restore the complete directory with its original permissions. It includes the saved credentials, encryption state, and, by default, the encryption key. Copying only Project folders is not a complete instance restore. After restoring older knowledge, also follow source removal and recovery.

Default backups contain the key and remain sensitive: encrypt them and restrict access. If your deployment supplies an external key, back it up separately and provide the same key after restore. Verify a restore by opening Credentials and running a connection test for an integration that supports it.

Supply Your Own Key (Optional)​

Automatic key management works without configuration. Supply an external key if your organization wants it kept outside Synth's data backups.

Configure exactly one of these settings for every Synth process, including startup imports, the web app, and ingestion workers:

SettingValue
SYNTH_ENCRYPTION_KEY_FILEPath to a read-only mounted key file
SYNTH_ENCRYPTION_KEYKey supplied by your deployment's secret manager

The key must be 32 random bytes encoded in Base64. Keep it stable across restarts. Do not put its value in source control, CaSC, Helm values, or support messages. Synth does not save an externally supplied key in its data directory.

For a new installation, use a private directory outside your repository and generate a protected file. This command refuses to overwrite an existing file:

(umask 077; set -C; openssl rand -base64 32 > synth-encryption.key)

Docker Compose​

Merge these settings into your existing Compose file. Add the secret and environment setting to every Synth service, including a separate worker or startup importer when present:

services:
synth:
environment:
SYNTH_ENCRYPTION_KEY_FILE: /run/secrets/synth-encryption-key
secrets:
- synth-encryption-key

secrets:
synth-encryption-key:
file: ./synth-encryption.key

Keep existing environment, secret, and volume entries. Ensure the container's runtime user can read the protected file.

Helm​

Create a dedicated Secret in Synth's namespace using a new name. This command leaves an existing Secret unchanged:

kubectl create secret generic synth-credential-encryption \
--from-file=SYNTH_ENCRYPTION_KEY=./synth-encryption.key

Reference it through the chart's shared configuration, keeping any existing entries. This reaches startup, web, and worker processes:

extraEnvFrom:
- secretRef:
name: synth-credential-encryption

This supplies SYNTH_ENCRYPTION_KEY; do not also set SYNTH_ENCRYPTION_KEY_FILE. If your platform already manages this key, reference its Secret instead.

Move an Existing Key to External Storage​

For an existing encrypted installation, use its current key; do not generate a replacement. Stop all Synth processes, securely copy $SYNTH_HOME/secrets/credentials.key into your external secret store, configure the same value everywhere, and restart. Once external custody is active, Synth requires the external key even if the old local file remains.

After verifying a restore with the external key, remove the redundant local key file. Earlier backups may still contain it. Changing the installation encryption key is not supported. You can still replace individual integration tokens normally through Credentials settings.

If Credentials Cannot Be Opened​

Check that the complete persistent data directory is mounted and writable. If using an external key, check that every Synth process receives the same original key and that only one encryption-key setting is present. Restore missing key or state files from the matching backup.

Do not delete encryption state or generate a new key to clear the error. If the original key is lost, the saved secrets cannot be decrypted. Contact your administrator to recover the provider credentials and plan a clean instance recovery; preserve the existing data before making changes.