You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to enable user registration, by configuring the "webserver_config.py" file.
I have set the AUTH_USER_REGISTRATION variable to True and I have restarted the "webserver" container. I also tried performing down to the services and again up to the services and the error continues.
Once enabled the variable already mentioned in the "Login" panel the Register button is shown, but when accessing the "Register" it shows the following error.
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/airflow/.local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/views.py", line 127, in this_form_get
self.form_get(form)
File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/security/registerviews.py", line 175, in form_get
self.add_form_unique_validations(form)
File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/security/registerviews.py", line 155, in add_form_unique_validations
datamodel_user = self.appbuilder.sm.get_user_datamodel
AttributeError: 'AirflowSecurityManager' object has no attribute 'get_user_datamodel'
I should add that both the "airflow.cfg" and "webserver_config.py" file I have as volume so as not to lose the configuration.
What you expected to happen
That users have a form where they must fill out the registration information, and then be able to access
How to reproduce
The variable AUTH_USER_REGISTRATION = True must be enabled in the file "webserver_config.py", verify that the variable AUTH_TYPE has AUTH_DB as value and finally validate that AUTH_DB is imported.
Operating System
Docker
Versions of Apache Airflow Providers
Python version: 3.7.12
Airflow version: 2.2.3
Deployment
Docker-Compose
Deployment details
Docker version is 4.2.0
Host operating system is Windows 10 version 20H2 (OS Build 19042.1526)
In the Host operating system, WSL 2 is enabled.
Make sure you use constriants when installing Airlfow. otherwise you might get incompatible versions of dependencies (for example FAB in this case). Also you might want to swtich to the official Airflow Docker image (https://airflow.apache.org/docs/docker-stack/index.html)
Apache Airflow version
2.2.3
What happened
I am trying to enable user registration, by configuring the "webserver_config.py" file.
I have set the AUTH_USER_REGISTRATION variable to True and I have restarted the "webserver" container. I also tried performing down to the services and again up to the services and the error continues.
Once enabled the variable already mentioned in the "Login" panel the Register button is shown, but when accessing the "Register" it shows the following error.
I should add that both the "airflow.cfg" and "webserver_config.py" file I have as volume so as not to lose the configuration.
What you expected to happen
That users have a form where they must fill out the registration information, and then be able to access
How to reproduce
The variable AUTH_USER_REGISTRATION = True must be enabled in the file "webserver_config.py", verify that the variable AUTH_TYPE has AUTH_DB as value and finally validate that AUTH_DB is imported.
Operating System
Docker
Versions of Apache Airflow Providers
Python version: 3.7.12
Airflow version: 2.2.3
Deployment
Docker-Compose
Deployment details
Docker version is 4.2.0
Host operating system is Windows 10 version 20H2 (OS Build 19042.1526)
In the Host operating system, WSL 2 is enabled.
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: