-
Notifications
You must be signed in to change notification settings - Fork 118
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
Feature/184 introduce security tests #474
Merged
Angie-Zhang
merged 4 commits into
opensearch-project:main
from
stevanbz:feature/184-introduce-security-tests
Oct 18, 2022
Merged
Feature/184 introduce security tests #474
Angie-Zhang
merged 4 commits into
opensearch-project:main
from
stevanbz:feature/184-introduce-security-tests
Oct 18, 2022
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
Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
…nce opensearch status exception is raised Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
2ed69d4
to
34cbac0
Compare
…ended test cases and created reusable methods Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
7080d97
to
cf69fc0
Compare
Codecov Report
@@ Coverage Diff @@
## main #474 +/- ##
============================================
+ Coverage 75.80% 75.97% +0.17%
- Complexity 2466 2475 +9
============================================
Files 313 314 +1
Lines 14411 14459 +48
Branches 2227 2238 +11
============================================
+ Hits 10924 10985 +61
+ Misses 2240 2232 -8
+ Partials 1247 1242 -5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thanks for adding a thorough suite of security test, fantastic! |
bowenlan-amzn
approved these changes
Oct 18, 2022
Angie-Zhang
approved these changes
Oct 18, 2022
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Oct 18, 2022
* 184: Code copied from Ravi's branch Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Added security tests. Extended gradle file. Resolved 500 issue once opensearch status exception is raised Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Refactored ISM rest test cases to consider forwarded client. Extended test cases and created reusable methods Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Removed unused privileges Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> (cherry picked from commit 63984b2)
Angie-Zhang
pushed a commit
that referenced
this pull request
Oct 18, 2022
* 184: Code copied from Ravi's branch Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Added security tests. Extended gradle file. Resolved 500 issue once opensearch status exception is raised Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Refactored ISM rest test cases to consider forwarded client. Extended test cases and created reusable methods Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Removed unused privileges Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> (cherry picked from commit 63984b2) Co-authored-by: Stevan Buzejic <30922513+stevanbz@users.noreply.github.com>
wuychn
pushed a commit
to ochprince/index-management
that referenced
this pull request
Mar 16, 2023
…arch-project#574) * 184: Code copied from Ravi's branch Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Added security tests. Extended gradle file. Resolved 500 issue once opensearch status exception is raised Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Refactored ISM rest test cases to consider forwarded client. Extended test cases and created reusable methods Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Removed unused privileges Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> (cherry picked from commit 63984b2) Co-authored-by: Stevan Buzejic <30922513+stevanbz@users.noreply.github.com>
ronnaksaxena
pushed a commit
to ronnaksaxena/index-management
that referenced
this pull request
Jul 19, 2023
…arch-project#574) * 184: Code copied from Ravi's branch Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Added security tests. Extended gradle file. Resolved 500 issue once opensearch status exception is raised Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Refactored ISM rest test cases to consider forwarded client. Extended test cases and created reusable methods Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> * 184: Removed unused privileges Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com> (cherry picked from commit 63984b2) Co-authored-by: Stevan Buzejic <30922513+stevanbz@users.noreply.github.com> Signed-off-by: Ronnak Saxena <ronsax@amazon.com>
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.
Issue #, if available:
N/A
Description of changes:
IndexStateManagementSecurityBehaviorIT
RollupSecurityBehaviorIT
TransformSecurityBehaviorIT
test transform successful execution -> checks if the user with correct cluster and index privilege can create and execute transform over the given source index
test failed transform creation user missing cluster privileges -> checks if the user lacking cluster privileges is receiving appropriate status (403 forbidden) once he tries to create a transform
test failed transform execution user missing index access -> checks if the user lacking index access (user is supporting only specified index template ie. airline-*) can create (expected status: created) transform but can't execute (once the execution is triggered the job is returning FAILED status)
test transform access -> checks if users with privileges and user lacking privileges can create and access the transform job; user lacking privilege is receiving 403 FORBIDDEN but after assigning a user to a role, he can access the transform job
test delete transform -> checks if users with different privileges can delete the transform job by first disabling it; the users without appropriate cluster privilege should receive FORBIDDEN once they try to delete the transform job
During writing tests one issue is spotted and solved. Issue can be reproduced by following the next steps:
Expected result:
403 Forbidden with message
Actual result
500 Internal server error with message
Class that contains a bugfix is: IndexManagementException
CheckList:
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.