-
Notifications
You must be signed in to change notification settings - Fork 69
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
#483 Jwt Cookie set with SameSite=Strict #486
Conversation
The request to /bdk/v1/app/auth appears to be vulnerable to cross-site request forgery (CSRF) attacks against authenticated users. The request can be issued cross-domain. The BDK relies solely on HTTP cookies to identify the user that issued the request. The request performs some privileged action within the application, which returns a token. The attacker can determine all the parameters required to construct a request that performs the action. If the request contains any values that the attacker cannot determine or predict, then it is not vulnerable. Setting the SameSite=Strict will prevent sending the cookie when the request is done from another domain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
Isn't it going to break https://perzoinc.atlassian.net/browse/APP-3271 ? |
IMHO, what we did in the APP-3271 is not the right way to perform the cross-site call in security sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Does someone remember why we set the userJwt cookie in the first place by the way? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution :)
For "backward compatibility" I'd say. User session could also be stored in local storage though, however cookies are stored automatically and therefore doesn't require any additional code on client side. |
@symphony-hong, sorry I forgot to tell you, but could you backport this change to |
* EIS-2766: Jwt Cookie set with SameSite=Strict The request to /bdk/v1/app/auth appears to be vulnerable to cross-site request forgery (CSRF) attacks against authenticated users. The request can be issued cross-domain. The BDK relies solely on HTTP cookies to identify the user that issued the request. The request performs some privileged action within the application, which returns a token. The attacker can determine all the parameters required to construct a request that performs the action. If the request contains any values that the attacker cannot determine or predict, then it is not vulnerable. Setting the SameSite=Strict will prevent sending the cookie when the request is done from another domain. * Make sameSite attribute configurable with default value = Strict
* EIS-2766: Jwt Cookie set with SameSite=Strict The request to /bdk/v1/app/auth appears to be vulnerable to cross-site request forgery (CSRF) attacks against authenticated users. The request can be issued cross-domain. The BDK relies solely on HTTP cookies to identify the user that issued the request. The request performs some privileged action within the application, which returns a token. The attacker can determine all the parameters required to construct a request that performs the action. If the request contains any values that the attacker cannot determine or predict, then it is not vulnerable. Setting the SameSite=Strict will prevent sending the cookie when the request is done from another domain. * Make sameSite attribute configurable with default value = Strict
Ticket
Closes #483
Description
The request to /bdk/v1/app/auth appears to be vulnerable
to cross-site request forgery (CSRF) attacks against authenticated users.
The request can be issued cross-domain.
The BDK relies solely on HTTP cookies to identify the user that issued the request.
The request performs some privileged action within the application, which returns a token.
The attacker can determine all the parameters required to construct a request that
performs the action. If the request contains any values that the attacker cannot
determine or predict, then it is not vulnerable.
Setting the SameSite=Strict will prevent sending the cookie when the request is done from another domain.
Dependencies
List the other pull requests that should be merged before/along this one.
Checklist