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
180 stars 263 forks source link

[Backport 2.x ] Refactor Roles REST API test and partial fix #4166 (#4433) #4478

Closed willyborankin closed 1 week ago

willyborankin commented 1 week ago

Backport 962eafab80fac3064de02b76bc956ee031703e0e from #4433

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 65.41%. Comparing base (428e21a) to head (597d594).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/opensearch-project/security/pull/4478/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/4478?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) ```diff @@ Coverage Diff @@ ## 2.x #4478 +/- ## ========================================== - Coverage 65.43% 65.41% -0.03% ========================================== Files 312 312 Lines 21888 21888 Branches 3553 3553 ========================================== - Hits 14323 14317 -6 - Misses 5799 5801 +2 - Partials 1766 1770 +4 ``` | [Files](https://app.codecov.io/gh/opensearch-project/security/pull/4478?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | Coverage Δ | | |---|---|---| | [...nsearch/security/dlic/rest/api/RolesApiAction.java](https://app.codecov.io/gh/opensearch-project/security/pull/4478?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Fsecurity%2Fdlic%2Frest%2Fapi%2FRolesApiAction.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC9zZWN1cml0eS9kbGljL3Jlc3QvYXBpL1JvbGVzQXBpQWN0aW9uLmphdmE=) | `98.03% <100.00%> (+0.08%)` | :arrow_up: | | [...g/opensearch/security/dlic/rest/support/Utils.java](https://app.codecov.io/gh/opensearch-project/security/pull/4478?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Fsecurity%2Fdlic%2Frest%2Fsupport%2FUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC9zZWN1cml0eS9kbGljL3Jlc3Qvc3VwcG9ydC9VdGlscy5qYXZh) | `59.45% <100.00%> (-1.07%)` | :arrow_down: | ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/opensearch-project/security/pull/4478/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project)