Is server side CORS protection enough to mitigate CSRF attacks against stateless APIs?

Assume an Angular SPA application on www.example.com that works invoking an API over that same domain www.example.com/api/…
The Angular app gets a session cookie and sends it in each API call.
The usual CSRF attack would try to execute a… Continue reading Is server side CORS protection enough to mitigate CSRF attacks against stateless APIs?

The Death and Rebirth of Musashi.js OR How I turned personal failure into better teaching tools.

A little background… As I stood in front of a class of developers trying to explain cross-origin resource sharing (CORS), I knew I wasn’t conveying it well enough for a significant subset of the group. It was Autumn 2017 (not my password at the time, b… Continue reading The Death and Rebirth of Musashi.js OR How I turned personal failure into better teaching tools.

How can the CSRF happen if browsers do not allow cross-origin requests by default? [duplicate]

How can the CSRF happen if browsers do not allow cross-origin requests by default?
Here is a brief CSRF overview, which is relevant for the question. CSRF (i.e. cross-site request forgery) is a type of attack. For the attack to happen, the… Continue reading How can the CSRF happen if browsers do not allow cross-origin requests by default? [duplicate]

CORS: How to Use and Secure a CORS Policy with Origin

CORS (Cross-Origin Resource Sharing) enables resource sharing that pulls data from a lot of different sources. Like any relatively open aspect of the internet, it can be a risk. Learn how to test your web applications to create a secure CORS policy.  Origins and Key Concepts  CORS began as a way to make application resource […]

The post CORS: How to Use and Secure a CORS Policy with Origin appeared first on Security Intelligence.

Continue reading CORS: How to Use and Secure a CORS Policy with Origin

Is it safe to add "Access-Control-Allow-Origin:*" to an API endpoint with custom authentication via header?

Lets say I have a site at myapp.com that talks to the api at myapi.com. For that to work I have to turn on CORS. I want to do it like that:
Access-Control-Allow-Origin: *
and my API authentication is performed via a custom Authorize header… Continue reading Is it safe to add "Access-Control-Allow-Origin:*" to an API endpoint with custom authentication via header?