Skip to content

signer: Bind request-context signatures to RPC methods - #761

Open
ihordiachenko wants to merge 1 commit into
mainfrom
fix/927-bind-request-context-uri
Open

ihordiachenko wants to merge 1 commit into
mainfrom
fix/927-bind-request-context-uri

Conversation

@ihordiachenko

Copy link
Copy Markdown
Collaborator

Addresses #927.

Request-context signatures previously covered the gRPC frame and timestamp, leaving the RPC URI unsigned. A malicious backend could relabel a signed request as another method whose protobuf encoding is compatible, turning it into unintended payment or configuration authorization.

The fix uses a shared, versioned payload covering the full URI, frame, and timestamp. A domain tag and explicit lengths make the encoding unambiguous. The signer also validates Configure close addresses against its network before updating the allowlist.

Design decisions and tradeoffs:

  • Invalid contexts remain ignored. They authorize nothing, while unrelated signing and valid sibling contexts can proceed. Rejecting the entire HSM request would introduce a denial-of-service path.
  • Legacy signatures receive no authorization fallback. This breaks signature compatibility and requires coordinated client/signer upgrades.
  • Previously applied allowlists survive in signer state. Legacy cached Configure requests become inert; the create-only cache also introduces a first-Configure upgrade caveat, documented in the security reference.
  • Existing permissive behavior and allowlist replacement semantics remain unchanged. Replay protection and stricter resolver-content matching are outside this change.

@ihordiachenko
ihordiachenko requested a review from cdecker November 3, 2026 18:45
Sign the URI together with the gRPC frame and timestamp in a shared,
versioned payload. This prevents a backend from relabeling authentic
commands as different RPCs with compatible protobuf encodings.

Validate Configure close addresses against the signer network before
updating the allowlist. Invalid and legacy contexts remain ignored so
they cannot authorize operations or block unrelated signing.

The signature format is incompatible with older clients and signers;
document the coordinated upgrade and cached Configure limitations.
@ihordiachenko
ihordiachenko force-pushed the fix/927-bind-request-context-uri branch from a2b4f8c to cd9977d Compare November 3, 2026 18:50

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