You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2023/01/04 13:38:30 UTC
[GitHub] [airflow] maxnathaniel opened a new pull request, #28730: Update CSRF token to expire with session
maxnathaniel opened a new pull request, #28730:
URL: https://github.com/apache/airflow/pull/28730
Updated CSRF token to expire with session. Refer to documentation here - https://flask-wtf.readthedocs.io/en/1.0.x/config/
```
Max age in seconds for CSRF tokens. Default is 3600.
If set to None, the CSRF token is valid for the life of the session.
```
Closes #28356
<br class="Apple-interchange-newline">
https://flask-wtf.readthedocs.io/en/1.0.x/config/
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
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 [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on pull request #28730: Update CSRF token to expire with session
Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #28730:
URL: https://github.com/apache/airflow/pull/28730#issuecomment-1371074048
And to add - If you grab the token, you already grabbed session as well because they are sent/retrieved together, so CSRF does not really protect against anything, because you can use session to generate CSRF token anyway.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ashb commented on pull request #28730: Update CSRF token to expire with session
Posted by GitBox <gi...@apache.org>.
ashb commented on PR #28730:
URL: https://github.com/apache/airflow/pull/28730#issuecomment-1371050285
Does this introduce any problem/risk of CSRF token re-use?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk merged pull request #28730: Update CSRF token to expire with session
Posted by GitBox <gi...@apache.org>.
potiuk merged PR #28730:
URL: https://github.com/apache/airflow/pull/28730
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on pull request #28730: Update CSRF token to expire with session
Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #28730:
URL: https://github.com/apache/airflow/pull/28730#issuecomment-1371070850
> Does this introduce any problem/risk of CSRF token re-use?
Not really. This is recommended setting fos CSRF. I read quite a bit about CSRF when https://github.com/apache/airflow/issues/28356 was raised and I agree expiry with session is ok. CSRF token is not to authorize the session (this is already done via session token). The only role of CSRF is to protect against the case that any "static" URL generated outside the main page will be seen as coming from the application.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org