Same-Origin Policy
동일 출처 정책
동일 출처 정책은 브라우저 안전 규칙입니다. 이것은 한 출처의 페이지나 스크립트가 다른 출처의 데이터를 읽거나 처리할 수 있는 방식을 제한합니다.
다른 예시
`reports.example`의 스크립트는 `mail.example`의 사용자의 받은편지함을 읽을 수 없습니다. 브라우저는 여전히 그곳에 쿠키를 보낼 수 있습니다. 계획된 교차 출처 Analytics API는 정확히 하나의 `Access-Control-Allow-Origin`을 반환하며 인증 정보를 포함하지 않습니다. 윈도우 메시지는 `event.origin`과 메시지 형식을 확인한 후에만 수락됩니다.
주요 부분
- 01소스 출처
- 02대상 출처 및 리소스
- 03읽기/상호 작용 제한 또는 명시적 부여
사용할 때
각 출처를 기본 브라우저 안전 경계로 간주하십시오. 공유가 필요할 때는 최소 권한으로 명확한 CORS 또는 `postMessage` 접근을 만듭니다.
다음 경우에는 사용하지 마세요
SOP는 모든 교차 사이트 요청, 내비게이션, 임베딩, CSRF 또는 사이드 채널을 차단하지 않습니다. 주된 역할은 읽기 및 상호 작용을 제한하는 것입니다.
코드에서 사용된 이름
origin tuple (scheme, host, port) + controlled CORS/postMessage exceptions 출시하기 전에
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome:Complete the task with 동일 출처 정책 (Same-Origin Policy)。 User context:`reports.example`의 스크립트는 `mail.example`의 사용자의 받은편지함을 읽을 수 없습니다. 브라우저는 여전히 그곳에 쿠키를 보낼 수 있습니다. 계획된 교차 출처 Analytics API는 정확히 하나의 `Access-Control-Allow-Origin`을 반환하며 인증 정보를 포함하지 않습니다. 윈도우 메시지는 `event.origin`과 메시지 형식을 확인한 후에만 수락됩니다. Technical concept or control:동일 출처 정책 (Same-Origin Policy)。 Why it fits:각 출처를 기본 브라우저 안전 경계로 간주하십시오. 공유가 필요할 때는 최소 권한으로 명확한 CORS 또는 `postMessage` 접근을 만듭니다. Do not use it when:SOP는 모든 교차 사이트 요청, 내비게이션, 임베딩, CSRF 또는 사이드 채널을 차단하지 않습니다. 주된 역할은 읽기 및 상호 작용을 제한하는 것입니다. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary):이 표준은 나열된 범위만 적용합니다. 시각적 스타일, 제품 결정, 또는 Vibulary 예시는 선택하지 않습니다. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
이 요청을 확인하세요
Review how 동일 출처 정책 (Same-Origin Policy) is used now. Definition: 동일 출처 정책은 브라우저 안전 규칙입니다. 이것은 한 출처의 페이지나 스크립트가 다른 출처의 데이터를 읽거나 처리할 수 있는 방식을 제한합니다. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.