[Backport 2.x] Rest admin permissions (#2411)#2806
Merged
DarshitChanpura merged 6 commits intoopensearch-project:2.xfrom May 30, 2023
Merged
[Backport 2.x] Rest admin permissions (#2411)#2806DarshitChanpura merged 6 commits intoopensearch-project:2.xfrom
DarshitChanpura merged 6 commits intoopensearch-project:2.xfrom
Conversation
Permissions for REST admin user
Added granular permissions for all REST API actions in OpenSearch to be individually assigned.
Permissions are:
- 'restapi:admin/actiongroups' - allow full access to actiongroups
- 'restapi:admin/allowlist' - allow full access to allowlist
- 'restapi:admin/internalusers'- allow full access to internalusers
- 'restapi:admin/nodesdn'- allow full access to nodesdn
- 'restapi:admin/roles' - allow full access to roles
- 'restapi:admin/rolesmapping' - allow full access to roles mappings
- 'restapi:admin/ssl/certs/info' - allow full access to certs info
- 'restapi:admin/ssl/certs/reload' - allow full access to certs reload
- 'restapi:admin/tenants' - allow full access to tenants
Adds tests for these permissions.
Signed-off-by: Andrey Pleskach <ples@aiven.io>
(cherry picked from commit d676716)
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Member
Author
|
@willyborankin Would you please review the changes? |
Member
|
@DarshitChanpura wdyt about opening up the same PR against 2.8 to expedite the backport process to that branch? |
Member
Author
Done. 😃 #2807 |
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Codecov Report
@@ Coverage Diff @@
## 2.x #2806 +/- ##
============================================
+ Coverage 61.26% 61.37% +0.10%
- Complexity 3316 3368 +52
============================================
Files 264 264
Lines 18507 18631 +124
Branches 3265 3283 +18
============================================
+ Hits 11338 11434 +96
- Misses 5593 5611 +18
- Partials 1576 1586 +10
|
Remove unused import
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
DarshitChanpura
commented
May 30, 2023
| } | ||
|
|
||
| dependencies { | ||
| implementation 'jakarta.annotation:jakarta.annotation-api:1.3.5' |
Member
Author
There was a problem hiding this comment.
this change should already be part of 2.x via https://github.com/opensearch-project/security/pull/2803/files
but isn't
RyanL1997
approved these changes
May 30, 2023
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.
Permissions for REST admin user
Added granular permissions for all REST API actions in OpenSearch to be individually assigned.
Permissions are:
- 'restapi:admin/actiongroups' - allow full access to actiongroups
- 'restapi:admin/allowlist' - allow full access to allowlist
- 'restapi:admin/internalusers'- allow full access to internalusers
- 'restapi:admin/nodesdn'- allow full access to nodesdn
- 'restapi:admin/roles' - allow full access to roles
- 'restapi:admin/rolesmapping' - allow full access to roles mappings
- 'restapi:admin/ssl/certs/info' - allow full access to certs info
- 'restapi:admin/ssl/certs/reload' - allow full access to certs reload
- 'restapi:admin/tenants' - allow full access to tenants
Adds tests for these permissions.
Signed-off-by: Andrey Pleskach ples@aiven.io
(cherry picked from commit d676716)
Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve]
Is this a backport? If so, please add backport PR # and/or commits #
Testing
[Please provide details of testing done: unit testing, integration testing and manual testing]
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.