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

Fix keyring issue on linux #721

Closed
wants to merge 1 commit into from

Conversation

maebert
Copy link
Contributor

@maebert maebert commented Nov 8, 2019

This fixues issues with Keyring on Ubuntu and other Linux distros (fixes #654 #718 #558 #496 #478 #410 #407):

RuntimeError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.

This PR adds keyrings.alt as a requirement on linux. secretstorage might have the better and more complete interface to Gnome's keyring, but depends on libdbus to be installed, which we don't have control over.

Also see #699.

I tested this on Ubuntu 18.04 LTS, but can't more testing on different platforms would be nice.

Checklist

  • The code change is tested and works locally.
  • Tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?

@maebert maebert requested a review from wren November 8, 2019 18:37
@wren wren added this to the v2.1.1 - Doctor's Orders milestone Nov 9, 2019
@wren wren added the bug Something isn't working label Nov 9, 2019
@wren
Copy link
Member

wren commented Nov 12, 2019

Keyrings in this package may have security risks or other implications. These backends were extracted from the main keyring project to make them available for those who wish to employ them, but are discouraged for general production use. Include this module and use its backends at your own risk.

😬

Is this really the best option we have to solve this?

@maebert
Copy link
Contributor Author

maebert commented Nov 15, 2019

Is this really the best option we have to solve this?

Alternatively, we could use Jeepney on Linux, which uses a pure-python DBus implementation to talk to SecretService. However, there's no promise that it's any more or less secure than the implementation in keyrings.alt...

@pspeter
Copy link
Contributor

pspeter commented Nov 15, 2019

Alternatively, we could tell people in the documentation how to fix it themselves (install libdbus and secretstorage). It's probably better than people relying on insecure storage without even realizing that it's insecure.

Also, my PR #699 fixes some of the keyring issues you linked already (it shouldn't crash anymore when people select "no" to the keyring storage).

@wren
Copy link
Member

wren commented Nov 30, 2019

I think we should avoid using anything that says we shouldn't use it in a production setting. Let's leave this out for now and update the docs to show how to fix manually.

We can also put in a link to the docs page when someone runs into the error, in order to be more helpful.

@wren wren closed this Nov 30, 2019
@lock
Copy link

lock bot commented May 21, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the 🔒 Outdated label May 21, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working 🔒 Outdated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Random RuntimeError without keyring
4 participants