Understanding The Web Security Model, Part IV: Cross-Origin Resource Sharing (CORS)
This is part IV of my series on the Web security model (parts I, II, outtake, III). In this post, I cover cross-origin resource sharing (CORS), a mechanism for reading data from a different site. As discussed in part III, the Web security model allows sites to import content from another site but generally isolates that content from the importing site. For instance, example.com can pull in an image in from some example.net and display it to the user, but it can't access the contents of the image. This is a necessary security requirement because it prevents attackers from exploiting ambient authority to access sensitive data but it also prevents legitimate uses for cross-origin data, such as a cross-origin API. Consider the case where there is a Web service that has an API, like Wikipedia or Bugzilla, and you want to write a Web application which takes advantage of that API. For instance, suppose I have a little Web service which lets you get the weather at a specific location indicated
Understanding The Web Security Model, Part IV: Cross-Origin Resource Sharing (CORS) Posted by ekr on 19 Apr 2022 This is part IV of my series on the Web security model (parts I , II , outtake , III ). In this post, I cover cross-origin resource sharing (CORS) , a mechanism for reading data from a different site. As discussed in part III , the Web security model allows sites to import content from another site but generally isolates that content from the importing site. For instance, example.com can pull in an image in from some example.net and display it to the user, but it can't access the co
saved by
related reading
- Understanding The Web Security Model, Part III: Basic Principles and the Origin Concepteducatedguesswork.org
- What is CORS? Complete Tutorial on Cross-Origin Resource Sharingauth0.com
- Introduction to CORS for Go programmers - Eli Bendersky's websiteeli.thegreenplace.net
- Developers don't understand CORSfosterelli.co
- Mediumranashreyas.medium.com
- Same-Origin Policytextbook.cs161.org
- Cross-Site Request Forgery (CSRF) | Computer Securitytextbook.cs161.org
- All learning materials - detailed | Web Security Academyportswigger.net
- Cross-Site Scripting (XSS) | Computer Securitytextbook.cs161.org
- Why We Don’t Trust the Database With Authentication – Sturdy Statisticsblog.sturdystatistics.com
- Timing-Allow-Origin header - HTTP | MDNdeveloper.mozilla.org
- RFC 9700: Best Current Practice for OAuth 2.0 Securitydatatracker.ietf.org