pulp / pulp/pulp_container

Introduction of an additional parameter for pull-through caching to enable an initial pull of a container image without user authentication

Open
#1,959 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
31
Forks
56
Avg merge
2d 22h
Merged PRs (30d)
22

Description

Is your feature request related to a problem? Please describe.
I've created a "Pull-Through Caching" for a remote container registry according to this HOWTO: https://pulpproject.org/pulp_container/docs/admin/guides/pull-through-caching/
Currently, the default behavior for the first pull of a certain image into the cache is that the user needs to be authenticated, see https://github.com/pulp/pulp_container/blob/main/pulp_container/app/registry_api.py#L320
If not, the user get's a message "Error response from daemon: pull access denied for ...".
The first pull implicitely creates the concerned Pulp objects of type repository and distribution (the latter with the attribute "private": false) for each remote container repository.
For the second and any further pulls, there is no need to be authenticated.

Describe the solution you'd like
It would be great, if an additional parameter/option can be introduced for creating a new "Container Pull-Through Caching Distribution" via /api/v3/distributions/container/pull-through/.
This parameter/option could e.g. be named private and the value set could be true and false.
If the value is true, which is the default, than the behaviour is like it is now (or maybe should even be changed, so that for every pull, user authentication is needed, so that it behaves comparable to a normal "Container Distribution" via /api/v3/distributions/container/container/).
If the value is false, than the behaviour is like that for every pull, no user authentication is needed.

Describe alternatives you've considered
Change the default behaviour of "Pull-Through Caching", so that a pull of a container image never needs user authentication.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pulp_container/app/registry_api.py around line 320 and inspect the pull-through distribution endpoint at /api/v3/distributions/container/pull-through/. Trace how the private attribute is set and how authentication is checked during the first and subsequent pulls. Done means the endpoint accepts the proposed option and the selected authentication behavior is applied consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.