Commit Graph

17 Commits (master)

Author SHA1 Message Date
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
Sam Arnold 3ec5a570e5
fix: tell browser about cookie expiry (#23201)
Closes #17142
2022-03-18 08:04:15 -04:00
Daniel Moran e12e78aa69
fix: change session cookie name used by UI to avoid conflict with incompatible 2.0.x cookie (#22632) 2021-10-07 15:53:55 -04:00
Daniel Moran 15a32a0860
refactor: consolidate session-handling code (#22626) 2021-10-06 22:37:02 -04:00
Sam Arnold 5015297d40
fix: more expressive errors (#22448)
* fix: more expressive errors

Closes #22446

* fix: server only logging for untyped errors

* chore: fix formatting
2021-09-13 15:12:35 -04:00
William Baker 0106de9fa7
feat: notebooks HTTP handlers (#21316)
* feat: notebooks HTTP handlers
2021-04-28 11:06:13 -04:00
Daniel Moran 00afd95cb7
refactor: automated move of errors and id from root to kit (#21101)
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-03-30 14:10:02 -04:00
Daniel Moran 15b9531273
fix: correct various typos (#19987)
Co-authored-by: kumakichi <xyesan@gmail.com>
2020-11-11 13:54:21 -05:00
George c6967ee7b1
fix(tenant): add support for offset to list urms (#18944)
* fix(tenant): add support for offset to list urms

* fix(urm): treat urm limit 0 and unlimited
2020-07-14 19:40:04 +01:00
George 4a6bc1d74f
chore: remove kv Session service and sessionsv1 bucket (#18823)
* chore: remove sessionsv1 bucket

* chore: add extra configuration to sessions.Service
2020-07-02 15:15:08 +01:00
George 96d84b9126
refactor: migrator and introduce Store.(Create|Delete)Bucket (#18570)
* refactor: migrator and introduce Store.(Create|Delete)Bucket

feat: kvmigration internal utility to create / managing kv store migrations

fix: ensure migrations applied in all test cases

* chore: update kv and migration documentation
2020-07-01 12:08:20 +01:00
Lyon Hill 3987d3692b
chore: Clean out old session store feature flag (#18596) 2020-06-18 12:18:34 -06:00
Lyon Hill c459852f8f
feat: integrate the new session system behind a feature flag (#18042) 2020-05-18 11:50:22 -06:00
Ben Johnson 97960a5930 feat(http): Client disconnections should return a HTTP 499 error code.
This commit checks http.Request.Context().Err() to see if the context
has been canceled before writing an error code. It uses the non-standard
Nginx 499 error code for client disconnection.
2020-05-14 14:51:57 -06:00
Lyon Hill 8872c0f24d
fix: update session namespace to avoid any duplication (#18068) 2020-05-12 16:25:53 -06:00
Alirie Gray 95efdc25df
fix: change logging level to debug to reduce noise (#18054) 2020-05-12 10:16:00 -07:00
Lyon Hill bdc882f6ce
feat(session): Build out a new session service (#17950)
This new session service has the ability to work independant of other systems
it relies on having its own store type which should allow us to be more flexible
then using the built in kv system.

I have included an in mem session store.
2020-05-11 15:04:11 -06:00