jaraco / jaraco/keyring

New backend for getting credentials from environment variables

Open
#539 11 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
1.5k
Forks
196
PR merge metrics
No merged PRs in 30d

Description

I'm planning to implement a keyring backend for getting credentials from environment variables. This will be useful in CI environments (eg. Jenkins) for easily passing credentials from the CI credential store to pip and other tools that support `keyring`.

The current plan is to use environment variable format like this:
```bash
KEYRING_SERVICE_NAME_0=https://index0.example.com
KEYRING_SERVICE_USERNAME_0=myusername
KEYRING_SERVICE_PASSWORD_0=mypassword
KEYRING_SERVICE_NAME_1=https://index1.example.com
KEYRING_SERVICE_USERNAME_1=myusername1
KEYRING_SERVICE_PASSWORD_1=mypassword1
```
Is this format acceptable, or should I avoid using the `KEYRING_` prefix?

I don't think there is any need to allow keyring to set any username or password environment variables through this backend, so it would end up being a read-only backend supporting the `get` operation but not `set` or `del`.

Are there any potential issues I've missed with an implementation like this?

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are identified in the issue. Resolve whether the proposed environment-variable format and read-only get operation are acceptable, then define the implementation scope and tests needed to verify credential lookup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.