-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Extract Role interface and allow multiple level of limiting #81403
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR extract an interface from the Role class. This helped to rework the LimitedRole class so it no longer has the constraint of one level of limiting. Resolves: elastic#81192 Relates: elastic#80117
ywangd
added
>refactoring
:Security/Authorization
Roles, Privileges, DLS/FLS, RBAC/ABAC
v8.1.0
labels
Dec 7, 2021
Pinging @elastic/es-security (Team:Security) |
I think we can have a separate work to decide what should be the textual representation of (multi-level) limitedRole. Decision on this topic may help implementing the |
tvernum
approved these changes
Jan 18, 2022
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.
LGTM
This was referenced Oct 27, 2022
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 2, 2022
…91151) Since #81403, the Role class has been able to support multi-levels of limiting (intersections). However, it was an oversight that the underlying DocumentPermissions and FieldPermissions still do not support it. They are still hardcoded to support up to 2 levels of intersection. This PR now updates DocumentPermissions so it can support multi-level of intersections. The similar change for FieldPermissions will be done in a separate PR.
ywangd
added a commit
that referenced
this pull request
Nov 2, 2022
This PR is the 2nd half of updating DocumentPermissions and FieldPermissions to support multi-level of limiting similar to LimitedRole (since #81403). Instead of hard coding fieldsDefinition and limitedByFieldsDefinition, this PR replaces them with a list of fieldsDefinitions which can accomodate multiple of them (more than 2). Relates: #91151
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>refactoring
:Security/Authorization
Roles, Privileges, DLS/FLS, RBAC/ABAC
Team:Security
Meta label for security team
v8.1.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR extract an interface from the Role class. This helped to rework
the LimitedRole class so it no longer has the constraint of one level of
limiting.
Resolves: #81192
Relates: #80117