Commit a7cef48
committed
Bump flask-appbuilder to 5.2.1 and mirror new auth event hooks
Upstream FAB 5.2.1 was released to PyPI on 2026-04-09 (no GitHub release
was cut, only a master commit `5dae8164` titled "release: 5.2.1"). It
adds three vendored-relevant items on top of 5.2.0:
- PR #2450 (commit 63e7708e) — three new no-op hook methods on
BaseSecurityManager: on_user_login, on_user_login_failed,
on_user_logout. update_user_auth_stat now calls on_user_login or
on_user_login_failed at the end. AuthView.logout / SAML SLO call
on_user_logout. Hook defaults are no-ops; subclasses can override
for audit logging.
- PR #2451 — _is_user_detached / _get_safe_user helpers + a rewrite
of has_access to handle DetachedInstanceError on g.user (LocalProxy
or detached ORM instance after some session boundary). Inherited
automatically; not vendored in override.py so no mirror needed.
- PR #2440 — security log redactions: OAuth tokens / responses no
longer logged at debug level. Inherited; the redacted code paths
are not vendored in override.py.
Mirror the auth-event-hook pieces into FabAirflowSecurityManagerOverride
since update_user_auth_stat is vendored. Without this mirror, the new
hooks would not fire in Airflow because override.py shadows the upstream
implementation.
Specifically:
- Add no-op on_user_login / on_user_login_failed / on_user_logout
methods on FabAirflowSecurityManagerOverride mirroring the FAB
defaults.
- Append the on_user_login / on_user_login_failed dispatch at the
end of FabAirflowSecurityManagerOverride.update_user_auth_stat,
matching the upstream order (called after update_user, so the
counters / last_login are already persisted before the hook runs).
Bump EXPECTED_FAB_VERSION in test_fab_alignment.py to 5.2.1; all 7
alignment tests + 39 security_manager unit tests pass locally with
flask-appbuilder==5.2.1 installed.
The pyjwt floor pin from the parent commit on this branch is unchanged;
the lock-file bump for it is included here because uv re-resolved the
graph for the FAB version bump.1 parent d711e88 commit a7cef48
5 files changed
Lines changed: 44 additions & 7 deletions
File tree
- providers/fab
- docs
- src/airflow/providers/fab/auth_manager/security_manager
- tests/unit/fab/auth_manager/security_manager
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1544 | 1544 | | |
1545 | 1545 | | |
1546 | 1546 | | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
1547 | 1577 | | |
1548 | 1578 | | |
1549 | 1579 | | |
| |||
1569 | 1599 | | |
1570 | 1600 | | |
1571 | 1601 | | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
1572 | 1609 | | |
1573 | 1610 | | |
1574 | 1611 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments