-
Notifications
You must be signed in to change notification settings - Fork 274
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
Add security changes for point in time API #2033
Conversation
Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #2033 +/- ##
=========================================
Coverage 61.06% 61.07%
- Complexity 3229 3230 +1
=========================================
Files 256 256
Lines 18070 18070
Branches 3220 3220
=========================================
+ Hits 11035 11036 +1
+ Misses 5463 5461 -2
- Partials 1572 1573 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@cliu123 @peternied please review |
@bharath-techie Have these changes been tested, could you describe how this was done and what was covered? There was a previous permissions pull request that didn't cover the full scenarios. |
Added testing section of PR. Tested the changes locally to verify the changes. |
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
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.
Thanks for those updates
Signed-off-by: Bharathwaj G <bharath78910@gmail.com> (cherry picked from commit 6b7a586)
Signed-off-by: Bharathwaj G <bharath78910@gmail.com> Signed-off-by: Stephen Crawford <steecraw@amazon.com>
…rch-project#2037) Signed-off-by: Bharathwaj G <bharath78910@gmail.com> (cherry picked from commit 6b7a586) Co-authored-by: Bharathwaj G <58062316+bharath-techie@users.noreply.github.com>
Signed-off-by: Bharathwaj G bharath78910@gmail.com
Description
The existing model requires indices read access to 'pit delete' and 'list all pits' to all users.
So changing the action names to 'cluster:admin/<action_name>".
Now , we can't add these cluster permissions to 'cluster_composite_ops' or 'ops_ro' since user has access to 'my_index' role which has access to 'cluster_composite_ops' which will make all users to access list and delete pit.
So changing the approach to new one below.
Add point in time permissions to 'manage_point_in_time' which is part of default static action groups.
Point in time apis - and associated action names :
All the above actions are added to new action group 'manage_point_in_time'
New feature - Point in time feature
These changes are required for access of various point in time APIs
This is a new feature
Design document:
opensearch-project/OpenSearch#3960
Api changes:
opensearch-project/OpenSearch#4064 - create pit and delete pit api
opensearch-project/OpenSearch#4016 - list all
Issues Resolved
opensearch-project/OpenSearch#3959
Is this a backport? If so, please add backport PR # and/or commits #
Testing
Tested locally by running opensearch server alongside security plugin.
Only when index permissions and 'manage_point_in_time' action group permission is present , create api succeeds
For rest of the APIs, 'manage_point_in_time' action group permission controls whether the api can be accessible or not, which has been tested as well.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.