Repository navigation
server: make the collection iteration determenistic - #704
Merged
Merged
Conversation
SearchItems, GetSecrets and alias resolution iterated the collections HashMap, whose order changes between daemon restarts. With items sharing attributes across collections, clients taking the first match got a different secret after every restart. Iterate the collections sorted by path, with the default collection first, where new items are stored. #703
SetAlias left the alias on the collection previously holding it, so two collections claimed the same alias and ReadAlias depended on the HashMap iteration order again. #703
Merge the items of a keyring or collection into another, resolving each side as a keyring file or a collection by alias, name or label. New items are copied over, identical ones skipped, and conflicting ones shown as a diff asking whether to override or skip, with --on-conflict for non-interactive use. The remedy for the collections left behind by the duplicate alias fixes, #703
The collection, keyring, secret and app-id options were global, showing up in the help of commands that ignore them. Move them to the commands using them; --verbose stays global. Passing them before the subcommand now errors, the after-subcommand form is unchanged.
📊 Code Coverage Report
Coverage report generated by cargo-tarpaulin |
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.
Also fixes an issue with SetAlias as well as adding a new
mergecommand to oo7-cli that works likeoo7-cli merge ~/.local/share/keyrings/v1/default2.keyring ~/.local/share/keyrings/v1/login.keyring --origin-secret <default2's password> --destination-secret <login password>