Key hierarchy
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 (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 verifiersMaster key
Section titled “Master key”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
Section titled “Data keys”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_keyadds a new random key and makes it current. Old keys stay in the keyring so old objects remain readable.rotate_masterre-seals only the keyring file.
Cluster keys
Section titled “Cluster keys”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".
Auth key
Section titled “Auth key”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.