Skip to content

Commit 01f6d5a

Browse files
author
zouhuajian
committed
feat: support connecting Python Hive3 Namespace to a Kerberos-secured Hive Metastore
1 parent c7cd761 commit 01f6d5a

5 files changed

Lines changed: 751 additions & 7 deletions

File tree

docs/src/hive3.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@ The **client.pool-size** property is optional and specifies the size of the HMS
1414

1515
The **root** property is optional and specifies the storage root location of the lakehouse on Hive catalog. Default value is the current working directory.
1616

17+
The **hive.metastore.sasl.enabled** property is optional. When set to `true`, the Python Hive3 implementation uses Kerberos SASL to connect to Hive Metastore instead of a plain Thrift transport.
18+
19+
The **hive.metastore.kerberos.principal** property is optional and may be used to derive the Kerberos service name from the metastore service principal, such as `hive-metastore/_HOST@EXAMPLE.COM`.
20+
21+
The **kerberos.service-name** property is optional and overrides the Kerberos service name used for SASL negotiation.
22+
23+
The **kerberos.client-principal** property is optional and specifies the Kerberos client principal to use during SASL negotiation. If omitted, the default local Kerberos credentials are used.
24+
25+
## Authentication
26+
27+
For Kerberos-secured Hive Metastore deployments with `hive.metastore.sasl.enabled=true`, clients must have valid Kerberos credentials available before opening the namespace connection.
28+
29+
For the Python implementation, enabling `hive.metastore.sasl.enabled=true` switches the metastore wrapper to a Kerberos SASL transport.
30+
31+
For the Java implementation, Kerberos-related Hive Metastore settings are typically provided through the Hadoop `Configuration` used to initialize the namespace.
32+
1733
## Object Mapping
1834

1935
### Namespace

python/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ hive2 = [
2929
hive3 = [
3030
"thrift>=0.13.0",
3131
"hive-metastore-client>=1.0.0",
32+
"pure-sasl>=0.6.2",
33+
"kerberos>=1.3.1",
3234
]
3335
iceberg = []
3436
polaris = []
@@ -38,6 +40,8 @@ all = [
3840
"botocore>=1.35.0",
3941
"thrift>=0.13.0",
4042
"hive-metastore-client>=1.0.0",
43+
"pure-sasl>=0.6.2",
44+
"kerberos>=1.3.1",
4145
]
4246
dev = [
4347
"pytest>=7.0.0",

0 commit comments

Comments
 (0)