Repository navigation
Pass key-bound trust checks through to the handshake service - #55
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Key-bound trust checks reach the handshake service.
handshakeServiceAdapter.IsTrustedWithKeyforwards to the handshake manager, so the daemon's key-bound check no longer falls back to node ID.HandshakeRuntime.IsTrustedWithKeyasks 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.