Skip to content

Secure token storage #715

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

Closed
jaraco opened this issue Feb 26, 2019 · 3 comments
Closed

Secure token storage #715

jaraco opened this issue Feb 26, 2019 · 3 comments
Labels

Comments

@jaraco
Copy link
Contributor

jaraco commented Feb 26, 2019

Description of the problem, including code/CLI snippet

I haven't read the code, but from reading the documentation, it sounds like python-gitlab only has support for soliciting a private-token from a plain-text config file in the user's home directory. Better techniques exist for storing secrets more securely, including the keyring library, which stores passwords in system-managed secure stores. It would be nice if the library would allow and even recommend that tokens be stored/queried there.

Expected Behavior

Users would be incentivized not to store any secrets on the file system in plain text.

Actual Behavior

Users are required to store secrets in the file system in plain text.

Specifications

  • python-gitlab version: 1.8.0
  • API version you are using (v3/v4): n/a
  • Gitlab server version (or gitlab.com): n/a
@max-wittig max-wittig added the cli label Feb 27, 2019
@jamesquilty
Copy link

It's a reasonable point, but I would note that passwordless SSH private keys, required for non-interactive scripted access to remote git repositories, are effectively the same as a token and are stored in the file system in plain text format. The important thing is that these files are readable only by the owner and not anyone else. That would mean that, for example, on macOS and Linux systems the ~/.python-gitlab.cfg file should have -rw------- permissions.

I'd suggest that this issue requesting "Secure token storage" should perhaps be for python-gitlab to raise a warning and/or enforce appropriate config file permissions.

@devpie
Copy link

devpie commented Aug 19, 2019

It just installed python-gitlab and wondered, why there is no keyring integration ;-)

@jamesquilty while you are probably right, i always choose a more secure way of storing secrets than simply not allowing others to read them.

For me this is a +1

@nejch
Copy link
Member

nejch commented Apr 18, 2021

This is an old one, but closed now with #1359 thanks to @klorenz!

@nejch nejch closed this as completed Apr 18, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants