Secure Cookie Attributes
보안 쿠키 속성
보안 쿠키 속성은 쿠키가 전달되는 방식과 스크립트가 읽을 수 있는지를 제어합니다. 또한 교차 사이트 사용, 어떤 호스트와 경로가 쿠키를 받는지, 그리고 얼마나 오래 지속되는지도 제어합니다.
다른 예시
응답은 `Domain` 없이 `Secure; HttpOnly; SameSite=Lax; Path=/`로 `__Host-session`을 설정한 후, 로그인 후 변경합니다. 제3자 결제 반환은 자체 제한된 상관 쿠키를 사용합니다. 이는 모든 세션 쿠키를 약화시키지 않습니다. 로그아웃 시 서버 세션도 종료됩니다.
주요 부분
- 01이름 접두사와 값
- 02전송/스크립트/사이트 제한
- 03범위 및 수명
사용할 때
쿠키에 가장 작은 유용한 범위와 수명을 부여하세요. 세션 쿠키는 일반적으로 `Secure`, `HttpOnly`, 선택한 `SameSite` 모드, 그리고 호스트 접두사를 사용해야 합니다.
다음 경우에는 사용하지 마세요
`Path`는 보안 방벽이 아닙니다. 필요 없이 넓은 `Domain`을 설정하거나 스크립트에서 읽을 수 있는 쿠키에 bearer 비밀을 넣지 마세요. `SameSite=None`을 `Secure` 없이 절대 사용하지 마세요.
코드에서 사용된 이름
Set-Cookie: __Host-name=…; Secure; HttpOnly; SameSite=Lax/Strict; Path=/; Max-Age=… 출시하기 전에
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 보안 쿠키 속성 (Secure Cookie Attributes)。 User context:응답은 `Domain` 없이 `Secure; HttpOnly; SameSite=Lax; Path=/`로 `__Host-session`을 설정한 후, 로그인 후 변경합니다. 제3자 결제 반환은 자체 제한된 상관 쿠키를 사용합니다. 이는 모든 세션 쿠키를 약화시키지 않습니다. 로그아웃 시 서버 세션도 종료됩니다. Technical concept or control:보안 쿠키 속성 (Secure Cookie Attributes)。 Why it fits:쿠키에 가장 작은 유용한 범위와 수명을 부여하세요. 세션 쿠키는 일반적으로 `Secure`, `HttpOnly`, 선택한 `SameSite` 모드, 그리고 호스트 접두사를 사용해야 합니다. Do not use it when:`Path`는 보안 방벽이 아닙니다. 필요 없이 넓은 `Domain`을 설정하거나 스크립트에서 읽을 수 있는 쿠키에 bearer 비밀을 넣지 마세요. `SameSite=None`을 `Secure` 없이 절대 사용하지 마세요. 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):공식 문서라고 해도 초안, 출시 후보, 최종 버전일 수 있어요. 상태와 브라우저나 플랫폼 지원 여부를 꼭 확인하세요. 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 보안 쿠키 속성 (Secure Cookie Attributes) 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.