Add hive.kerberos-service-host configuration option - #3864
Open
brightwon wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3787
Rationale for this change
The Hive catalog derives the Kerberos SASL
host(the hostname component of the service principal) from the metastore URI, with no way to override it. Authentication therefore fails whenever the service principal's hostname component differs from the host being connected to, for example in an HA setup whereurihas to list the real metastore hosts while the principal uses a single fixed hostname.This adds an optional
hive.kerberos-service-hostproperty, mirroring the existinghive.kerberos-service-namefor theservicecomponent. When it is not set, the URI host is used, so existing behavior is unchanged.Are these changes tested?
Yes.
test_create_hive_client_with_kerberos_service_hostverifies the property is passed through to_HiveClient.test_kerberized_client_uses_configured_service_hostverifies at the transport level that the SASL host is the configured value, and falls back to the URI host when the property is not set._create_hive_clientassertions were updated for the new argument.I also verified it end-to-end against a Hive Metastore with Kerberos: without the property the connection fails with a KDC
LOOKING_UP_SERVERerror, and with it the correct service ticket is issued and the catalog works.Are there any user-facing changes?
Yes, a new optional Hive catalog property
hive.kerberos-service-host. It defaults to the metastore URI host, so there is no change for existing users. The documentation table has been updated.