mirror of https://github.com/apache/superset.git
fix: make auth for hive optional (#10172)
* fix: make auth for hive optional This will make allow the admin to setup a root connection which can be impersonated. * style: black lint conform * style: clean up unnecessary condition expansion
This commit is contained in:
parent
9bdfa055ac
commit
6a8f441d54
|
@ -437,14 +437,9 @@ class HiveEngineSpec(PrestoEngineSpec):
|
|||
url = make_url(uri)
|
||||
backend_name = url.get_backend_name()
|
||||
|
||||
# Must be Hive connection, enable impersonation, and set param
|
||||
# Must be Hive connection, enable impersonation, and set optional param
|
||||
# auth=LDAP|KERBEROS
|
||||
if (
|
||||
backend_name == "hive"
|
||||
and "auth" in url.query.keys()
|
||||
and impersonate_user is True
|
||||
and username is not None
|
||||
):
|
||||
if backend_name == "hive" and impersonate_user and username is not None:
|
||||
configuration["hive.server2.proxy.user"] = username
|
||||
return configuration
|
||||
|
||||
|
|
Loading…
Reference in New Issue