Enforce registry RBAC on publish and registry access paths - #463
Enforce registry RBAC on publish and registry access paths#463MUFFANUJ wants to merge 11 commits into
Conversation
✅ Deploy Preview for nebi-docs canceled.
|
|
Currently, I kept "read" / "write" as string literals because that is the existing pattern used across the repo’s RBAC code. I think that constants would be cleaner and safer long-term. We can add shared constants for these actions and replace usages repo-wide, but I avoided doing that in this fix to keep the change minimal and focused on registry RBAC enforcement. If needed i can include that as well here. |
|
Looks like there are some conflicts. |
|
Resolved the conflicts in 91e5e72. Please take a look now! |
|
Looks like the CI is failing after the latest merge. |
There was a problem hiding this comment.
@MUFFANUJ Taking a closer look, this breaks registry access for everyone in team mode. Previously any logged-in user could pull and push from the registries configured by admins. With this PR, nobody (including admins) has access after upgrade until grants are created, and the only way to create them is the admin grant API by hand: there's no UI for it.
Fine-grained access control was parked for later mainly because the management side/UI wasn't there yet. How are you envisioning people will grant permissions? We probably need either a backwards-compatible default (e.g. registries stay open to logged-in users unless marked restricted) or the grant UI as part of this change.
I would suggest we go with ability keeping registries open to logged in users unless marked restricted to unblock this PR and a follow up PR for the management UI, for which we need to coordinate with Smera and Nat.
Maybe something like:
That makes sense, will address the UI part on a follw up; this is ready for another look! |
Reference Issues or PRs
Closes #444
What does this implement/fix?
Put a
xin the boxes that applyTesting
Documentation
API documentation was regenerated to include the new
registry_idquery parameter and the documented400/403responses for publish defaultsAccess-centered content checklist
Text styling
H1or#in markdown).Non-text content
Any other comments?
This fixes missing registry RBAC enforcement across registry browse, tag lookup, import, publish, publication visibility updates, and publish defaults. Registry read/write checks are now performed in the service layer, denied access is audited, registry listings/publications are filtered by readable registries, and publish defaults can be computed for an explicitly selected registry. The frontend publish dialog now refreshes defaults when the user selects a different registry, and the API docs were regenerated for the new publish-defaults behavior.