Allow for non-NamedModelViewsets to be added to the RBAC system.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Description
Currently only NamedModelViewSet (NMV) can be fully added to Pulp's RBAC system. The ability to customize the AccessPolicy, define default roles and use object creation hooks are restricted to NMVs. This is due to the post-migrate hooks at startup that only look through registered NMVs.
Also, our permission class AccessPolicyFromDB is expecting NMVs in order to work.
If we want to add RBAC to non-NMVs (like orphan cleanup #1924), we will need to redesign portions of this system to make it easier to add support without turning every view into a NMV.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the post-migrate hooks in pulpcore/app/apps.py and AccessPolicyFromDB in pulpcore/app/access_policy.py, then trace their assumptions about NamedModelViewSet. Define how non-NamedModelViewSets should support custom AccessPolicy, default roles, and object creation hooks. Done means RBAC can be added to a non-NMV such as orphan cleanup without requiring every view to become an NMV.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authorization, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100