Why SetCookie’s SameSite directive applies the destination rather than the origin?

I understand that the SameSite directive tries to protect against cross-origin leakages and CSRFs (see OWASP), but I don’t get why (on my browser at least) it applies to the cookie’s destination rather than on the client’s origin. As a con… Continue reading Why SetCookie’s SameSite directive applies the destination rather than the origin?

Do best practices eliminate the need for a CSRF token when writing an API server?

I realize that OWASP recommends CSRF tokens but I rarely see them used with public standalone HTTP APIs. This would seem to indicate that they’re not always necessary.

To make this a little more concrete, I would envision the following sc… Continue reading Do best practices eliminate the need for a CSRF token when writing an API server?

Do best practices eliminate the need for a CSRF token when writing an API server?

I realize that OWASP recommends CSRF tokens but I rarely see them used with public standalone HTTP APIs. This would seem to indicate that they’re not always necessary.

To make this a little more concrete, I would envision the following sc… Continue reading Do best practices eliminate the need for a CSRF token when writing an API server?