HTTP Cookie
HTTPクッキー
HTTPクッキーは、サーバーまたはスクリプトによって設定される小さな名前と値の項目です。ブラウザは、サイト、パス、寿命、セキュリティに関するルールが許可する場合にのみ、それを返送します。
もう一つの例
セッションIDクッキーは、Secure、HttpOnly、SameSite=Lax、Path=/、有効期限を使用します。ブラウザは一致する場合にのみそれを送信し、ページスクリプトはそれを読むことができません。クッキー自体はサインイン済みセッションではなく、HttpOnlyはすべてのクロスサイトリクエストを阻止するものではありません。
主な部分
- 01名前-値ペア
- 02スコープ属性
- 03ライフタイムとセキュリティフラグ
以下の場合に使用します
ブラウザが明確なスコープルールを持つ少量のHTTPステートを保持する必要がある場合に、この用語を使用してください。
以下の場合は使用しないでください
秘密、大きなデータ、または未チェックのアプリオブジェクトをクッキーに入れないでください。単一のクッキー設定で完全に保護されることはありません。
コードで使用する名前
Set-Cookie: name=value; Secure; HttpOnly; SameSite=Lax 出荷前に
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 HTTPクッキー (HTTP Cookie)。 User context:セッションIDクッキーは、Secure、HttpOnly、SameSite=Lax、Path=/、有効期限を使用します。ブラウザは一致する場合にのみそれを送信し、ページスクリプトはそれを読むことができません。クッキー自体はサインイン済みセッションではなく、HttpOnlyはすべてのクロスサイトリクエストを阻止するものではありません。 Technical concept or control:HTTPクッキー (HTTP Cookie)。 Why it fits:ブラウザが明確なスコープルールを持つ少量のHTTPステートを保持する必要がある場合に、この用語を使用してください。 Do not use it when:秘密、大きなデータ、または未チェックのアプリオブジェクトをクッキーに入れないでください。単一のクッキー設定で完全に保護されることはありません。 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 HTTPクッキー (HTTP Cookie) is used now. Definition: HTTPクッキーは、サーバーまたはスクリプトによって設定される小さな名前と値の項目です。ブラウザは、サイト、パス、寿命、セキュリティに関するルールが許可する場合にのみ、それを返送します。 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.