Repository navigation
Commit e7edc61
committed
Implement FabAuthManager.refresh_user for sliding JWT refresh
JWTRefreshMiddleware (added in 3.1.4) calls auth_manager.refresh_user on
every request; if a user is returned it reissues the _token cookie so
long-open UI tabs don't burst 401s at token expiry.
BaseAuthManager.refresh_user is a no-op by default. KeycloakAuthManager
overrides it; FAB does not, so on FAB deployments the silent-refresh path
does nothing and UI tabs 401 every jwt_expiration_time interval.
Return the current user unconditionally for authenticated FAB sessions.
deserialize_user already re-fetches the user from DB by token['sub'], so
the object is fresh and returning it is safe.
Related: apache#570651 parent 40ced09 commit e7edc61
2 files changed
Lines changed: 18 additions & 0 deletions
File tree
- providers/fab
- src/airflow/providers/fab/auth_manager
- tests/unit/fab/auth_manager
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
318 | 323 | | |
319 | 324 | | |
320 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
249 | 262 | | |
250 | 263 | | |
251 | 264 | | |
| |||
0 commit comments