Samesite Cookie Attribute Explained

preview_player
Показать описание
#CSRF #SameSiteCookie #Chrome
Same-site cookies allow servers to mitigate the risk of CSRF and information leakage attacks by asserting that a particular cookie should only be sent with requests initiated from the same registered domain.

Refer RFC6265bis @aft-west-cookie-incrementalism-00 for more details
The Stable version of Chrome 80 is targeted for enabling this feature by default. This feature is available as of Chrome 76 by enabling the "same-site-by-default-cookies" flag – more details @/5088147346030592

If the "SameSite" attribute value is "Strict", the cookie will only be sent along with "same-site" requests. the requests from the same domain in which the cookie is set
If the value is "Lax", the cookie will be sent with same-site requests, and with "cross-site" top-level navigation's. The requests from the same domain in which the cookie is set also the top-level navigation's that changes the browser URL
If the value is "None", the cookie will be sent with same-site and cross-site requests but the cookie should be secure (secure flag in the cookie) – Cookie will be sent in all the cases
If the "SameSite" attribute is missing, the attribute's value will be treated as "Lax".

Рекомендации по теме
Комментарии
Автор

@Tech Forum Nice Explanation..I have a doubt ..Consider I have SSO enabled..And I have been logged into an application as of now using SSO..Now I'm navigating to an other application (automatically logs in using SSO)..How will this behave now with and without Same site Attribute?

dayashri
Автор

Nice Explanation but the github code does not work on local, cookie value is not printed and not set in the browser.

KushalBhatia
Автор

Hi thanks for the explanation can i get the source code link

mazheradvise
Автор

Thank you so much. Your explanation is very very good. I understand very clearly. I downloaded your java source code and ran using eclipse. But I am not able to run https. It's asking for a certificate. I created but not working. Could you please guide me, how you are created or please create a video for https certificate. This will helpfull all peoples.

Asthra_Happy_Music
Автор

hi, it possible to share that java servlet code?

KannanJaganath