influxdb/kit
Jamie Strandboge c40ad64604
feat(security): set SameSite=strict on session cookie (#23723)
* feat(security): set SameSite=strict on session cookie

Use SameSite=Strict as a hardening measure against cross-origin attacks.
While browsers have been moving to default to SameSite=Lax, explicitly
setting SameSite ensures that all browsers enforce it consistently.
While 'lax' is a reasonable hardening choice, the cookie is only
required for requests to '/api/...' and we don't expect 3rd party links
into '/api/...', so this stricter setting should be safe in terms of
usability. Furthermore, while our GET APIs are not state-changing, using
'strict' future-proofs us in case we add a state-changing GET API ('lax'
allows cross-origin 'GET' requests for increased usability for read-only
requests).

Also add a comment to SetCORS() lack of Access-Control-Allow-Credentials
as a reminder that its omission is intentional for defense in depth on
when to attach the cookie to a request.

* chore: mention that Lax sends the cookie with other safe HTTP methods
2022-09-15 15:30:19 -05:00
..
check feat(kit/check): Adds manual override capabilities to readiness endpoint. 2019-12-30 09:42:31 -05:00
cli build: upgrade to Go 1.18.1 (#23252) 2022-04-13 15:24:27 -05:00
errors feat(influxd): Add errors.List to simplify capturing a list of errors 2019-03-19 20:35:02 -07:00
feature build: upgrade to Go 1.18.1 (#23252) 2022-04-13 15:24:27 -05:00
io build: upgrade to Go 1.18.1 (#23252) 2022-04-13 15:24:27 -05:00
metric fix: more expressive errors (#22448) 2021-09-13 15:12:35 -04:00
migration feat: recommend `influxd downgrade` after encountering unknown KV migration (#22805) 2021-11-01 11:07:54 -04:00
platform fix: more expressive errors (#22448) 2021-09-13 15:12:35 -04:00
prom refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
signals build: upgrade to Go 1.18.1 (#23252) 2022-04-13 15:24:27 -05:00
tracing fix: more expressive errors (#22448) 2021-09-13 15:12:35 -04:00
transport/http feat(security): set SameSite=strict on session cookie (#23723) 2022-09-15 15:30:19 -05:00