cmd/rekor_watch/notifications: add webhook secret deriver - #5
Merged
Merged
Conversation
This was referenced Jun 23, 2026
Add the HKDF-based per-subscription webhook signing-secret deriver, plus the Standard Webhooks library we sign with (no dispatch wiring yet): - WebhookSecretDeriver derives a secret on demand from a master key via HKDF-SHA256 over (subID, version). Nothing is stored; a regenerate is just a version bump. The master key loads from a 0600 file (>= 32 bytes, base64) and fails closed. - Secrets use the Standard Webhooks whsec_<base64(24B)> format. Signing is done by the official standard-webhooks Go library (pure stdlib); an interop test pins our usage against the spec's canonical v1 test vector so reference verifiers stay compatible. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ret2libc
force-pushed
the
signed-webhooks-1-crypto
branch
from
June 23, 2026 15:10
b3123a5 to
d6b936a
Compare
ret2libc
marked this pull request as ready for review
June 29, 2026 12:01
ret2libc
added a commit
that referenced
this pull request
Sep 16, 2026
Add the HKDF-based per-subscription webhook signing-secret deriver, plus the Standard Webhooks library we sign with (no dispatch wiring yet): - WebhookSecretDeriver derives a secret on demand from a master key via HKDF-SHA256 over (subID, version). Nothing is stored; a regenerate is just a version bump. The master key loads from a 0600 file (>= 32 bytes, base64) and fails closed. - Secrets use the Standard Webhooks whsec_<base64(24B)> format. Signing is done by the official standard-webhooks Go library (pure stdlib); an interop test pins our usage against the spec's canonical v1 test vector so reference verifiers stay compatible. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice 1 of 4 — secret derivation crypto
Adds the per-subscription webhook signing-secret deriver, plus the Standard Webhooks library we sign with. No dispatch wiring yet.
WebhookSecretDeriverderives a secret on demand from a master key via HKDF-SHA256 over(subID, version)—whsec_<base64(24B)>, the Standard Webhooks format. Nothing is stored; a regenerate is just a version bump. The master key loads from a0600file (≥32 bytes, base64; path via env/flag, never the key itself) and fails closed.standard-webhooksGo library (…/libraries/go@v0.0.1, pure stdlib, no transitive deps) rather than a hand-rolled HMAC. An interop test pins our usage against the spec's canonicalv1vector so reference verifiers stay compatible. The library is depended on here (all crypto in one PR) and first called in slice 4.Design notes (from review)
nil: the master key is required high-entropy, so Extract-with-salt adds nothing;info(rekor-watch/webhook-secret/v1|sub=N|ver=M) does the per-subscription separation.whsec_<32-char>format; ample for HMAC.Tests
go test ./cmd/rekor_watch/notifications/— deriver determinism/uniqueness/fail-closed loading + the SW canonical-vector interop test.Stack
Base of a 4-PR stack: 1) crypto ← here · 2) store (#6) · 3) server reveal/regenerate/UI (#7) · 4) dispatch signing + docs (#8).
🤖 Generated with Claude Code