Repository navigation
sdkharness: conformance check refuses a missing webhook signature header when a secret is given - #226
Draft
sophiecarreras wants to merge 1 commit into
Draft
sophiecarreras wants to merge 1 commit into
sophiecarreras wants to merge 1 commit into
Conversation
… a secret is given B2EventNotification.parse(...) skips verification when the X-Bz-Event-Notification-Signature header is null even though a signing secret was passed. The check already refuses an empty header; add the null-header case for both overloads, so the harness reports it (known issue tracking in backblaze-labs/demand-side-ai). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Draft. Extends the repository-owned harness check
.sdkharness/tests/conformance/BucketInboundWebhook.java(the one added in #222) with one more case: a missing signature header must be refused when a signing secret is given, for bothB2EventNotification.parseoverloads (byte[]andString).Why
The check already refuses an empty signature header. A
nullheader with a secret is not covered:parse(...)only verifies the signature when both the header and the secret are non-null, so on currentmasterthis new case reports a failure (a missing signature header with a secret was accepted). The unit tests inB2EventNotificationTestcurrently pin that behavior on purpose (testParseSuccessWithNoSignature,testParseBytesSuccessWithNoSignature), so whether it is intended is a team decision; this PR only records the question as a check and does not change production code or unit tests.What it changes
.sdkharness/tests/conformance/BucketInboundWebhook.javaonly: one new step with tworefused(...)cases and the Javadoc line. It keeps the check independent of the SDK's code (its own HMACsign).core/changes.Verification
Run against
masterin the harness it reports:bucket.inbound_webhook @simulator: FAIL (… a missing signature header with a secret was accepted). With a fail-closed implementation the same case passes. The 17 otherB2EventNotificationTestcases are unchanged and pass.If the team decides the behavior is intended, this case can be dropped or inverted; if it decides to fail closed, the fix also needs the two
WithNoSignatureunit tests updated.🤖 Generated with Claude Code