kn3609571 opened a new issue, #36342:
URL: https://github.com/apache/airflow/issues/36342

   ### Apache Airflow version
   
   2.8.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   Webserver fails to start with following errors when a class inheriting from 
FacebookSecurityManagerOverride is set to SECURITY_MANAGER_CLASS.
   ```
   Traceback (most recent call last):
     File "<frozen runpy>", line 198, in _run_module_as_main
     File "<frozen runpy>", line 88, in _run_code
     File "/usr/local/lib/python3.11/site-packages/gunicorn/__main__.py", line 
7, in <module>
       run()
     File "/usr/local/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", 
line 67, in run
       WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
     File "/usr/local/lib/python3.11/site-packages/gunicorn/app/base.py", line 
236, in run
       super().run()
     File "/usr/local/lib/python3.11/site-packages/gunicorn/app/base.py", line 
72, in run
       Arbiter(self).run()
       ^^^^^^^^^^^^^
     File "/usr/local/lib/python3.11/site-packages/gunicorn/arbiter.py", line 
58, in __init__
       self.setup(app)
     File "/usr/local/lib/python3.11/site-packages/gunicorn/arbiter.py", line 
118, in setup
       self.app.wsgi()
     File "/usr/local/lib/python3.11/site-packages/gunicorn/app/base.py", line 
67, in wsgi
       self.callable = self.load()
                       ^^^^^^^^^^^
     File "/usr/local/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", 
line 58, in load
       return self.load_wsgiapp()
              ^^^^^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", 
line 48, in load_wsgiapp
       return util.import_app(self.app_uri)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.11/site-packages/gunicorn/util.py", line 424, 
in import_app
       app = app(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.11/site-packages/airflow/www/app.py", line 
181, in cached_app
       app = create_app(config=config, testing=testing)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.11/site-packages/airflow/www/app.py", line 
153, in create_app
       init_appbuilder(flask_app)
     File 
"/usr/local/lib/python3.11/site-packages/airflow/www/extensions/init_appbuilder.py",
 line 658, in init_appbuilder
       return AirflowAppBuilder(
              ^^^^^^^^^^^^^^^^^^
     File 
"/usr/local/lib/python3.11/site-packages/airflow/www/extensions/init_appbuilder.py",
 line 174, in __init__
       self.init_app(app, session)
     File 
"/usr/local/lib/python3.11/site-packages/airflow/www/extensions/init_appbuilder.py",
 line 218, in init_app
       self.sm = auth_manager.security_manager
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/local/lib/python3.11/functools.py", line 1001, in __get__
       val = self.func(instance)
             ^^^^^^^^^^^^^^^^^^^
     File 
"/usr/local/lib/python3.11/site-packages/airflow/auth/managers/fab/fab_auth_manager.py",
 line 343, in security_manager
       raise Exception(
   Exception: Your CUSTOM_SECURITY_MANAGER must extend 
FabAirflowSecurityManagerOverride,
                        not FAB's own security manager.
   ```
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   Set custom security manager inheriting FabAirflowSecurityManagerOverride in 
webserver_config.py.
   The following is the simplest example.
   ```python
   class MySecurityManager(FabAirflowSecurityManagerOverride):
       pass
   
   
   SECURITY_MANAGER_CLASS = MySecurityManager
   ```
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm)
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-celery==3.5.0
   apache-airflow-providers-cncf-kubernetes==7.11.0
   apache-airflow-providers-common-sql==1.9.0
   apache-airflow-providers-docker==3.8.2
   apache-airflow-providers-elasticsearch==4.5.1
   apache-airflow-providers-ftp==3.7.0
   apache-airflow-providers-hashicorp==3.6.0
   apache-airflow-providers-http==4.8.0
   apache-airflow-providers-imap==3.5.0
   apache-airflow-providers-mysql==5.5.0
   apache-airflow-providers-odbc==4.2.0
   apache-airflow-providers-openlineage==1.3.0
   apache-airflow-providers-postgres==5.9.0
   apache-airflow-providers-redis==3.5.0
   apache-airflow-providers-samba==4.4.0
   apache-airflow-providers-sendgrid==3.4.0
   apache-airflow-providers-slack==8.5.0
   apache-airflow-providers-sqlite==3.6.0
   apache-airflow-providers-ssh==3.9.0
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: commits-unsubscr...@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to