Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adaptions for custom auth manager example in documentation#59355

Merged
vincbeck merged 3 commits intoapache:mainfrom
boschglobal:feature/allow-skipping-of-session-id-rotation-in-oauth
Dec 16, 2025
Merged

Adaptions for custom auth manager example in documentation#59355
vincbeck merged 3 commits intoapache:mainfrom
boschglobal:feature/allow-skipping-of-session-id-rotation-in-oauth

Conversation

Copy link
Contributor

wolfdn commented Dec 12, 2025

Description

We went through the process to create a custom auth manager for API auth and found some small problems in the example how to create a custom auth manager.
It's required to allow skipping rotate_session_id in auth_user_oauth, because otherwise there will be error messages like this one:

RuntimeError: Working outside of request context.
2025-12-12T07:02:12.688480736Z api-server
This typically means that you attempted to use functionality that needed
an active HTTP request. Consult the documentation on testing for
information about how to avoid this problem.

The other methods in FabSecurityManagerOverride like auth_user_db and auth_user_ldap also allow this already - we just need to add this also to auth_user_oauth.

Also the login_user function from flask_login needs to be removed from the example in the docs, because calling it results in the same error message.

  • To be clarified with @vincbeck if this is fine

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

wolfdn requested a review from vincbeck as a code owner December 12, 2025 07:17
vincbeck reviewed Dec 12, 2025
potiuk approved these changes Dec 16, 2025
Copy link
Member

potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good @vincbeck ?

vincbeck approved these changes Dec 16, 2025
vincbeck merged commit ab5ba5c into apache:main Dec 16, 2025
82 checks passed
FoxHelms pushed a commit to FoxHelms/airflow that referenced this pull request Dec 17, 2025
)

* Allow skipping of session ID rotation when using OAuth in auth manager

* Remove login_user function from custom auth manager example
Lohith625 pushed a commit to Lohith625/airflow that referenced this pull request Dec 19, 2025
)

* Allow skipping of session ID rotation when using OAuth in auth manager

* Remove login_user function from custom auth manager example
shahar1 mentioned this pull request Dec 30, 2025
54 tasks
jhgoebbert pushed a commit to jhgoebbert/airflow_Owen-CH-Leung that referenced this pull request Feb 8, 2026
)

* Allow skipping of session ID rotation when using OAuth in auth manager

* Remove login_user function from custom auth manager example
Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Mar 4, 2026
)

* Allow skipping of session ID rotation when using OAuth in auth manager

* Remove login_user function from custom auth manager example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

potiuk potiuk approved these changes

vincbeck vincbeck approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants