fix: add --webhook-secret flag to enable HMAC payload signing (PILOT-90) - #434
Closed
matthew-pilot wants to merge 1 commit into
Closed
fix: add --webhook-secret flag to enable HMAC payload signing (PILOT-90)#434matthew-pilot wants to merge 1 commit into
matthew-pilot wants to merge 1 commit into
Conversation
… (PILOT-90) The webhook.Client already supports HMAC-SHA256 payload signing via WithSecret() and sends X-Pilot-Signature-256 headers — but the daemon never wired the configuration flag. This meant the secret infrastructure was dead code from the operator's perspective. Add --webhook-secret (env: PILOT_WEBHOOK_SECRET) and thread it through webhook.NewService. When set, every outbound webhook POST will carry a verifiable HMAC-SHA256 signature. Unset = backward-compatible behavior (no signature header). Closes PILOT-90
Collaborator
Author
|
Superseded by #437 |
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.
What
The webhook plugin already supports HMAC-SHA256 payload signing via
WithSecret()andX-Pilot-Signature-256headers — but the daemon never wired the configuration flag. The signing infrastructure was dead code from the operator's perspective.Fix
Add
--webhook-secret(env:PILOT_WEBHOOK_SECRET) and thread it throughwebhook.NewServiceviawebhook.WithSecret().Verification
go build ./cmd/daemon/— passesgo vet ./cmd/daemon/— cleango test -count=1 ./...in thewebhookpackage — all tests passgo test -run 'Webhook|SetWebhook' ./pkg/daemon/— passesCloses PILOT-90