8 Commits

Author SHA1 Message Date
Cole Robinson
79da19ad07 Fix some pylint, exclude some new warnings
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-10-04 16:04:33 -04:00
Cole Robinson
ff0c8458e2 keyring: Coverage and style fixes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-04-06 19:20:16 -04:00
WGH
9b00bf3e1c Support prompt in keyring CreateItem as well
I haven't seen the implementation that needs prompt confirmation here,
though, so I haven't really tested it. The code path is pretty much the
same as in Delete, though, which I did test.
2021-04-06 18:30:08 -04:00
WGH
fae3fecc1e Improve Secret Service interoperability
The current implementation of Secret Service keyring client assumes that
the last component of an item path is integer, which is not true for some
Secret Service server implementations (e.g. KeePassXC). Besides,
the Secret Service API documents advises against recording object path
(not to mentioning parsing it in any way), recommending using lookup attributes
instead[1].

This commit fixes the code to behave in more interoperable way.

- The item path (called "keyid" in code) is no longer parsed and stored anywhere.
- The secret item is looked up in the Secret Service using hvuri and machine
  uuid attributes.
- /console-password with (username, keyid) is removed from GSettings
  storage. Instead, only username is stored in /console-username.

[1] https://specifications.freedesktop.org/secret-service/latest/ch03.html

Resolves: #237
2021-04-06 18:30:08 -04:00
WGH
d9b5090e06 Fix forgetting password from keyring
First, Item.Delete never accepted any arguments, so this code likely
never worked.

Second, Item.Delete might return a Prompt object, which client
is supposed to call if keyring wants to confirm deletion.
2021-04-06 18:30:08 -04:00
Cole Robinson
64e3ff1d08 uitests: console/keyring/viewer coverage work
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 13:23:34 -04:00
Cole Robinson
f06cc11546 config: Move more password handling to keyring.py
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-28 08:47:20 -04:00
Cole Robinson
3062b5ce08 virtManager: Move a lot of misc files to lib/ 2019-06-17 00:12:32 -04:00