Conversation
This was referenced Jun 23, 2026
ret2libc
force-pushed
the
signed-webhooks-1-crypto
branch
from
June 23, 2026 15:10
b3123a5 to
d6b936a
Compare
ret2libc
force-pushed
the
signed-webhooks-2-store
branch
from
June 23, 2026 15:10
ca2370e to
604aad8
Compare
ret2libc
force-pushed
the
signed-webhooks-2-store
branch
from
June 24, 2026 09:45
99c1db5 to
604aad8
Compare
Persist a per-subscription signing-secret version counter (migration 000009, default 1, no backfill) that on-demand secret derivation keys on. The secret itself is never stored. - Subscription gains WebhookSecretVersion (json:"-", internal bookkeeping). SaveSubscription reflects the persisted version back onto the struct via INSERT ... RETURNING, so a caller deriving the reveal-once secret right after create uses the same version dispatch signs with. - RegenerateWebhookSecret bumps the counter scoped to the owning user and returns the new version (ErrNotFound for missing/not-owner). - All subscription SELECTs, scanSubscriptionRows, and the ListPendingMatches join carry the new column so dispatch can derive the current secret. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ret2libc
force-pushed
the
signed-webhooks-2-store
branch
from
June 24, 2026 09:50
604aad8 to
b5cc1ba
Compare
Collaborator
Author
|
Folded into #7. The store layer here had no consumer on its own — |
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 2 of 4 — store layer
Persists a per-subscription signing-secret version counter (migration
000009, default1, no backfill) that the on-demand secret derivation keys on. The secret itself is still never stored.SubscriptiongainsWebhookSecretVersion(json:"-", internal bookkeeping).SaveSubscriptionreflects the persisted version back onto the struct viaINSERT ... RETURNING, so a caller deriving the reveal-once secret right after create uses the same version dispatch signs with.RegenerateWebhookSecret(id, userID)bumps the counter scoped to the owner and returns the new version (ErrNotFoundfor missing/not-owner).scanSubscriptionRows, and theListPendingMatchesjoin carry the new column so dispatch can derive the current secret.Tests
go test ./pkg/store/...— migration default, version bump + persistence, owner-scoping, and the save-reflects-version contract.Stack
Part of the signed-webhooks stack — based on #5:
🤖 Generated with Claude Code