From 6a8f441d5488c4580a819dc038ff0b02822094e1 Mon Sep 17 00:00:00 2001 From: Hendrik Schultze <0xBADBAC0N@users.noreply.github.com> Date: Mon, 29 Jun 2020 06:40:24 +0200 Subject: [PATCH] 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 --- superset/db_engine_specs/hive.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/superset/db_engine_specs/hive.py b/superset/db_engine_specs/hive.py index 952f734f3..c8a07a9b3 100644 --- a/superset/db_engine_specs/hive.py +++ b/superset/db_engine_specs/hive.py @@ -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