Repository navigation
Remove critical security stubs #279 #302: 2PC phase-2 fanout + voice API JWT validation - #5490
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Remove critical legacy security and consistency stubs
Remove critical security stubs #279 #302: 2PC phase-2 fanout + voice API JWT validation
Jun 30, 2026
makr-code
marked this pull request as ready for review
June 30, 2026 05:33
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.
Pull Request
Description
Issue: Stub #279 left remote 2PC participants in PREPARED state when phase-2 RPC transport was missing. Stub #302 accepted any non-empty bearer token without JWT/OIDC validation.
Solution: Replaced both stubs with production-grade implementations enforcing fail-closed, security-first behavior.
Changes
Stub #279 — Distributed Transaction Manager (Phase-2 Remote Decision Fanout)
remote_phase1_dispatchis configured, phase-2 RPC transport (phase2_rpc_fn,remote_phase2_dispatch, orgetRpcPhase2Fn()) MUST existstd::invalid_argumentat startup on misconfiguration (fail-fast)Stub #302 — Voice API Handler (**** Validation)**
setTokenValidatorFn(TokenValidatorFn)for production JWT/OIDC validatorsfalse(fail-closed); exceptions caught and converted to rejectionExample Usage (Stub #302)
Type of Change
Breaking Change Checklist
VERSIONandCMakeLists.txtdocs/migration/### Removed/### Changedsection updatedMigration Impact: Deployments using
remote_phase1_dispatchwithout phase-2 RPC transport will fail at startup. This is intentional — phase-1 remote dispatch without phase-2 decision fanout violates 2PC semantics and can leave remote participants in PREPARED state indefinitely. Operators must explicitly configure phase-2 RPC bridge (via config orgetRpcPhase2Fn()) or disable remote phase-1 dispatch.Testing
Test Coverage: 12 comprehensive test cases in
tests/security/test_stub_279_302_remediation.cppSecurity Tiering Impact (Required for Runtime Changes)
Impacted tier(s):
Trust-boundary crossings documented in PR description
Boundary controls validated for affected T3/T4/T5 paths
Boundary-focused tests added/updated
If trust level/privilege increased, security maintainer approval is attached
📚 Research & Knowledge
N/A: Remediation addresses known stubs; no new research basis required.
AI-Generated Code
GetSymbolReferences_CppToolsgeprüftnew/deleteohne explizites Review eingeführtDetails: All changes use RAII patterns (lock_guard for mutex), no manual memory management, exception-safe try-catch blocks. Thread safety verified via static mutex protection in Stub #302. No performance-critical hotpaths modified.
AI Review Workflow
setTokenValidatorFn)Review Findings Summary:
Release Readiness Gate
BRANCHING_STRATEGY.mdandRELEASE_STRATEGY.mdVERSIONING.mdandCHANGELOG.mdBranch Scope: Changes target
developbranch (canonical development). Breaking change (T1 & T3 security tier) requires MAJOR version and release gate review.Checklist
[Unreleased]Scanner and IntelliSense Gates
criticalfindings in security/consistency categorieshighfindings (CodeQL database skipped per repository baseline)legacy_or_compat_pathto production implementationunknownscanner findings triaged (none introduced)Evidence: