fix: transport, session, and resource hardening consistency for RC2 - h-batch-2#3106
Merged
crivetimihai merged 7 commits intomainfrom Feb 22, 2026
Merged
fix: transport, session, and resource hardening consistency for RC2 - h-batch-2#3106crivetimihai merged 7 commits intomainfrom
crivetimihai merged 7 commits intomainfrom
Conversation
Align websocket token handling, session ownership checks, resource visibility enforcement, and roots permission consistency for C-04 C-07 C-11 C-14 C-28 C-29. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Document C-04 C-07 C-11 C-14 C-28 C-29 behavior changes and breaking-change migration guidance under 1.0.0-RC2. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Add missing Args/Returns/Raises docstrings for helper methods and nested search/session owner helpers to satisfy flake8 DAR rules and interrogate coverage. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Use atomic owner claim for initialize, distinguish missing session from unverifiable owner metadata on message ingress, add defensive team-access guard, and extend regression coverage. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Return unverifiable state when Redis ownership backend is unavailable and extend backend coverage for owner claim/session existence behavior. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Add backend-specific session owner claim/existence tests and helper-path regressions to reach 100% diff coverage for new hardening code. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
vishu-bh
pushed a commit
that referenced
this pull request
Feb 24, 2026
… h-batch-2 (#3106) * fix: session and resource access hardening and behavior consistency Align websocket token handling, session ownership checks, resource visibility enforcement, and roots permission consistency for C-04 C-07 C-11 C-14 C-28 C-29. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * docs: rc2 changelog hardening and migration clarity Document C-04 C-07 C-11 C-14 C-28 C-29 behavior changes and breaking-change migration guidance under 1.0.0-RC2. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * chore: docstring lint compliance and coverage consistency Add missing Args/Returns/Raises docstrings for helper methods and nested search/session owner helpers to satisfy flake8 DAR rules and interrogate coverage. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: session ownership claim hardening and auth semantics Use atomic owner claim for initialize, distinguish missing session from unverifiable owner metadata on message ingress, add defensive team-access guard, and extend regression coverage. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Update pylint Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: distributed owner-claim fail-closed semantics Return unverifiable state when Redis ownership backend is unavailable and extend backend coverage for owner claim/session existence behavior. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * test: expand hardening regression and diff coverage Add backend-specific session owner claim/existence tests and helper-path regressions to reach 100% diff coverage for new hardening code. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Mihai Criveti <crivetimihai@gmail.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
This PR completes RC2 hardening updates for transport auth, session ownership, resource visibility scoping, and roots authorization consistency.
Hardening Items Completed
Authorization); query-token auth is no longer accepted./message,/servers/{id}/message) now enforces owner/admin authorization.initializenow uses atomic session-owner claim semantics to prevent concurrent ownership races.resources/subscribenow enforces visibility before persisting subscriptions; deny paths return consistent permission errors.list_roots,roots/list).Additional Hardening/Consistency
404)403, fail-closed)