Skip to content

Allow anonymous pull-through for public distributions - #2536

Merged
gerrod3 merged 1 commit into
pulp:mainfrom
am9zZWY:fix/anonymous-pull-through-public
Oct 21, 2026
Merged

gerrod3 merged 1 commit into
pulp:mainfrom
am9zZWY:fix/anonymous-pull-through-public

Conversation

@am9zZWY

@am9zZWY am9zZWY commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Assisted By: Claude Opus 4.8 and Codex Sol 6.1

Closes #1976

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

@am9zZWY
am9zZWY force-pushed the fix/anonymous-pull-through-public branch 3 times, most recently from cba1472 to 5eb186f Compare October 9, 2026 17:15
with anonymous_user:
local_registry.pull(local_image_path1)

local_registry.pull(local_image_path1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 169, 173, and 176 aren't really testing anything anymore. Change the second distro to be private and have the created user be granted the correct permission so we can see the difference between anon and user with perms.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the distribution2 private and tested pulling using anon and unprivileged user

Comment on lines +70 to +71
# 0. an anonymous user can pull new content through a public pull-through cache
with anonymous_user:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably isn't needed anymore, at least we could still check for an error if the PT distro is private.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested pulling from a private distribution which should raise an error

Comment thread pulp_container/tests/unit/test_pull_through_permissions.py Outdated
Assisted By: Claude Opus 4.8 and Codex Sol 6.1
@am9zZWY
am9zZWY force-pushed the fix/anonymous-pull-through-public branch from 5eb186f to bb3b282 Compare October 21, 2026 09:04

@gerrod3 gerrod3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@gerrod3
gerrod3 merged commit 88e1cc1 into pulp:main Oct 21, 2026
14 checks passed
@patchback

patchback Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Backport to 2.29: 💚 backport PR created

✅ Backport PR branch: patchback/backports/2.29/88e1cc1e5ed3648ca90d41c50fe98d5ece6c352c/pr-2536

Backported as #2593

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Backport to 2.30: 💚 backport PR created

✅ Backport PR branch: patchback/backports/2.30/88e1cc1e5ed3648ca90d41c50fe98d5ece6c352c/pr-2536

Backported as #2594

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker pull unauthenticated

2 participants