Derive every key from the signing key in one place (closes #315) #332

Merged
clawbot merged 1 commits from issue-315-derive-keys-in-one-place into next 2026-10-26 14:10:22 +01:00
1 Commits
Author SHA1 Message Date
sneak 534b453a81 Derive every key from the signing key in one place (closes #315)
check / check (push) Waiting to run
seal.DeriveKeys derives the session hash and block keys, the encrypted URL
key and the CSRF key from the signing key, with their salts declared beside
it, and returns them as one seal.Keys. internal/providers calls it once at
startup and provides the value to the fx graph. The session manager, the
encrypted URL generator and the CSRF protection each take their own key.
session.NewManager, encurl.NewGenerator, newCSRFProtect and handlers.New
return no error, as nothing in them can fail now. Each key is derived as
before, with seal.DeriveKey and the same salt. The signing key itself stays
the HMAC key of signed URLs and the login password. README.md says under
signing_key what it protects.

Model: opus-5-5
2026-10-26 13:01:57 +00:00