Skip to content
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

[Backport 2.17] Resolve host to all ips and check against the deny list (#964) #968

Conversation

riysaxen-amzn
Copy link
Contributor

@riysaxen-amzn riysaxen-amzn commented Sep 25, 2024

Description

Backport of #964

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

…roject#964)

* resovle host to all ips and check against the deny list

Signed-off-by: Amardeepsingh Siglani <[email protected]>

fixed build

Signed-off-by: Amardeepsingh Siglani <[email protected]>

added test

Signed-off-by: Amardeepsingh Siglani <[email protected]>

added try catch

Signed-off-by: Amardeepsingh Siglani <[email protected]>

refactored logic to validate host first

Signed-off-by: Amardeepsingh Siglani <[email protected]>

fixed ktlint

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* fixed integ tests

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* throw unknownhostexception instead of illegal argument exception

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit f0668a7)
@riysaxen-amzn riysaxen-amzn changed the title Resovle host to all ips and check against the deny list (#964) [Backport 2.17] Resolve host to all ips and check against the deny list (#964) Sep 25, 2024
@zhongnansu zhongnansu merged commit df45059 into opensearch-project:2.17 Sep 25, 2024
13 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants