I have apache airflow running perfectly fine with default settings, when I set authenticate = False in the the airflow.cfg file
But I am unable to access the Web UI when i set authenticate = True I am following the instructions from the website https://incubator-airflow.readthedocs.io/en/latest/security.html
I am using Version : 1.10.1
When i try to access web ui, I get the message This site can’t be reached or too many redirects
[webserver]
authenticate = True
auth_backend = airflow.contrib.auth.backends.password_auth
import airflow
from airflow import models, settings
from airflow.contrib.auth.backends.password_auth import PasswordUser
user = PasswordUser(models.User())
user.username = 'my.user'
user.email = '[email protected]'
user.password = 'password'
session = settings.Session()
session.add(user)
session.commit()
session.close()
exit()
I've tried the way same as yours to create airflow user, it couldn't work.
Simply you can use command like this airflow create_user -r Admin -u admin -e [email protected] -f admin -l user -p test in airflow webserver shell.
create_user seems to be deprecated, so please use this:
airflow users create --username admin --role Admin --email [email protected] --firstname A --lastname B
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With