Repository navigation
Key Management
Filip Chochół edited this page Jun 21, 2026
·
3 revisions
| Secret | Purpose | Stored |
|---|---|---|
SSF_MANAGEMENT_TOKEN |
Protects /ssf/*, /apple-scim/status, /apple-scim/sync
|
Env only |
SSF_WEBHOOK_TOKEN |
Authentik webhook auth (bearer mode) | Env only |
SSF_WEBHOOK_SECRET |
Authentik webhook auth (HMAC legacy) | Env only |
SSF_PII_PEPPER |
Log email pseudonymisation | Env only |
SSF_TOKEN_ENCRYPTION_KEY |
Encrypt receiver tokens in SQLite | Env only |
| RSA private key | Sign SET JWTs | /app/keys/private.pem |
| Receiver bearer token | Authenticate push to ABM/receiver | SQLite (encrypted at rest since v0.5.9) |
Generate random secrets:
openssl rand -hex 32Never reuse SSF_MANAGEMENT_TOKEN as SSF_WEBHOOK_TOKEN — they protect different boundaries.
- Created automatically on first start (
chmod 0600). - Backup before upgrades or host migration.
-
Rotation: stop container → remove
private.pemandjwks.json→ start (new key pair). Receivers re-fetch JWKS. - Compromise: rotate immediately; receivers may need to refresh trusted keys.
Receiver endpoint tokens in SQLite are Fernet-encrypted with prefix fernet1:.
| Key source | When |
|---|---|
SSF_TOKEN_ENCRYPTION_KEY |
Set explicitly (recommended for new installs) |
Derived from SSF_MANAGEMENT_TOKEN
|
Default when encryption key unset |
-
Leave
SSF_TOKEN_ENCRYPTION_KEYunset unless you will re-register the stream. -
Do not rotate
SSF_MANAGEMENT_TOKENwithout re-registering the stream with a newdelivery.endpoint_url_token.
- Generate
SSF_TOKEN_ENCRYPTION_KEYand add tostack.env. - Start container.
- Register stream (
POST /ssf/streams).
If startup logs show paused streams due to undecryptable tokens:
- Obtain new receiver token from ABM/receiver.
-
PATCH /ssf/streamswith the currentdelivery.endpoint_url, the newdelivery.endpoint_url_token, andstatus: enabled.
Optional. When unset, logs use a key derived from SSF_MANAGEMENT_TOKEN (startup warning). Set a dedicated pepper in production.
/volume/.../ssf-keys/ → private.pem, jwks.json
/volume/.../ssf-data/ → ssf.db
stack.env → all tokens (secure store, not in git)
Restore both volumes together when migrating hosts.