fix(sessions): re-enable v2 shared session access - #5300
Conversation
Restore /s/{public_id} and the public ingest lookup after existing
public_ids were exported and nulled. Leave legacy /share pages disabled.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the incremental commits converting v2 session sharing from plain Files Reviewed (26 files)
Previous Review Summaries (2 snapshots, latest commit cae27fa)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit cae27fa)Status: No Issues Found | Recommendation: Merge Executive SummaryReviewed the incremental commits converting v2 session sharing from plain Files Reviewed (26 files)
Previous review (commit e8d95aa)Status: No Issues Found | Recommendation: Merge Reviewed the re-enablement of v2 shared session access: the Files Reviewed (3 files)
Reviewed by kimi-k3 · Input: 91.3K · Output: 7.7K · Cached: 600.6K Review guidance: REVIEW.md from base branch |
Replace public_id lookups with purpose-bound share tokens issued by
session-ingest. Shared pages resolve metadata through the worker, and
PostHog/Sentry redact /s/{token} paths.
Fail closed before the database lookup when the JWT jti is missing or empty.
Stop recording on /s/* and block share-URL nodes so JWT credentials are not captured in DOM snapshots.
Summary
public_ids were nulled in production/s/{public_id}URLs with purpose-bound HS256 JWT share tokens (/s/{share_token})/share/{shareId}404s in placeHow it works
public_idoncli_sessions_v2. session-ingest signs a JWT with that UUID asjti, the session id assub, issuerkilo-session-ingest, audiencekilo-session-sharepublic_idstill matchesjti(unshare / rotate invalidates old links)iatbeforeSESSION_SHARE_TOKEN_MIN_IATare rejected, so we can globally invalidate every share issued before a given unix timestamp without rotating the signing secret$pageviewon/s/*; PostHog and Sentry redact path tails to/s/:share_tokenVerification
pnpm --filter cloudflare-session-ingest testpnpm --filter kilo-appsession share / analytics tests