Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚗[RUMF-1079] add lock mechanism for session cookie writes #1230

Merged
merged 18 commits into from
Jan 10, 2022

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Dec 21, 2021

Motivation

Mitigate session inconsistencies due to concurrent access to cookies by different tabs (chromium browsers).

Changes

  • introduce a sessionCookieStore for session cookie methods
  • introduce an API to write into session cookie protected by lock
  • lock mechanism enabled by flag cookie-lock

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@bcaudan bcaudan force-pushed the bcaudan/session-lock branch 2 times, most recently from 41ef380 to c38fe8c Compare December 21, 2021 16:13
@codecov-commenter
Copy link

codecov-commenter commented Dec 21, 2021

Codecov Report

Merging #1230 (d275211) into main (65dd3a1) will increase coverage by 0.15%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1230      +/-   ##
==========================================
+ Coverage   89.13%   89.29%   +0.15%     
==========================================
  Files         104      105       +1     
  Lines        4254     4317      +63     
  Branches      962      979      +17     
==========================================
+ Hits         3792     3855      +63     
  Misses        462      462              
Impacted Files Coverage Δ
...ges/core/src/domain/session/oldCookiesMigration.ts 100.00% <ø> (ø)
...ages/core/src/domain/session/sessionCookieStore.ts 100.00% <100.00%> (ø)
packages/core/src/domain/session/sessionStore.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65dd3a1...d275211. Read the comment docs.

@bcaudan bcaudan force-pushed the bcaudan/session-lock branch from 87ab8dc to 8a5c553 Compare December 22, 2021 14:28
@bcaudan bcaudan force-pushed the bcaudan/session-lock branch from 8a5c553 to c484ce3 Compare December 22, 2021 14:31
@bcaudan bcaudan marked this pull request as ready for review December 22, 2021 14:31
@bcaudan bcaudan requested a review from a team as a code owner December 22, 2021 14:31
packages/core/test/specHelper.ts Outdated Show resolved Hide resolved
packages/core/src/domain/session/sessionCookieStore.ts Outdated Show resolved Hide resolved
packages/core/src/domain/session/sessionStore.ts Outdated Show resolved Hide resolved
packages/core/src/domain/session/sessionCookieStore.ts Outdated Show resolved Hide resolved
@bcaudan bcaudan force-pushed the bcaudan/session-lock branch from 1d5db83 to 7b786fe Compare January 5, 2022 11:32
@bcaudan bcaudan merged commit 5b24a08 into main Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants