craig-rueda commented on a change in pull request #7091: add kerberos for druid
URL: 
https://github.com/apache/incubator-superset/pull/7091#discussion_r367610855
 
 

 ##########
 File path: superset/connectors/druid/models.py
 ##########
 @@ -262,6 +272,17 @@ def name(self):
     def unique_name(self):
         return self.verbose_name if self.verbose_name else self.cluster_name
 
+    def get_kerberos_auth(self):
+        enable_kerberos_authentication = 
conf.get('ENABLE_KERBEROS_AUTHENTICATION', False)
+        kerberos_keytab = conf.get('KERBEROS_KEYTAB', [])
+        kerberos_principal = conf.get('KERBEROS_PRINCIPAL', [])
+        if not enable_kerberos_authentication:
+            return False
+
+        kerberos_commands = 'kinit -k -t %s %s' % (kerberos_keytab, 
kerberos_principal)
+        subprocess.call(kerberos_commands, shell=True)
 
 Review comment:
   Not sure I feel comfortable shelling out like this, from within a model, no 
less. This sort of logic belongs in a higher layer (connection manager, 
perhaps?)

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to