airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] kaxil commented on a change in pull request #4006: [AIRFLOW-3164] Verify server certificate when connecting to LDAP
Date Fri, 02 Nov 2018 09:38:45 GMT
kaxil commented on a change in pull request #4006: [AIRFLOW-3164] Verify server certificate
when connecting to LDAP
URL: https://github.com/apache/incubator-airflow/pull/4006#discussion_r230315644
 
 

 ##########
 File path: airflow/contrib/auth/backends/ldap_auth.py
 ##########
 @@ -55,16 +55,20 @@ class LdapException(Exception):
 
 
 def get_ldap_connection(dn=None, password=None):
-    tls_configuration = None
-    use_ssl = False
+    cacert = None
     try:
         cacert = configuration.conf.get("ldap", "cacert")
-        tls_configuration = Tls(validate=ssl.CERT_REQUIRED, ca_certs_file=cacert)
-        use_ssl = True
-    except Exception:
+    except AirflowConfigException:
         pass
 
-    server = Server(configuration.conf.get("ldap", "uri"), use_ssl, tls_configuration)
+    tls_configuration = Tls(validate=ssl.CERT_REQUIRED,
+                            version=ssl.PROTOCOL_SSLv23,
 
 Review comment:
   I agree with this. We should definitely default to `TLSv1.2`. We underwent a pentest for
one of our environment, and this was raised as an issue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message