Skip to content

feat(ai): authenticate proposal APIs with signed context - #110

Closed
seonghobae wants to merge 13 commits into
mainfrom
feat/ai-signed-gateway-context
Closed

feat(ai): authenticate proposal APIs with signed context#110
seonghobae wants to merge 13 commits into
mainfrom
feat/ai-signed-gateway-context

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Superseded

Closed in favor of #109, which was opened first and covers the same trust-boundary slice with the stronger required contract: authenticated identity-session derivation, a same-origin web BFF, and signatures bound to HTTP method and exact upstream path.

The implementation work will continue on #109 to avoid parallel conflicting security boundaries.

Refs #108, #46, and #21.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b5366d47-05bc-46c9-8267-9a8aac89c34d

📥 Commits

Reviewing files that changed from the base of the PR and between f477ce8 and bc60d44.

📒 Files selected for processing (10)
  • .env.example
  • CHANGELOG.md
  • apps/ai-service/package.json
  • apps/ai-service/src/gateway-context-http.integration.test.ts
  • apps/ai-service/src/gateway-context.test.ts
  • apps/ai-service/src/gateway-context.ts
  • apps/ai-service/src/main.ts
  • apps/ai-service/src/no-silent-mutation.integration.test.ts
  • apps/ai-service/src/proposal-audit-http.integration.test.ts
  • docs/superpowers/plans/2026-08-04-ai-signed-gateway-context-slice.md

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

@seonghobae seonghobae closed this Aug 4, 2026
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
import { AiAppModule } from './main';

const GATEWAY_SECRET = '0123456789abcdef0123456789abcdef';
type TrustedAiContextHeaders,
} from './gateway-context';

const SECRET = '0123456789abcdef0123456789abcdef';
const ACTOR_ID = 'd19b6077-2baa-4f84-97f6-c138b1d6ba34';
const TASK_ID = 'e29c36af-999a-407f-9ca9-cfe194ab51f4';
const PROPOSAL_ID = 'aedcb1d1-cc60-42c6-9357-ec90821fce1b';
const GATEWAY_SECRET = '0123456789abcdef0123456789abcdef';
actorId: string,
issuedAt = String(Math.floor(Date.now() / 1000)),
): Readonly<Record<string, string>> {
const signature = createHmac('sha256', GATEWAY_SECRET)
/** Signs the authenticated actor and workspace context used by the AI boundary. */
function signedContextHeaders(): Readonly<Record<string, string>> {
const issuedAt = String(Math.floor(Date.now() / 1000));
const signature = createHmac('sha256', GATEWAY_SECRET)
actorId: string,
): Readonly<Record<string, string>> {
const issuedAt = String(Math.floor(Date.now() / 1000));
const signature = createHmac('sha256', TEST_GATEWAY_CONTEXT_SECRET)
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.

2 participants