Repository navigation
fix(core-sync): a profile deleted on another device reaches the connections that used it where the Core keeps profile secrets - #4777
Merged
Conversation
…s and secrets to the connections still linked to it where the Core keeps profile secrets
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.
Summary
ConnectionStorage.handOverPulledProfileDeletionsdoes (core ADR 0107 left those secrets for the app).tablepro-storage: once a host asks (keep_pulled_profile_deletions), the store keeps each profile a synced write deletes, at its value at that write; the person's own writes, a rebuild and a reset keep none.plan_profile_handover_blockingandfinish_profile_handover_blockingplan the handover under the store's lock and write it only if the file is unchanged since the plan.tablepro-ffi: the sync service starts the handover when the app passes noHostSyncedSecretsand the Core has its own. Under the library's lock it copies the profile's secrets to each linked connection, writes the connections, then deletes the profile's items; a refused write or a failed copy puts back what the copy replaced and waits for the next store write.SyncService::openmoves the CloudKit policy wrap intoOpenParts::fence_cloudkit, keeping it under the 100-line lint.Test plan
a_pulled_ssh_profile_deletion_hands_its_tunnel_and_secrets_to_a_linked_connection_where_the_core_keeps_themanda_pulled_credential_profile_deletion_hands_its_user_and_password_to_a_linked_connection_where_the_core_keeps_them(both time out with the handover off).tablepro-storageconnections::handovertests: last value kept, nothing kept before a host asks or for a rebuild, a profile brought back, a failed copy, a file changed since the plan, unreadable connections, a connection both deleted profiles linked.tablepro-storageconnections tests 240/240,tablepro-ffisync tests 88/88 (the secrets tests repeated), clippy clean ontablepro-ffi,tablepro-storageandtablepro-sync(all targets),verify.sh --platform windows buildPASS, Windows model tests 1499/1499.credential_manager,profile_secretsand handover tests, 25/25.