Skip to content

default_webserver_config.py isn't compatible with the latest changes #36702

Closed

Description

@zachliu

Apache Airflow version

2.8.0

If "Other Airflow 2 version" selected, which one?

No response

What happened?

default_webserver_config.py
is not compatible with 2.8.X versions due to #35572

specifically, these imports are not valid anymore

# from airflow.www.fab_security.manager import AUTH_LDAP
# from airflow.www.fab_security.manager import AUTH_OAUTH
# from airflow.www.fab_security.manager import AUTH_OID
# from airflow.www.fab_security.manager import AUTH_REMOTE_USER

they should be

# from airflow.auth.managers.fab.security_manager.override import AUTH_LDAP
# from airflow.auth.managers.fab.security_manager.override import AUTH_OAUTH
# from airflow.auth.managers.fab.security_manager.override import AUTH_OID
# from airflow.auth.managers.fab.security_manager.override import AUTH_REMOTE_USER

What you think should happen instead?

No response

How to reproduce

for oauth users just keep using the old webserver_config.py

from airflow.www.fab_security.manager import AUTH_OAUTH

will cause

ImportError: cannot import name 'AUTH_OAUTH' from 'airflow.www.fab_security.manager' (/home/zach/KeplerGroup/KIP-Airflow/.venv/lib/python3.11/site-packages/airflow/www/fab_security/manager.py)

Operating System

Debian GNU/Linux 10 (buster)

Versions of Apache Airflow Providers

No response

Deployment

Other Docker-based deployment

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on Jan 9, 2024
  2. potiuk commented on Jan 10, 2024

    @potiuk
    Member
  3. vincbeck commented on Jan 10, 2024

    @vincbeck
    Contributor

    It should have been fixed in #35302

  4. vincbeck commented on Jan 10, 2024

    @vincbeck
    Contributor

    Oh, some are missing, let me add them

  5. removed
    needs-triage
    on Jan 10, 2024
  6. vincbeck commented on Jan 10, 2024

    @vincbeck
    Contributor

    See fix: #36719

  7. vincbeck commented on Jan 10, 2024

    @vincbeck
    Contributor

    You might want to add the fix to 2.8.1

  8. added
    area:webserver
    _eol_affected_version:2.8
    on Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    _eol_affected_version:2.8area:corearea:webserverkind:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions