-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SECURITY_MANAGER_CLASS not being picked up in webserver_config.py #36875
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
CC @vincbeck |
Even if I put the entire custom security manager class in webserver_config.py it still doesn't pick it up. I can see webserver_config.py is in the correct dir once deployed too. |
Not quite, as the webserver starts fine - it's just not picking up my custom security manager at all. |
Can you share your webserver_config.py ? Maybe you have a typo there of some sort ? |
Hi @CharlieJ15420, did you solve this issue? I'm having the same, I added log messages and don't see them, plus I get this message when trying to login: |
While migrating from 2.4.0 to 2.10.0 I noticed that in the Webserver documentation of 2.8.0 it used SECURITY_MANAGER_CLASS instead of the previous version FAB_SECURITY_MANAGER_CLASS, in addition to using the new class FabAirflowSecurityManagerOverride. Changing this is what fixed it for me, altough I did not find an official migration guide stating this |
Apache Airflow version
2.8.0
If "Other Airflow 2 version" selected, which one?
No response
What happened?
I've just upgraded from 2.7.3 to 2.8.0 and have my own custom security manager. This custom security manager inherited from AirflowSecurityManager. Now I've upgraded to 2.8.0 I've altered my security manager to inherit from FabAirflowSecurityManagerOverride. Despite this, my custom security manager isn't being picked up. I've made no changes to webserver_config.py where I've specified the SECURITY_MANAGER_CLASS. It should pick up my custom sec manager via this line: https://github.com/apache/airflow/blob/2.8.0/airflow/auth/managers/fab/fab_auth_manager.py#L340 however when I try to login, not only do I get invalid login but the errors in the logs are coming from override.py (where the base FabAirflowSecurityManagerOverride lives) compared to my customsecuritymanager.py. I'm not sure if something else has changed that I need to alter or if there is a bug somewhere that isnt picking up my custom security manager class.
note: I'm also using the default fab auth manager
What you think should happen instead?
My custom security manager should be picked up and used. I've verified it's not being picked up by putting in an incorrect name which in the past has produced an error.
How to reproduce
Try to set your own SECURITY_MANAGER_CLASS in webserver_config.py and inherit from FabAirflowSecurityManagerOverride.
Operating System
CentOS7
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: