Skip to content

fix(web): require authentication for AskGH Ask APIs - #1678

Closed
msukkari wants to merge 2 commits into
mainfrom
michael/sou-2308-auth-gate-the-streaming-blocking-ask-api-for-public-cd97
Closed

msukkari wants to merge 2 commits into
mainfrom
michael/sou-2308-auth-gate-the-streaming-blocking-ask-api-for-public-cd97

Conversation

@msukkari

@msukkari msukkari commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Require authentication for streaming and blocking Ask requests when EXPERIMENT_ASK_GH_ENABLED=true, returning HTTP 401 before entitlement checks or generation. The blocking gate lives in askCodebase, covering MCP callers too; existing anonymous access behavior is preserved when AskGH is disabled.

Verified with eight endpoint regression cases covering authenticated/anonymous requests with AskGH enabled/disabled, plus targeted ESLint.


Summary by cubic

When EXPERIMENT_ASK_GH_ENABLED is enabled, streaming and blocking Ask requests now require authentication and return HTTP 401 before entitlement checks or generation.

  • Gates the blocking path in askCodebase, which also covers the MCP ask_codebase tool and the /api/chat/blocking route.
  • Preserves anonymous access when AskGH is disabled.
  • Adds regression tests for both endpoints covering authenticated and anonymous requests with the flag on and off.

Written for commit 690d684. Summary will update on new commits.

Review in cubic

msukkari and others added 2 commits September 22, 2026 04:14
Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@msukkari

Copy link
Copy Markdown
Contributor Author

Closing in favor of the Cursor cloud agent PR #1679 for SOU-2308.

@msukkari msukkari closed this Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant