Reject API requests with header Sec-Fetch-Site: cross-site
Open
Nobody has claimed this yet.
area/api
good first issue
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 616
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
Is your feature request related to a problem? Please describe.
Our API doesn't protect GETs against CSRF to make it working in a browser.
Describe the solution you'd like
Modern browsers even indicate CSRFs, setting Sec-Fetch-Site to cross-site. Simply listen to the browser!
Describe alternatives you've considered
Do nothing.
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked MDN Sec-Fetch-Site reference and Go issue first, then trace the REST API request handling in Icinga2; the issue names no source file or test. Done means cross-site requests carrying Sec-Fetch-Site: cross-site are rejected without breaking the browser-compatible API behavior described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100