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

Add support for ipv6 ip address in user injection #4399

Closed derek-ho closed 4 weeks ago

derek-ho commented 1 month ago

Description

Enhances the parsing logic of user injection to support ipv6 addresses.

Issues Resolved

Fix: https://github.com/opensearch-project/security/issues/4177

Is this a backport? If so, please add backport PR # and/or commits # No

Testing

Added unit test

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

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

Project coverage is 65.41%. Comparing base (f002182) to head (a680e92).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/opensearch-project/security/pull/4399/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/4399?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 #4399 +/- ## ========================================== + Coverage 65.39% 65.41% +0.01% ========================================== Files 310 310 Lines 21993 21995 +2 Branches 3554 3554 ========================================== + Hits 14383 14388 +5 + Misses 5838 5835 -3 Partials 1772 1772 ``` | [Files](https://app.codecov.io/gh/opensearch-project/security/pull/4399?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | Coverage Δ | | |---|---|---| | [...ava/org/opensearch/security/auth/UserInjector.java](https://app.codecov.io/gh/opensearch-project/security/pull/4399?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Fsecurity%2Fauth%2FUserInjector.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC9zZWN1cml0eS9hdXRoL1VzZXJJbmplY3Rvci5qYXZh) | `89.53% <100.00%> (+0.24%)` | :arrow_up: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/opensearch-project/security/pull/4399/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project)
cwperks commented 4 weeks ago

DCO check is stuck. I am bypassing and manually verified that all commits are signed.