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

Adding default value to verify hostname #24552

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bibith4
Copy link
Contributor

@bibith4 bibith4 commented Feb 13, 2025

Description

This issue was identified as part of addressing a SonarQube warning in a static scan. The warning, 'Enable server hostname verification on this SSL/TLS connection,' was found in PrometheusClient.java. Upon investigation, we determined it to be a false positive.
This change adds a default value to the configuration property verify-host-name, which can be passed from the Preso UI. Based on this configuration value, a hostnameVerifier object is created. If the configuration property is set to false, the hostname verifier is adjusted to accept all hostnames; otherwise, it will perform hostname verification. To enable hostname verification by default, we are setting the verifyHostName variable to true in the PrometheusConnectorConfig.java file

Test Plan

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

== NO RELEASE NOTE ==

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Feb 13, 2025
@bibith4 bibith4 force-pushed the sonarfix_Prometheus branch from 7eeea49 to 75591e0 Compare February 13, 2025 08:33
@bibith4 bibith4 marked this pull request as ready for review February 13, 2025 10:26
@bibith4 bibith4 requested a review from a team as a code owner February 13, 2025 10:26
@bibith4 bibith4 requested a review from presto-oss February 13, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:IBM PR from IBM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants