opensearch-project / security

🔐 Secure your cluster with TLS, numerous authentication backends, data masking, audit logging as well as role-based access control on indices, documents, and fields
https://opensearch.org/docs/latest/security-plugin/index/
Apache License 2.0
181 stars 264 forks source link

Refactor ActionGroup REST API test and partial fix #4166 #4371

Closed willyborankin closed 1 month ago

willyborankin commented 1 month ago

Description

Changes:

Issues Resolved

4166 - only for action groups

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.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 65.37%. Comparing base (f71d2e6) to head (02f5e0f). Report is 3 commits behind head on main.

:exclamation: Current head 02f5e0f differs from pull request most recent head 8f536a5

Please upload reports for the commit 8f536a5 to get more accurate results.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/opensearch-project/security/pull/4371/graphs/tree.svg?width=650&height=150&src=pr&token=rBpySfQXMt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project)](https://app.codecov.io/gh/opensearch-project/security/pull/4371?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) ```diff @@ Coverage Diff @@ ## main #4371 +/- ## ========================================== - Coverage 65.43% 65.37% -0.06% ========================================== Files 310 310 Lines 21992 21993 +1 Branches 3554 3554 ========================================== - Hits 14391 14379 -12 - Misses 5830 5842 +12 - Partials 1771 1772 +1 ``` | [Files](https://app.codecov.io/gh/opensearch-project/security/pull/4371?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | Coverage Δ | | |---|---|---| | [.../security/dlic/rest/api/ActionGroupsApiAction.java](https://app.codecov.io/gh/opensearch-project/security/pull/4371?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Fsecurity%2Fdlic%2Frest%2Fapi%2FActionGroupsApiAction.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC9zZWN1cml0eS9kbGljL3Jlc3QvYXBpL0FjdGlvbkdyb3Vwc0FwaUFjdGlvbi5qYXZh) | `67.44% <0.00%> (-30.18%)` | :arrow_down: |
willyborankin commented 1 month ago

Added a new issue which is related to action group type https://github.com/opensearch-project/security/issues/4374

DarshitChanpura commented 1 month ago

@willyborankin The changes look good to me. I will add my approval once the pending comment is resolved.

opensearch-trigger-bot[bot] commented 1 month ago

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.x
# Create a new branch
git switch --create backport/backport-4371-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e455aa1c3e02b322531a16b940e1f70d23ea0092
# Push it to GitHub
git push --set-upstream origin backport/backport-4371-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-4371-to-2.x.