After changing the airflow.cfg, I simply changed the authenticate to True like this:
[webserver]
authenticate = True
auth_backend = airflow.contrib.auth.backends.password_auth
Run Code Online (Sandbox Code Playgroud)
when I run command airflow webserver, there was an Error as below:
File "/home/airflow/.pyenv/versions/3.7.3/lib/python3.7/site-packages/airflow/contrib/auth/backends/password_auth.py", line 33, in <module>
from flask_bcrypt import generate_password_hash, check_password_hash
ModuleNotFoundError: No module named 'flask_bcrypt'
...
File "/home/airflow/.pyenv/versions/3.7.3/lib/python3.7/site-packages/airflow/__init__.py", line 73, in load_login
raise AirflowException("Failed to import authentication backend")
airflow.exceptions.AirflowException: Failed to import authentication backend
Run Code Online (Sandbox Code Playgroud)
Just added the content in airflow.cfg file.
[webserver]
authenticate = True
auth_backend = airflow.contrib.auth.backends.password_auth
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4806 次 |
| 最近记录: |