mik-laj commented on a change in pull request #10488:
URL: https://github.com/apache/airflow/pull/10488#discussion_r476946689



##########
File path: airflow/providers/presto/hooks/presto.py
##########
@@ -44,9 +59,28 @@ class PrestoHook(DbApiHook):
     def get_conn(self):
         """Returns a connection object"""
         db = self.get_connection(self.presto_conn_id)  # pylint: 
disable=no-member
-        auth = prestodb.auth.BasicAuthentication(db.login, db.password) if 
db.password else None
+        extra = db.extra_dejson
+        auth = None
+        if db.password and extra.get('auth') == 'kerberos':
+            raise AirflowException("Kerberos authorization doesn't support 
password.")
+        elif db.password:
+            auth = prestodb.auth.BasicAuthentication(db.login, db.password)
+        elif extra.get('auth') == 'kerberos':
+            auth = prestodb.auth.KerberosAuthentication(
+                config=extra.get('kerberos__config', 
os.environ.get('KRB5_CONFIG')),

Review comment:
       We cannot use nested structures because this is not supported by URI 
representations and the secret backends.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to