Skip to content
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

AUTH_REMOTE_USER is gone #34720

Closed
1 of 2 tasks
ghost opened this issue Oct 2, 2023 · 1 comment · Fixed by #34721
Closed
1 of 2 tasks

AUTH_REMOTE_USER is gone #34720

ghost opened this issue Oct 2, 2023 · 1 comment · Fixed by #34721
Labels
kind:bug This is a clearly a bug kind:documentation

Comments

@ghost
Copy link

ghost commented Oct 2, 2023

Apache Airflow version

2.7.1

What happened

We upgraded from 2.6.3 to 2.7.1 and the webserver stopped working due to our config with error:

ImportError: cannot import name 'AUTH_REMOTE_USER' from 'airflow.www.fab_security.manager'

There's a commit called Fix inheritance chain in security manager (https://github.com/apache/airflow/pull/33901) which sounds suspicious around magic security imports.

What you think should happen instead

This is still documented and it wasn't noted in the changelog as removed, so it shouldn't have broken our upgrade.

How to reproduce

it's not there, so try to import it and... it's not there.

for now I just switched it to importing directly from flask_appbuilder.const import AUTH_DB, AUTH_LDAP, AUTH_OAUTH, AUTH_OID, AUTH_REMOTE_USER

Operating System

all of them

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

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

@ghost ghost added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Oct 2, 2023
@hussein-awala hussein-awala added kind:documentation and removed area:core needs-triage label for new issues that we didn't triage yet labels Oct 2, 2023
@hussein-awala
Copy link
Member

The mentioned commit is not released yet.

For this issue, IMHO importing from airflow.www.fab_security.manager is not a good practice, and these example code was added in 2.7.0 by #32759.

I will update the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug kind:documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant