Skip to content

Pass key-bound trust checks through to the handshake service - #55

Merged
TeoSlayer merged 1 commit into
mainfrom
fix/keyed-trust
Nov 9, 2026
Merged

TeoSlayer merged 1 commit into
mainfrom
fix/keyed-trust

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

Key-bound trust checks reach the handshake service.

  • handshakeServiceAdapter.IsTrustedWithKey forwards to the handshake manager, so the daemon's key-bound check no longer falls back to node ID.
  • HandshakeRuntime.IsTrustedWithKey asks the trusted-agents checker with the decoded key when it supports pins, by node ID otherwise, and refuses a key that is not valid base64.
  • Compile-time guards for both optional interfaces.

handshakeServiceAdapter had no IsTrustedWithKey, so the daemon's
type-assertion for a key-bound handshake service failed and every key
check fell back to node id alone. HandshakeRuntime had no
IsTrustedWithKey (handshake.KeyedTrustChecker), so trusted-agents key pins
were never checked either.

- handshakeServiceAdapter.IsTrustedWithKey forwards to the manager.
- HandshakeRuntime.IsTrustedWithKey asks the trust checker with the
  decoded key when it supports pins, by node id when it doesn't, and
  refuses a key that isn't valid base64.
- Compile-time guards for both optional interfaces, so a missing method
  can't silently weaken a check again.

Test: a pinned trusted agent passes only with its key; a pinless checker
still answers by node id.
@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@TeoSlayer
TeoSlayer merged commit 4fdf0d4 into main Nov 9, 2026
4 checks passed
@TeoSlayer
TeoSlayer deleted the fix/keyed-trust branch November 9, 2026 00:53
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