You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CSRF token to expire with session when config file exists #36869
Despite #28730, I encounter the message that the CSRF token has expired, although I checked that the session has not ended:
The reason why this still happens is because I have defined a custom webserver config, where the argument WTF_CSRF_TIME_LIMIT is not specified at all.
What you think should happen instead?
As is discussed in #28730, it is completely unnecessary for the CSRF token to expire before the end of a session, as it does not provide any extra security.
The default value of WTF_CSRF_TIME_LIMIT should be the same regardless of if there is a webserver config file or not, unless explicitly overridden.
How to reproduce
Define a custom webserver config where the argument WTF_CSRF_TIME_LIMIT is not specified at all. Then just wait until the CSRF token expires.
It is of course possible to specify the argument WTF_CSRF_TIME_LIMIT = None in the custom webserver config. However, this CSRF expiry issue can be a real headache and it took quite some time to figure out the fix, so it would be nice to solve this once and for all.
One could also argue that if one creates a custom webserver config, one should copy the default values first. In my case, however, this was done before #28730, so even if we now use a new airflow version, we still used the same config. I suspect this is the case for many others as well.
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
Activity
boring-cyborg commentedon Jan 18, 2024
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.