-
Notifications
You must be signed in to change notification settings - Fork 60
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
Deduplicate access permissions list returned to clients #893
base: master
Are you sure you want to change the base?
Deduplicate access permissions list returned to clients #893
Conversation
It is useful for clients to handle the simplest list of permissions objects, for performance reasons. It reduces the data transferred to the client application, and it reduces the possibility that a client will misinterpret some part of the data. It also reduces the amount of data RBAC stores in its cache, thus saving space and time. This implements a basic process to deduplicate the list of permissions objects returned to the client. It does two basic optimisations: 1. Two exactly matching permissions - e.g. 'app:*:read' and 'app:*:read' - are combined. Their resourceDefinitions are appended without attempting to interpret them. 2. The '*' verb implies all other verbs. Therefore 'app:*:read' will be ignored in favour of 'app:*:*'. Ignored permissions have their resourceDefinitions thrown away because they are superseded. Further optimisations may be possible but may be app-dependent and we should tread with caution here. A basic test is included, but probably not yet working. Signed-off-by: Paul Wayper <[email protected]>
Signed-off-by: Paul Wayper <[email protected]>
Signed-off-by: Paul Wayper <[email protected]>
Thanks @PaulWay for doing it! it looks that this covers this ticket https://issues.redhat.com/browse/RHCLOUD-27387 Note: It looks that some |
@PaulWay I don't think that the idea of throwing It is probably not real edge case but I can imagine having |
IMO from our context all these should be merged and no precedence should be applied. |
@PaulWay I believe that we should do only first thing point 1 now and than we need to elaborate and discuss more option 2 about its impact. Do you have time to separate it or should we take it over ? |
@lpichler - well spotted, formatting corrected. The fundamental point is that we have a large number of apps reading this data. If each of those apps implements different methods of working out which host groups this user is allowed to see, then we'll have inconsistent behaviour and our customers will get confused. We need to provide one simple place that makes sure that these records are consistent, and RBAC is the best place to do it AFAICS. |
Signed-off-by: Paul Wayper <[email protected]>
@syncrou and @gmcculloug this has been sitting idle for a while. What steps do we need to take to finish the review? |
@fpjrh We are discussing the solution @lpichler discussed here: #893 (comment) As far as I know we need to get this reviewed and tested. The tough part has been that Libor and Ashley who have the deepest background on RBAC have another high priority RBAC task they are currently working through ( for the past month. ) I am working at finding resources to get this taken care of, and I'll try to get this escalated. |
@fpjrh We have assigned Doug Donahue to get this moving forward. He is familiar with RBAC and will allow us to apply fresh eyes on this. |
I have updated the Jira task RHCLOUD-27387 |
@ddonahue007 @skateman @syncrou just wondering where we're up to with this? I'm trying to get collaboration on this work so I think it'd be good if we can push to this branch and update the MR as we decide what course to take. E.g. if you want to do deduplication after cache fetch but not before cache push, go right ahead - let's collaborate here. |
Signed-off-by: Paul Wayper <[email protected]>
It is useful for clients to handle the simplest list of permissions objects, for performance reasons. It reduces the data transferred to the client application, and it reduces the possibility that a client will misinterpret some part of the data. It also reduces the amount of data RBAC stores in its cache, thus saving space and time.
This implements a basic process to deduplicate the list of permissions objects returned to the client. It does two basic optimisations:
Further optimisations may be possible but may be app-dependent and we should tread with caution here.
A basic test is included, but probably not yet working.
Checklist
They may celebrate.
Secure Coding Practices Checklist Link
Secure Coding Practices Checklist