docker pull unauthenticated
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 31
- Forks
- 56
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 22
Description
Version
docker image: 2.24.1
Describe the bug
I have setup pulp in order to use it as Pull-Through Caching server for containers.
If u authenticate as admin by putting the base64 username:password in the docker config it works.
If i try to pull a already pulled image without authentication it does not work.
To Reproduce
I can pull docker image using docker when i put the base64 authentication in the config. But without authentication it does not work (token disabled)
Without credentials i get "Error response from daemon: Head https://<server>/v2/docker-cache/gitlab/gitlab-ce/manifests/17.9.3-ce.0 no basic auth credentials"
Expected behavior
Ability to pull unauthenticated the container using docker.
Additional context
pulp-dev: gerrod:
Right now our non-token auth code is setup based on how podman works. A logout podman will send the auth header Basic Og== which we use to specify an anonymous user. Docker on the other hand will send no auth header and when it requests the /v2/ endpoint it hits the 401 error because that endpoint expects atleast an anon user.
We should probably just change this hardcoded line: https://github.com/pulp/pulp_container/blob/main/pulp_container/app/registry_api.py#L474
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 in pulp_container/app/registry_api.py at the hardcoded line near 474 and trace how unauthenticated requests to the /v2/ endpoint are handled. Reproduce the Docker pull without credentials, then verify that an already cached image can be pulled successfully without authentication.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100