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

Improve password storage #1

Closed
geoffklee opened this issue Feb 21, 2018 · 4 comments
Closed

Improve password storage #1

geoffklee opened this issue Feb 21, 2018 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@geoffklee
Copy link
Owner

Currently, the default behaviour is to store the JSS credentials in a plain text file (the python-jss module's preferences file). It would be much better to integrate with keychain, or at least allow an option to prompt for a password every time.

@geoffklee
Copy link
Owner Author

Looks like the keyring module will handle this just fine. Running it in a virtualenv, I get the same error as here:

jaraco/keyring#219

but the suggested fix of re-signing the virtualenv's python binary seems to solve the problem.

@geoffklee
Copy link
Owner Author

geoffklee commented Feb 21, 2018

I've had a bash at implementing this in a branch: https://github.com/gkluoe/git2jss/compare/keychain

It tries to do The Right Thing and defaults to using the keychain.

If it finds a password in the plist file (left by an older version), it will offer to move it into the keychain and if the user refuses, will only operate if the '--no-keychain' option is specified.

@geoffklee
Copy link
Owner Author

I decided it's probably better to use our own plist file for git2jss, rather than using the default. This keeps things neater.

Due to what I think is a bug in python-jss, I've ended up copying almost the entire JSSPrefs class into the KJSSPrefs subclass, which doesn't seem ideal, but it works.

@geoffklee geoffklee added the bug Something isn't working label Feb 24, 2018
@geoffklee geoffklee added this to the 0.1.0 milestone Feb 24, 2018
@geoffklee geoffklee self-assigned this Feb 24, 2018
geoffklee pushed a commit that referenced this issue Feb 24, 2018
Fix issue #1 by supporting local keychain storage via the `keyring` module
@geoffklee
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant