Repository navigation
fix(remote): end the pairing on the other machine when it is removed - #4419
Merged
Merged
Conversation
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.
What
Removing a machine used to forget it only on this computer: the other machine kept this computer's device record, usually with full ACP access. Now Remove asks the machine to end the pairing first.
{"type":"unpair"}. The gateway revokes the record the socket signed in as (the frame names no device), closes every connection of it withrevoked, and refuses its tokens and key from then on. As a first frame it isinvalid_frame. Schema, golden file and README updated; additive, protocol v1 unchanged.rustcode-client:Session::unpair, plusunpair_machine(bounded to 10 s overall) andremoval_messagein a newunpairmodule.rc machines removeasks the machine before forgetting it;--localskips that. The message says whether the machine still lists this computer (unreachable, or an older RustCode withoutunpair).machines_removedoes the same and returns the message, which the Remove toast shows. The confirmation text says so.Changelog
Removing a machine now also ends this computer's access on that machine when it can be reached, and says so when it cannot.
Testing
a_device_ends_its_own_pairing_with_unpair(revoked answer, other connections of the record closed, tokens refused). Unit test forsession_control(a prompt containing "unpair" is not a control frame).removing_a_machine_ends_this_computers_pairing_there(Ended, then needs pairing, then AlreadyEnded).--local; message test.cargo fmt --check,check-comments.py,check-rust-size.py,bun run check. Rust tests run in CI.Closes #4391