fix(security): replace stream URL JWTs with one-time grants - #513
Draft
seonghobae wants to merge 9 commits into
Draft
fix(security): replace stream URL JWTs with one-time grants#513seonghobae wants to merge 9 commits into
seonghobae wants to merge 9 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
marked this pull request as ready for review
August 15, 2026 21:10
seonghobae
marked this pull request as draft
August 16, 2026 08:11
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.
Buyer/security outcome
Refs #413. This stacked slice replaces the browser realtime stream's broad session-JWT query credential with a short-lived, one-time, project-bound opaque
streamgrant. Calendar subscription credentials remain separate because they require a durable rotation/revocation lifecycle rather than a one-time connection grant.Exact current stack
Current base:
fix/attachment-view-grant-runtime-413@f2b08715663946405719f742f2f5597a4f45ee4a(#512).Current contributor head:
7717f4401e84a81a40f25d79e236628d60b22b6d.Fresh parent→child comparison is ahead-only, zero-behind, and limited to nine realtime client/security gateway, focused API/unit regression, test-registration, and doctoring paths. The current parent attachment-view grant runtime, SQLite persistence/audit evidence, Microsoft Project XML hardening, and protected security documentation remain unchanged.
Implemented contract
Authorization: Bearerheader onPOST /api/projects/:id/access-grantswith{ purpose: "stream" };grantand no session JWT or legacytokenparameter;private, no-store,no-referrer, andnosniffwhile preserving the connected preamble and project-update fan-out;TDD and parent reconciliation
The stream runtime was built test-first: the missing-module contract preceded implementation, focused fan-out and revocation assertions were strengthened before the production gateway, and stale broad-JWT smoke expectations were removed only after the scoped path existed.
After #512 advanced, this branch was reconciled semantically onto its exact current parent. The parent-only Microsoft Project XML hardening lives in
cloud-sync-core.js, security/doctoring, changelog, and parser regression paths that this child does not own; those parent versions are carried unchanged. The nine-file parent→child diff therefore contains only the stream-grant slice and cannot silently revert the attachment or XML-import security boundaries.Current exact-head evidence
All predecessor-head CI/review evidence is historical. Fresh exact-current-head evidence for
7717f4401e84a81a40f25d79e236628d60b22b6dis authoritative and non-passing until terminal. This PR remains Draft until every applicable repository and organization check succeeds, owned coverage/docstrings are established, valid findings are zero, and qualifying independent current-head/last-push approval exists.Standards and rollback
docs/doctoring/stream-access-grant-runtime.mdrecords the transport threat, staged gateway boundary, acceptance/rollback conditions, and APA 7 references to final RFC 6750 and RFC 9700. RFC 10017 publication-transition material is treated only as supplementary research because authoritative publication surfaces were not yet internally consistent when this slice was documented.Rollback must not represent broad JWT query transport as a security-safe steady state. If operational rollback becomes necessary, disable the affected browser realtime capability or place it behind a controlled compatibility boundary while restoring the scoped-grant path.
Integration boundary
Do not integrate independently of #512, which depends on #510 and #506. After the prerequisite stack reaches protected
develop, reconcile this semantic slice onto the resulting live protected head and require every applicable exact-head repository/organization CI, browser E2E, owned coverage/docstrings, SAST/security/dependency/supply-chain gate, zero valid unresolved findings, and one qualifying current-head/last-push independent approval under the live rulesets. Predecessor-head, skipped-required, neutral, status-only, synthetic, or model-only evidence does not transfer.