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_r232258489
##########
File path: airflow/contrib/auth/backends/ldap_auth.py
##########
@@ -55,16 +55,18 @@ class LdapException(Exception):
def get_ldap_connection(dn=None, password=None):
- tls_configuration = None
- use_ssl = False
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
Review comment:
Minor Note:
Can we add a note here in `except` block saying that "Cacert is missing and
it is now mandatory"? rather than just a missing Airflow config?
What do you think?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services