-
Notifications
You must be signed in to change notification settings - Fork 881
chore: Drop resource_id support in rbac system #3426
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
Conversation
resource_id was implemented to support: - Workspace agent tokens - Roles as a resource - Workspace sharing The additional complexity is not required and will ease support of rbac moving forward.
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 like the simplification here. Could we add a benchmark so we can see how much this improves the performance?
This won't improve performance at all, but it allows me to use my new rego query that supports partials. I just need to drop this requirement first. I can add benchmarks for the sake of benchmarks though 👍 |
Ahh, I see. Should we just add that Rego query as part of this then? |
I have it like 90% written. I figured I'd drop this functionality, get the tests passing, then I can swap the rego without a sweat because if the tests pass, the implementation behavior is identical. Feels "cleaner" to make that a different PR. If I add benchmarks to this, it also gives us a better comparison and we can go back in time in our git history a bit cleaner. |
Makes sense to me! I approve. Let's link the PRs in your future one, just so the timeline makes sense. |
|
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.
👍
What this does
This drops
resource_id
from the RBAC permissions. This is a loss of a feature from RBAC. The goal is to reduce complexity of the rego policy, and reduce the number of permissions on actors.At the present, no
resource_id
permissions are used. So this removes excess functionality that has no real planned use in the current roadmap.Why did we have resource_id?
Intended to support:
What do we gain?
By removing
resource_id
, there is only 3 properties of an object we need to knowAuthorize?
:object_type
,owner_id
, andorg_owner
. This reduction only removes 1 property, but drastically reduces the number of unique objects in the system. This can drastically speedupAuthorize()
calls on large sets and enables future optimizations.Can we revert this?
Yes. We can revert this, however I don't recommend we do Phase 2.
I think it is better to have a need arise and implement this back, then have this feature be available and possibly misused because it is "just there".
What this does not do
This does not reduce RBAC authorization benchmarks.