Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secret schema on Linux is inconsistent with keytar #402

Open
ccope opened this issue Sep 20, 2019 · 2 comments
Open

Secret schema on Linux is inconsistent with keytar #402

ccope opened this issue Sep 20, 2019 · 2 comments

Comments

@ccope
Copy link

ccope commented Sep 20, 2019

Describe the bug
Unfortunately it doesn't seem like there are predefined schemas for secrets in the freedesktop secretservice backend, other than for network servers. Keytar chose to use account and keyring chose username. Setting both fields would allow the libraries to interoperate. Alternatively, giving the user the ability to override the schema would allow them to fix this themselves, but then it's still likely that different library developers would choose incompatible schemas.

keytar is the most popular keychain library on NPM, so sharing a common schema would be likely to increase compatibility with Node applications that interface with common services.

https://github.com/atom/node-keytar/blob/master/src/keytar_posix.cc#L14-L17
https://github.com/jaraco/keyring/blob/master/keyring/backends/SecretService.py#L84-L87

To Reproduce
Steps to reproduce the behavior:

  1. Add a secret with either library.
  2. Try to retrieve the secret with the other library.
    [it fails]

Expected behavior
The secret should be returned

Environment

  • Ubuntu 18.04
$ pip list | grep keyring
10.6.0
...
$ keyring --list-backends
<keyring.backends.SecretService.Keyring object at 0x7f3a3a747550>
<keyring.backends.fail.Keyring object at 0x7f3a3696e898>
@ccope
Copy link
Author

ccope commented Sep 21, 2019

Also filed ticket on keytar: atom/node-keytar#223

@jaraco
Copy link
Owner

jaraco commented Apr 30, 2020

Happy to align with established patterns. I'd recommend the pattern that is dominant (>70% users) or established first should take precedence. Under that recommendation, which system should change?

If keyring were to change, there would need to be a transition and probably a migration process. It'll be an involved transition. Is that something you'd be willing to own (or sponsor)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants