Same-origin policy
The same-origin policy limits browser access between different origins. A different page path alone does not create a new origin.
The same-origin policy, or SOP, is a browser security rule. It restricts how a document or script can interact with resources from another origin. For ordinary web addresses, the origin is determined by scheme, hostname and port. This separates content belonging to different websites.
Distinguish a path change from an origin change
A fictional portal uses https://portal.example/overview and https://portal.example/settings. Both addresses have the same origin: only the path differs. The API at https://api.example/projects has a different hostname and therefore a different origin. No requests were sent to these example addresses.
Sharing an origin does not mean that every signed-in person may use all projects or settings. The application must still check that itself.
A request does not always mean read access
The SOP does not block every request to another origin. Depending on its type, a request can be sent while the script is not permitted to read the response. MDN therefore distinguishes sending, embedding and reading, among other interactions.
Through CORS, the target server can specify which other origins may access responses in the browser. This permission replaces neither authentication nor authorisation checks on the server. Browser isolation and access to business data remain different tasks.
Sources
Related terms
- APIAn API defines how software can use functions or data offered by other software.
- FrontendThe frontend is an application’s user-facing interface. Helpful browser feedback does not replace authoritative server-side checks.
- Cross-site request forgery (CSRF)CSRF exploits a signed-in session for an unwanted request. A session cookie alone does not prove that the user intended the action.
- Data minimisationData minimisation limits personal data to what is adequate, relevant and necessary for a defined purpose.
- Data retention policyA data retention policy defines the purpose, start, duration and end of storage. Deletion jobs and copies must be addressed in the implementation.
- Envelope encryptionEnvelope encryption separates the data key from the key protecting it. The encrypted file and wrapped data key need to be managed together.
Your project with ASES
Describe your project to us. We will get back to you with an initial assessment.