Skip to content

vault: reject gateway params the Vault nodes cannot re-derive - #24268

Open
prashantkumar1982 wants to merge 1 commit into
developfrom
cre/vault-gateway-canonical-params
Open

prashantkumar1982 wants to merge 1 commit into
developfrom
cre/vault-gateway-canonical-params

Conversation

@prashantkumar1982

@prashantkumar1982 prashantkumar1982 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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_id set 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 a request_id other 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.
  • Remove coalesceRequestID. Every accepted request now has request_id equal to the request ID.
  • Update test fixtures that sent params no node could authorize. cre-cli and the system-test clients already send the canonical form.
  • New test 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

  • Gateway-only change. In staging, cre secrets create, update, delete and list keep working through the gateway.
  • A request with an extra params field now gets an immediate invalid-params response instead of a gateway timeout.

🤖 Generated with Claude Code

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>
@github-actions

Copy link
Copy Markdown
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!

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@prashantkumar1982

Copy link
Copy Markdown
Contributor Author

/vault-audit

@gati-app

gati-app Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

✅ Vault audit complete for b38d3b33 — no blocking findings.

📋 View the full report and findings — private tracking issue, visible to chainlink team members only. Resolve blocking findings there with /resolved <FINDING-ID> <reason>.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant