Repository navigation
feat(forward): add webhook management and signature verification - #6
Merged
Merged
Conversation
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.
Change
Add the eight documented Forward webhook endpoint APIs with synchronous/asynchronous resource entrypoints, cursor pagination and typed create/update/list responses. Add original-body HMAC-SHA256 signature verification, multiple v1 signature support and the 300-second timestamp window. Creation returns its signing secret separately from ordinary endpoint responses.
Includes receiver examples, webhook usage documentation, Forward coverage updates and changelog entries. Behavior is aligned with the corresponding Go, Python and TypeScript additions. This is additive and does not change the package version.
Contract source: https://docs.qoder.com/zh/cloud-agents/api/webhooks/overview and https://docs.qoder.com/zh/cloud-agents/api/webhooks/receive.
The usage guide keeps the test endpoint active until the receiver confirms and verifies delivery; temporary endpoint cleanup is a separate step.
Validation
make qualitypasses on JDK 17.After rebasing onto the merged client-extension work in main, reran
clean installon Java 8 (603 SDK tests), independentexamples/pom.xml clean verify(64 tests), and the package check with an isolated Maven cache. No failures or skips. The original feature was also checked on Java 8/11/17/21/25; GitHub CI validates all five runtimes again on the updated branch.Before the rebase, live webhook management on Java 8 passed CN/Global × PAT/SA (four Java cases; 16 across the four SDKs). Actual synthetic requests reached Request Catcher; disabled tests queued zero deliveries, active tests queued one, metadata null removed keys, and deletion was verified by a subsequent 404. All temporary endpoints were cleaned up.
A real Global delivery passed all four SDK signature verifiers within the normal timestamp window; tampering was rejected. Live management used the synchronous Java client, while synchronous/asynchronous contracts were both exercised offline. Real business-event subscriptions, receiver persistence/deduplication and server-side failure/retry delivery were not exercised. No credentials, callback URLs, live logs or generated artifacts are committed.