Add security changes for point in time API#2033
Merged
Merged
Conversation
Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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 🚀 New features to boost your workflow:
|
Contributor
Author
|
@cliu123 @peternied please review |
Member
|
@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. |
Contributor
Author
Added testing section of PR. Tested the changes locally to verify the changes. |
cliu123
approved these changes
Aug 18, 2022
This was referenced Aug 18, 2022
opensearch-trigger-bot Bot
pushed a commit
that referenced
this pull request
Aug 19, 2022
Signed-off-by: Bharathwaj G <bharath78910@gmail.com> (cherry picked from commit 6b7a586)
cwperks
pushed a commit
that referenced
this pull request
Aug 22, 2022
This was referenced Aug 23, 2022
stephen-crawford
pushed a commit
to stephen-crawford/security
that referenced
this pull request
Nov 10, 2022
Signed-off-by: Bharathwaj G <bharath78910@gmail.com> Signed-off-by: Stephen Crawford <steecraw@amazon.com>
wuychn
pushed a commit
to ochprince/security
that referenced
this pull request
Mar 16, 2023
…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>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.