Repository navigation
Enforce server-side ownership and session authorization (#708) - #711
Merged
Merged
Conversation
federerl
reviewed
Nov 12, 2026
federerl
left a comment
Collaborator
There was a problem hiding this comment.
Review of the ownership/session-authorization changes. Comments 1-4 look like regressions introduced by this PR and are worth resolving before merge; 5-7 are authorization gaps that remain; 8-10 are duplication cleanups. These come from reading the diff, not from running the code.
rhit-mathewjl
approved these changes
Nov 12, 2026
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
Several existing Server Actions and experiment/file routes trusted caller-supplied identity or role fields, or lacked ownership checks at the server boundary. This change derives authorization from the existing Web session or authenticated CLI identity, rejects unauthorized operations before database writes or backend dispatch, and preserves legitimate owner and shared-reader workflows.
Refs #708. This covers the agreed application authorization scope; it does not close the broader issue.
Changes
Collaborator review follow-up
Reviewed all ten comments from the review on
df66d89.54d2183are preserved in the dependent branches.Independent review also identified a replacement-event revocation gap in the listener's watch filter. The filter now includes replacements, and a pipeline-aware regression verifies that revoked shared rows are discarded. Integration review found that archiving could bypass #712's late-runner-write guard; #712 now excludes both CANCELLED and ARCHIVED records, with regressions for all three archived terminal states, and #714 includes that fix. Independent re-review found no remaining actionable issues in these changes.
Validation
Review follow-up committed as
d1faa36, against base9861ac0. The following results separate current automated checks from the earlier browser/CLI validation.npm testnpm run type-checknpm run lintThe frontend integration suites used a credential-free loopback MongoDB. Targeted regressions reproduced the relevant pre-fix failures. Independent reviews challenged identity resolution, ownership denials, file identity, submission fields, stream ordering, and cleanup races; findings in the reviewed scope were addressed and rechecked.
Hosted results are linked above. Local backend checks used Windows/Python 3.10; local Node 20 type checking and lint passed with 0 errors and 12 existing warnings. All applicable CI checks passed on
d1faa36, including frontend/backend container builds. Runner/documentation builds were skipped by path filters.Local browser verification
Before this review follow-up, two actual signed-in users exercised the local Web app, backend, MongoDB replica set, and Runner. These historical browser checks have not been repeated for
d1faa36:These are Web-to-backend-to-Runner checks, not a live Python CLI end-to-end run. Browser checks did not exercise direct shared-source file-ID downloads, crafted mutation requests, actual session expiry/admin demotion, or SSE query races; those are distinguished from the automated regression coverage. Unfollow tested self-removal from sharing, not owner-forced revocation or share-link invalidation. A shared user's visible Archive button left the original unchanged; no explicit HTTP denial code was captured for that click.
Compatibility and scope