feat(gateway): rate-limit confidential relay ingress [CL112-03]#23185
Open
nadahalli wants to merge 1 commit into
Open
feat(gateway): rate-limit confidential relay ingress [CL112-03]#23185nadahalli wants to merge 1 commit into
nadahalli wants to merge 1 commit into
Conversation
HandleJSONRPCUserMessage forwarded every inbound request to all DON nodes with no request-side rate limiting, so one unauthenticated caller could amplify a single request into per-node attestation verification and a capabilities-registry lookup. Only node responses were rate limited. Add a global ingress limiter (cresettings.GatewayConfidentialRelayUserRate, default 100rps/burst 10) checked before fan-out, plus a test asserting a throttled request never reaches the DON. Deliberately out of scope: gateway-side owner/attestation validation. Relay requests carry no JWT (unlike vault); owner binding comes from F+1 signature verification at the relay DON nodes (PRIV-433), not the gateway, so duplicating that crypto at ingress would not reduce the amplification. PRIV-436.
nadahalli
marked this pull request as ready for review
July 21, 2026 10:15
Contributor
|
✅ No conflicts with other open PRs targeting |
Contributor
|
I see you updated files related to
|
|
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.




Closes the ingress half of the confidential relay gateway DoS finding (Sigma Prime
CL112-03 / PRIV-436).
HandleJSONRPCUserMessageforwarded every inbound JSON-RPCrequest to all DON nodes with no request-side rate limiting; only node responses
were limited. A single unauthenticated caller could amplify one request into
per-node attestation verification and a capabilities-registry lookup.
Adds a global ingress limiter (
GatewayConfidentialRelayUserRate, default100rps/burst 10) checked at the top of
HandleJSONRPCUserMessagebefore fan-out,closed in
Close(), plus a test asserting a throttled request never reaches the DON.It mirrors the two existing relay limiters (read via
MakeRateLimiter, so operatoroverrides flow through the limits framework).
Deliberately out of scope
Gateway-side owner/attestation validation. Relay requests carry no JWT (unlike the
vault handler); owner binding comes from F+1 signature verification at the relay DON
nodes (PRIV-433), not the gateway. Duplicating that crypto at ingress would not
reduce the amplification and would need the gateway to hold the DON signer set.
Depends on
smartcontractkit/chainlink-common#2268 (adds the setting). CI here will fail to
compile until #2268 merges and this branch bumps chainlink-common. Keeping this
draft until then.