Repository navigation
vault: reject gateway params the Vault nodes cannot re-derive - #24268
Open
prashantkumar1982 wants to merge 1 commit into
Open
prashantkumar1982 wants to merge 1 commit into
prashantkumar1982 wants to merge 1 commit into
Conversation
Each Vault node re-authorizes a gateway-forwarded secrets request by re-deriving the caller's params from their typed struct (request_id set to the request ID, namespaces as the gateway stamped them) and checking the digest of that. The gateway authorized the raw bytes, so params with fields the type does not define, a missing namespace, or a different request_id passed at the gateway but could never pass on any node. The gateway now builds the same re-derived params before authorizing and rejects the request with an invalid-params error unless their digest matches the raw request's. Structural validation still runs first, so its more specific errors are unchanged. Test fixtures that sent such params are updated to the canonical form the CLI already sends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
👋 prashantkumar1982, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
Contributor
|
✅ No conflicts with other open PRs targeting |
Contributor
Author
|
/vault-audit |
|
✅ Vault audit complete for 📋 View the full report and findings — private tracking issue, visible to chainlink team members only. Resolve blocking findings there with |
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.
Each Vault node re-authorizes the secrets requests it receives from the gateway. By then the gateway has stamped the params, so the node re-derives the caller's params from the typed struct (with
request_idset to the request ID and the namespaces the gateway filled in) and authorizes the digest of that. The gateway authorized the raw bytes instead. Params with a field the request type doesn't define, a missing namespace, or arequest_idother than the request ID therefore passed at the gateway, but no node could ever authorize them.Changes
GatewayVaultRequestProcessor, gateway mode: after structural validation and before authorization, build the params the nodes will re-derive. Reject the request with an invalid-params error unless their digest matches the raw request's. Node mode is unchanged.coalesceRequestID. Every accepted request now hasrequest_idequal to the request ID.cre-cliand the system-test clients already send the canonical form.GatewayAndNodesAuthorizeSameDigest: for all four methods, the gateway either rejects the params or authorizes the same digest the nodes do (28 cases). With the check disabled, 20 of the cases fail.Requires
None.
Supports
Deployment Validation Steps
cre secrets create,update,deleteandlistkeep working through the gateway.🤖 Generated with Claude Code