Version
main
Describe the bug.
It looks like we're not doing any CSRF validation in the admin UI, token-based or otherwise.
It looks like recent tower-http versions have a csrf feature we can enable: https://docs.rs/tower-http/latest/tower_http/csrf/index.html ... we'd just want to make sure to carve out the right settings for the oauth2 callback routes since they have certain expected cross-site characteristics.
Otherwise we could look at adding a simple middleware layer that checks for Sec-Fetch-Site on the admin-ui and rejects it if it's not none or same-origin.
Code of Conduct
Version
main
Describe the bug.
It looks like we're not doing any CSRF validation in the admin UI, token-based or otherwise.
It looks like recent tower-http versions have a csrf feature we can enable: https://docs.rs/tower-http/latest/tower_http/csrf/index.html ... we'd just want to make sure to carve out the right settings for the oauth2 callback routes since they have certain expected cross-site characteristics.
Otherwise we could look at adding a simple middleware layer that checks for Sec-Fetch-Site on the admin-ui and rejects it if it's not
noneorsame-origin.Code of Conduct