feat(ai): authenticate proposal audit through signed gateway context - #109
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (23)
📝 WalkthroughWalkthroughAI 제안 요청에 세션 기반 workspace·actor 범위와 단기 HMAC 컨텍스트 검증을 적용했습니다. 웹 BFF와 Next.js 라우트를 추가하고, AI 서비스 엔드포인트와 테스트·운영 문서를 갱신했습니다. ChangesAI 제안 인증 경계
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Browser
participant NextRoutes
participant IdentityService
participant AiProposalClient
participant AiService
Browser->>NextRoutes: AI 제안 또는 결정 요청
NextRoutes->>AiProposalClient: route와 Request 전달
AiProposalClient->>IdentityService: 세션 쿠키로 principal 조회
IdentityService-->>AiProposalClient: workspaceId·actorId 반환
AiProposalClient->>AiService: 메서드·경로 결합 HMAC 컨텍스트 전달
AiService-->>AiProposalClient: 제안·감사·결정 응답
AiProposalClient-->>Browser: 범위 검증 후 credential-free 응답
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
Rate Limit Exceeded
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Completes the next
ai.auditable-proposalstrust-boundary slice after #105.Capability boundary
The shared HMAC secret authenticates the private proxy workload, not the end user. The proxy must authenticate the identity session and authorize workspace membership before signing. Browser credentials are sent only to identity-service. Proposal and decision operations remain inert audit evidence and do not execute user-data commands. Multi-key rotation, asymmetric workload identity, external model transport, and separately authorized execution remain independent reviewed slices.
Validation gate
Merge only when formatting, lint, type checking, complete coverage, PostgreSQL integration tests, build, Compose validation, AppGuardrail, SAST Semgrep, Security Scan, Commercial Readiness, CodeRabbit, and all human/security review feedback pass on the exact current head with no unresolved actionable finding.
Closes #108.
Refs #46, #21, and #105.
Summary by CodeRabbit
릴리스 노트
보안 강화
설정 변경
AI_SERVICE_ORIGIN,AI_GATEWAY_CONTEXT_SECRET테스트 및 검증