Not a Contribution: Username shouldn't be required for login when using dockercfg_path for docker client login.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
Not a Contribution!
The auth included in the docker config includes both the username and password for the registry. As a result the username should not be required.
Additionally, these should not work:
docker_client.login(username="my-fake-username-does-not-exist", dockercfg_path="/Users/myusername/.docker/config.json")
docker_client.login(username="", dockercfg_path="/Users/myusername/.docker/config.json")
yet they do:
{'IdentityToken': '', 'Status': 'Login Succeeded'}
If username is required then it should actually be required
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the docker_client.login entry point named in the issue and inspect how username and dockercfg_path credentials are handled. Reproduce the two supplied calls, then add coverage for the expected username behavior and verify that invalid or empty usernames do not report successful login when the config supplies credentials.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100