Repository navigation
Conversation
Hono 移行から約 10 ヶ月経ち、旧形式のまま残っている利用者はほぼいない。 署名が不正な Cookie は 400 を返さず、新しい browserId を発行して置き換える (旧形式が残っている人が Cookie を消すまで使えなくなるのを避ける)。 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
COOKIE_SECRET で検証できなければ COOKIE_SECRET_PREVIOUS(カンマ区切り)の鍵を順に試し、 再発行は常に現行の鍵で行う。どの鍵でも検証できない Cookie は警告ログを残して新規発行する。 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cookie が無い場合だけ新規発行し、どの鍵でも検証できない Cookie は拒否する (従来の挙動に戻す)。c236557 のメッセージにある「新規発行で置き換える」は取り消し。 警告ログは鍵の設定ミスに気づけるよう残す。 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v2 設計の M1 のうち「Express 形式 Cookie の削除・依存更新」(1/3)。ユースケース層とテスト基盤は別 PR。
c236557Express 形式の検証とnode:cryptoの import を削除f7f3717依存を semver 範囲内で更新 (package-lock.jsonのみ)af34310署名鍵のローテーション対応 (COOKIE_SECRET_PREVIOUS、カンマ区切り)206b40fserver/.env.sampleにPORTとCOOKIE_SECRET_PREVIOUSを追加し、各変数に説明を付けるEvidence
テストはまだ無い (PR 2 でテスト基盤を入れた後に追加する)。ローカルでサーバーを起動して
curlで確認した。鍵のローテーション:
npm run checkとcd server && npm run buildは通る。Merge Danger
Door: two-way (コードは戻せる)
署名が不正な Cookie の扱いは変わらない (400)。変わるのは Express 形式の Cookie が 400 になる点だけ。Hono 移行から約 10 ヶ月経ち、残っている利用者はほぼいない想定。
Blast Radius: browserId
COOKIE_SECRETは変えないので、既存の有効な Cookie には影響しない。環境変数の追加は不要 (COOKIE_SECRET_PREVIOUSは省略可)。COOKIE_SECRET_PREVIOUSを入れ忘れると、既存の Cookie を持つ全員が 400 になる。手順は.local/docs/v2設計.md§3.1。🤖 Generated with Claude Code