COOP

Cross-Origin-Opener-Policy

COOP(Cross-Origin-Opener-Policy)는 top-level document가 cross-origin 상태의 document와 browsing context group을 공유하지 못하도록 제한하는 보안 정책이자 헤더입니다. 이러한 헤더는 document를 격리시켜 XS-Leaks 같은 공격을 통해 document 내부를 엑세스할 수 없도록 제한합니다.

Response를 통해 CSP와 같이 정책을 내려주게 되면, 웹 브라우저는 해당 페이가 격리 대상(Site Isolation 또는 Process Isolation)으로 판단하여 top-level document에서 접근하지 못하도록 제한합니다.

Cross-Origin-Opener-Policy: unsafe-none | same-origin-allow-popups | same-origin

추가로 COOP가 사용되면 Cross origin 상태의 새 창이 열렸을 때 window.openernull로 처리되어서 reverse tabnabbing과 같은 공격에도 대응이 가능합니다.

Directives

Directive Description
unsafe-none same origin 또는 아래 SOAP 헤더가 없는 경우에 browsing context group에 document를 추가할 수 있도록 허용합니다. (cross origin이나 soap가 없으면 격리)
same-origin-allow-popups COOP가 설정되지 않았거나 안전하지 않은 COOP를 설정하여 분리되지 않은 새로 열린 창 또는 탭에 대한 참조를 유지합니다.
same-origin same origin만 허용합니다.

References