You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[AAP-48392] Models and APIs for tracking remote permissions in DAB RBAC (#749)
## Description
This modifies the RBAC app so that the models can store permissions for
remote objects - objects that don't actually exist in the local server.
To know which are which, a `service` field is added to our type-tracking
model, which is also new as of this work. Importantly, permission
_evaluations_ can be done for both local items and remote items.
Why? Just as we have synchronization to a "resource server" via the
resource registry app, this allows you to appoint a single service to be
the gatekeeper for RBAC. This still requires synchronization, making it
different from other approaches. Several new endpoints under
`/service-index/` are introduced to help facilitate that
synchronization.
EDITing some snapshots of the progress state
- As of opening, the core code is not finished being written, just want
to get CI output continuously.
- As of July 14 - relatively stable with current AWX, but integration
work for rest of components is still WIP
Fixes#80
Also request review from @dleehr@TheRealHaoLiu
## Type of Change
<!-- Mandatory: Check one or more boxes that apply -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Documentation update
- [ ] Test update
- [ ] Refactoring (no functional changes)
- [ ] Development environment change
- [ ] Configuration change
## Self-Review Checklist
<!-- These items help ensure quality - they complement our automated CI
checks -->
- [x] I have performed a self-review of my code
- [x] I have added relevant comments to complex code sections
- [x] I have updated documentation where needed
- [x] I have considered the security impact of these changes
- [x] I have considered performance implications
- [x] I have thought about error handling and edge cases
- [x] I have tested the changes in my local environment
## Testing Instructions
<!-- Optional for test-only changes. Mandatory for all other changes -->
<!-- Must be detailed enough for reviewers to reproduce -->
### Prerequisites
<!-- List any specific setup required -->
### Steps to Test
Some tests show how you can use this in isolation for types &
permissions. That means, you can call
`DABContentType.objects.load_remote_objects` to import some remote
types, and then make roles using these types, and assign permissions.
But that doesn't do much unless you set up a resource server and another
service for it to track, and synchronize permissions between them. For
this, you pretty much need aap-dev. Watching the demos also might be
good to see test cases. Post-install those are mainly:
- modify a role definition
- assign a permission
- repeat with the API from the resource server & the other server (AWX
probably)
### Expected Results
Role definitions & assignments synchronized using the endpoint system
added here.
## Additional Context
See backlinks for PRs that adopt this PR
### Required Actions
<!-- Check if changes require work in other areas -->
<!-- Remove section if no external actions needed -->
- [ ] Requires documentation updates
<!-- API docs, feature docs, deployment guides -->
- [x] Requires downstream repository changes
<!-- Specify repos: django-ansible-base, eda-server, etc. -->
- [ ] Requires infrastructure/deployment changes
<!-- CI/CD, installer updates, new services -->
- [x] Requires coordination with other teams
<!-- UI team, platform services, infrastructure -->
- [ ] Blocked by PR/MR: #XXX
<!-- Reference blocking PRs/MRs with brief context -->
### Screenshots/Logs
<!-- Add if relevant to demonstrate the changes -->
---------
Co-authored-by: Zack Kayyali <[email protected]>
0 commit comments