-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check a list of scopes when verifying tokens #1340
Conversation
2a803c0
to
c9fa709
Compare
Before this commit, the registry checked one scope, ignoring other scopes that could relate to blob mounting operations. Due to that, users without sufficient permissions could mount blobs from other users unauthorized. closes pulp#1286
c9fa709
to
d23b907
Compare
for access in decoded_token["access"]: | ||
if scope.resource_type == access["type"] and scope.name == access["name"]: | ||
if scope.action in access["actions"]: | ||
accessible_actions.append(True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i might have used here a boolean instead, but list will work ok too.
Backport to 2.14: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 6658b7e on top of patchback/backports/2.14/6658b7e3d432cc426edf08892d38ed0d27b06692/pr-1340 Backporting merged PR #1340 into main
🤖 @patchback |
Backport to 2.15: 💚 backport PR created✅ Backport PR branch: Backported as #1344 🤖 @patchback |
Before this commit, the registry checked one scope, ignoring other scopes that could relate to blob mounting operations. Due to that, users without sufficient permissions could mount blobs from other users unauthorized.
closes #1286