Repository navigation
Closed
Labels
priority: highHigh prioritytype flag: breaking changeProposed change breaks current APItype: featureNew feature or requestworkload: daysLikely takes days to resolve
Milestone
Description
Problem
User roles live at /services/{serviceId}/permissions/{userId}, next to /services/{serviceId}/permissions/groups/{group}. As user identifiers may contain slashes (namespaced by issuer), the two collide, and the code has to refuse users called groups. FOCA's layout doesn't have this problem, and trs-filer follows it. rc1 exists to fix mistakes like this one.
Change
/services/{serviceId}/permissions/{userId}becomes/services/{serviceId}/permissions/users/{userId}.- Groups stay under
/services/{serviceId}/permissions/groups/{group}. - No alias for the old paths.
- Stored roles don't change, as they are granted on the service path.
To do
cloud_registry/api/additions.openapi.yaml: the paths and the descriptions that mention them.cloud_registry/config.yaml:owners-change-permissionsbecomes.../permissions/users/*.owners-change-group-permissionskeeps its path, but is now the only rule for groups, as the old wildcard no longer covers them.permissions.py:- Remove the
groupscollision check (_first_segment(...) == "groups"in the controller and in the user ID checks), and the tests andEXAMPLE_USERSlogic that exist only for it. - Update
warn_owner_rules(), which warns about the side effect that the old wildcard covers groups, and the path it builds withf"{service}/permissions/{user}".
- Remove the
invitations.py: check its docstrings, and that it builds these paths or relies onowners-change-permissionsonly as intended (_warn_invitation_rules).- Tests, and anything else that builds these paths.
- Docs:
docs/access-control.md,docs/api.md. docs/upgrading.md: deployers with config overlays must update both policies, and API clients must move to the new paths. Release notes under "Breaking changes".
Acceptance criteria
- The old paths return
404; the new paths behave as the old ones did, including a user calledgroups, and user identifiers with slashes. - Roles stored before the change keep working, without a migration.
- Tests and strict docs build pass.
The client in cloud-registry-ui moves in a separate issue and ships with this one.
Metadata
Metadata
Assignees
Labels
priority: highHigh prioritytype flag: breaking changeProposed change breaks current APItype: featureNew feature or requestworkload: daysLikely takes days to resolve
Activity