fix(web): auth gate Ask APIs for Public SaaS - #1679
Conversation
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughWhen ChangesAsk API authentication
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The streaming and blocking Ask APIs enforce the intended authentication requirement when the experiment is enabled. No merge-blocking issue was identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Fixes SOU-2308
Require authenticated users for the streaming and blocking Ask APIs when
EXPERIMENT_ASK_GH_ENABLEDis enabled, while preserving anonymous Ask behavior for self-hosted deployments. The auth override is checked inline at the Ask and MCP HTTP entry points.Conflict resolution:
CHANGELOG.mdconflict by preserving the entries from both branches.main's non-conflicting removal of the obsolete Ask tutorial/example-query assets and UI.Validation:
.next/**excluded from Vitest discovery)/api/chat/blockingand/api/ee/chatrequests returned 401NOT_AUTHENTICATEDLinear Issue: SOU-2308
Summary by cubic
Requires authenticated users for the streaming and blocking Ask APIs and the MCP
ask_codebasetool whenEXPERIMENT_ASK_GH_ENABLEDis enabled, fixing SOU-2308. Anonymous Ask access is unchanged for self-hosted deployments.401(NOT_AUTHENTICATED) service error via an inlined boolean gate at each entry point.Written for commit 1daff8a. Summary will update on new commits.
Summary by CodeRabbit