feat: Hive datasource supports LDAP authentication #1209

This commit is contained in:
junjun
2026-08-20 11:26:46 +08:00
parent d31e6a0277
commit 7a32b139f7
+2 -2
View File
@@ -370,8 +370,8 @@ def check_connection(trans: Optional[Trans], ds: CoreDatasource | AssistantOutDs
raise HTTPException(status_code=500, detail=trans('i18n_ds_invalid') + f': {e.args}')
return False
elif equals_ignore_case(ds.type, 'hive'):
with hive.connect(host=conf.host, port=conf.port, username=conf.username,
database=conf.database, password=conf.password if conf.password else None,
with hive.connect(host=conf.host, port=conf.port, username=conf.username, database=conf.database,
password=conf.password if conf.password else None,
auth='LDAP' if conf.password else None,
**extra_config_dict) as conn, conn.cursor() as cursor:
try: