iBalag commented on issue #8212:
URL: https://github.com/apache/airflow/issues/8212#issuecomment-1013225687


   I faced with similar issue when I tried to get secret from secrets backend 
(HashiCorp Vault) in webserver_config.py.
   
   ```
   from airflow.models import Variable
   ...
   AUTH_LDAP_BIND_USER = Variable.get("ldap-bind-user")
   AUTH_LDAP_BIND_PASSWORD = Variable.get("ldap-bind-password")
   ```
   
   So, based on answers of @dimon222, I had to patch `airflow/settings.py` 
during my custom docker image build. Below the proof of concept:
   
   ```
   FROM apache/airflow:2.2.3-python3.8
   USER airflow
   RUN sed -i '1s/^/from gevent import monkey; monkey.patch_ssl() \n/' 
/home/airflow/.local/lib/python3.8/site-packages/airflow/settings.py
   ```
   
   And it works fine! I hope this patch will be included into official airflow 
code.


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

To unsubscribe, e-mail: [email protected]

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


Reply via email to