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

HIVE-28775: HiveServer2: introduce a new HA Health Check endpoint on a different p… #5652

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

Conversation

difin
Copy link
Contributor

@difin difin commented Feb 21, 2025

…ort than WebUI

What changes were proposed in this pull request?

Changes to deploy a new endpoint for HA health checking that listens on a different port than WebUI port on HS2 webserver.

Why are the changes needed?

Leader endpoint is used for HA health checking on downstream. When LDAP authentication is enabled on HS2, it requires to call leader endpoint with LDAP also. If we wanted to create a technical user for this endpoint we would need to have customers add this user into their LDAP servers which we have no control over, so this is not a good solution. Instead of that this PR proposes a new HA health check endpoint that exposes only the new route '\GET /health-ha/leader' on a different port that can be accessed without LDAP.

Does this PR introduce any user-facing change?

Yes, new http endpoint that listens on a different port.

Is the change a dependency upgrade?

No.

How was this patch tested?

Execution of existing precommit tests + new HA tests.

@dengzhhu653
Copy link
Member

how about skipping the authentication for /leader or /peers in LDAPAuthenticationFilter?

@difin difin changed the title HIVE-28775: HiveServer2: enabling HA Leader endpoint on a different p… HIVE-28775: HiveServer2: enabling HA Health Check endpoint on a different p… Mar 14, 2025
@difin difin changed the title HIVE-28775: HiveServer2: enabling HA Health Check endpoint on a different p… HIVE-28775: HiveServer2: introduce a new HA Health Check endpoint on a different p… Mar 14, 2025
@difin
Copy link
Contributor Author

difin commented Mar 15, 2025

how about skipping the authentication for /leader or /peers in LDAPAuthenticationFilter?

If we do that and Hive is deployed on a public cloud, it will allow access to the /leader endpoints to the internet, which is not secure. By adding a new unsecured endpoint for HA health-check on a different port, that new port can be exposed internally only for health-check script which will be more secure.

@difin difin marked this pull request as ready for review March 17, 2025 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants