fix(security): reject missing tenant authority at submission boundary - #346
fix(security): reject missing tenant authority at submission boundary#346seonghobae wants to merge 5 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough
Changes테넌트 권한 검증
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to This change rejects submissions without tenant authority before any validation or downstream processing, preventing unintended demo-authority use. No actionable merge-blocking risk remains beyond normal checks and independent review. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
Superseded by current-main replacement #438. The replacement preserves this PR's three-file fail-closed tenant-aware submission semantic delta on protected |
Pull request was closed
Objective
Advance issue #317 with one path-local production security boundary: the tenant-aware service entrypoint must fail closed when authenticated tenant context is absent instead of silently manufacturing
buyer-demoauthority and continuing validation, deduplication, persistence, artifact work, and enqueue.Fresh exact state — 2026-08-10
d4a59a72b485b76c7870770ca69c6963bc8346c1;main:55d7ae8647208e301f282350f076eeddaba61d11;31404369157: success;31404368715: success;31404369100: success;31404369115: success;d4a59a72b485b76c7870770ca69c6963bc8346c1; 497 tests ran with 0 failures, 0 errors and 0 skips; all JaCoCo coverage checks and public Javadocs passed;Test-first evidence
RED
Test-only head
d6a6729d21fd2c0adc876b2b89bb5991c4d086b0added a focused regression around the three-argument tenant-awaresubmit(...)service boundary before production changes. Exact-head CI31403123801checked out that exact SHA and failed one of 497 tests. Instead of the required controlledIllegalArgumentException("tenant context is required"), protected-main behavior continued through the null-context demo fallback and eventually produced aNullPointerExceptionwhen the mocked repository returned no canonical result. That proved the service crossed validation/repository boundaries after authority was absent. Security Scan, Semgrep and fuzz were already GREEN on the RED head.GREEN
The tenant-aware three-argument
submit(...)now rejects a nullTenantContextimmediately, before policy validation, hashing, deduplication, persistence, PDF artifact seeding or enqueue. The two-argument demo convenience overload remains explicit and continues to construct its own demoTenantContext; this slice therefore removes only the unsafe implicit null-to-demo escalation from the production tenant-aware boundary.Focused GREEN tests prove:
IllegalArgumentException("tenant context is required");The unchanged exact head is GREEN through the full Maven lifecycle, synthetic-main merge compatibility, security scan, Semgrep and fuzz.
Scope boundary
This does not remove the legacy two-argument demo convenience overload, redesign browser/session bootstrap, modify
viewer.js,demo.jsordom-utils.js, implement OIDC/JWT federation, or touch active Office adapter #306. It is a narrow fail-closed prerequisite for issue #317's broader production workspace authority work and does not claim that demo authority has been fully removed.Merge gate
Move to Ready for ordinary independent review. Keep this exact head unchanged. Merge or auto-merge may complete only after live protection still sees all applicable required gates passing, zero valid unresolved findings, and any required qualifying independent non-author approval. Automated evidence is not approval.
Summary by CodeRabbit