Skip to content

LUMA uses a small tree of keys. The master key sits at the root and is never stored in the store directory. It seals the keyring file, which holds the data keys that seal everything else.

STRATA_MASTER_KEY 32 bytes, never on disk STRATA_AUTH_KEY optional, must differ from master AES-256-GCM seals keys (keyring file) epoch, ids, current key HMAC-SHA256(master, label) cluster keys transfer, auth, fence HMAC-SHA256 VerifierKey seals caching_sha2 data keys (id to 32 bytes) one is current; old ones stay WAL blocks one seal each MANIFEST records one seal each SEAM frames and the footer derived caches sealed whole Each seal records the id of the data key that made it, so old objects stay readable after a rotation.
Master key, keyring, data keys, cluster keys and the optional auth key.
STRATA_MASTER_KEY (64 hex = 32 bytes; env or docker secret; never on disk)
|-- seals the keyring file `keys` directly (AES-256-GCM, key = master bytes)
| `-- data keys: id u32 -> 32 random bytes; one is "current"
| `-- seal every WAL block, MANIFEST record, SEAM frame/footer, derived cache
`-- HMAC-SHA256(master, label) -> cluster keys
labels "strata-cluster-transfer-v1", "strata-cluster-auth-v1", "strata-cluster-fence-v1"
STRATA_AUTH_KEY (optional, 64 hex; must not equal the master key)
`-- VerifierKey = HMAC-SHA256(auth key bytes, "strata caching_sha2 verifier seal v2")
`-- seals persisted MySQL caching_sha2 verifiers

The master key comes from STRATA_MASTER_KEY, 64 hex characters (32 bytes), supplied by the environment or a docker secret. It is never on disk. It is zeroized on drop and is never written or logged (SPEC V30). A wrong master key fails authentication when the keyring is opened (BadMasterKey).

Data keys are per keyring, not per file. Every new seal uses the current data key and records its id in the seal trailer.

  • rotate_data_key adds a new random key and makes it current. Old keys stay in the keyring so old objects remain readable.
  • rotate_master re-seals only the keyring file.

Cluster keys are derived with HMAC-SHA256 from the master key and a label. The labels are "strata-cluster-transfer-v1", "strata-cluster-auth-v1" and "strata-cluster-fence-v1".

STRATA_AUTH_KEY is optional: 64 hex characters, and it must not equal the master key. It yields the VerifierKey, which is HMAC-SHA256 of the auth key bytes with the label "strata caching_sha2 verifier seal v2". That key seals persisted MySQL caching_sha2 verifiers, see Sealed caching_sha2 verifier.

The auth key is never stored in the data dir, config, replication stream or backup. VerifierKey::shares_material_with(master) rejects an auth key whose derived sealing key equals the one derived from the master key.