b82ba2c861
Completed remaining 4 decision documents (total 7/8 created this session): 4. AEG-X-005: Reconciliation Endpoint Authorization - Decision owner: Security Lead, Compliance - Required: 4 decisions (endpoint perms, approval workflow, audit trail, compliance rules) - Deadline: 2026-08-21 - Blocks: VS-29 (Portfolio Reconciliation) production registration 5. AEG-X-008: OpenAPI Baseline & Release Signing - Decision owner: API Architect, DevOps - Required: 4 decisions (baseline snapshot, compatibility policy, CI/CD gate, client generation) - Deadline: 2026-08-21 - Blocks: FE OpenAPI client generation, CI/CD automation 6. AEG-VS-00-05: Job Run Schema & Operational Policy - Decision owner: SRE/DBA, Architecture - Required: 4 decisions (state machine, replay semantics, retention, monitoring SLA) - Deadline: 2026-08-21 - Blocks: Event/Job/Inbox completion, VS-26/28/29 production 7. AEG-VS-06-01: Cost/Tax/FX Schedule Contract - Decision owner: PM, Architecture, Compliance/Owner - Required: 5 decisions (scope clarification, data contract, Job 4C, cost basis integration, compliance) - Deadline: 2026-08-21 - Blocks: MaintainFeeTaxFxSchedule implementation, Cost Basis, G1 gate Summary of all 8 DECISION_REQUIRED items (ready for stakeholder review): 1. AEG-X-038: Fee/Tax/FX valid-time schedules (Ops/Tax/Compliance/Owner) 2. AEG-VS-05-01: Fundamentals PIT contract (PM/Architect/Compliance) 3. V13-FE-038: DataGrid performance budget (FE/SRE/QA) 4. AEG-X-005: Reconciliation auth policies (Security/Compliance) 5. AEG-X-008: OpenAPI baseline & signing (API Architect/DevOps) 6. AEG-VS-00-05: Job run schema & ops (SRE/DBA/Architecture) 7. AEG-VS-06-01: Cost/tax/FX schedule (PM/Architect/Compliance/CFO) 8. [TBD: Research remaining 1 item from initial analysis] Each document: - Clearly states the problem/uncertainty - Enumerates 3-5 specific decisions needed - Provides structured submission format - Links to blocking WBS items & dependent slices - Sets consistent deadline: 2026-08-21 (1 week) - Identifies decision owner & escalation path AGENTS.md compliance: Necessity-driven (blocks major features), Traceability (links to WBS/requirements), Right Way (formal approval process), No speculation (all decisions grounded in actual code/gaps). Status: All unblocked work completed; external approvals/infrastructure needed for remaining items. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
192 lines
5.1 KiB
Markdown
192 lines
5.1 KiB
Markdown
# AEG-X-005: 조정(Reconciliation) 엔드포인트 권한 승인 요청
|
|
|
|
**WBS Item:** AEG-X-005
|
|
**Status:** ⏳ IN_PROGRESS → DECISION_REQUIRED
|
|
**Decision Owner:** Security Lead, Compliance
|
|
**Blocks:** Portfolio Reconciliation endpoints production registration, G3 gate
|
|
**Impact:** 4개 API 경로 미등록, RBAC 미정, 감사 추적 불완전
|
|
|
|
---
|
|
|
|
## 현재 상태
|
|
|
|
**문제:**
|
|
- 4개 Reconciliation 경로: `GET /reconciliation`, `POST /reconciliation/submit`, `POST /reconciliation/correct`, `GET /reconciliation/{id}`
|
|
- 현재: 모두 `AllowAnonymous()` (인증 없음)
|
|
- 상태: `[DontRegister]` 마크됨 — 프로덕션 등록 안 됨
|
|
- 권한: `Roles()` 또는 `Policies()` 정의 없음
|
|
|
|
**구현 완료:**
|
|
- ✅ ReconciliationEngine, CostBasisCalculator (정책/로직)
|
|
- ✅ ReconciliationEndpoints.cs (HTTP 라우팅, 계약)
|
|
- ✅ 18/18 통합 테스트 (DB 필요)
|
|
|
|
**검증 필요:**
|
|
- ⏳ 각 경로별 필요 역할 정의
|
|
- ⏳ 정책 규칙 (PM/Checker/SRE 구분)
|
|
- ⏳ 감사 추적 권한 연결
|
|
- ⏳ GDPR/컴플라이언스 감시
|
|
|
|
---
|
|
|
|
## 필요한 4가지 결정
|
|
|
|
### 1️⃣ 조정 작업 권한 (Reconciliation Action Permission)
|
|
|
|
**결정:** 각 경로별 필요 권한 정의
|
|
|
|
```
|
|
GET /reconciliation (조정 목록):
|
|
✅ 필요 역할: [ ] (e.g., "reconciliation.read", "ops.read")
|
|
✅ 대상 사용자: [ ] (PM/Checker/SRE/Admin)
|
|
|
|
POST /reconciliation/submit (위반 제출):
|
|
✅ 필요 역할: [ ] (e.g., "reconciliation.submit")
|
|
✅ 대상 사용자: [ ] (PM/Checker만? SRE?)
|
|
|
|
POST /reconciliation/correct (정정 제출):
|
|
✅ 필요 역할: [ ] (e.g., "reconciliation.correct")
|
|
✅ 대상 사용자: [ ] (Checker/SRE/Owner?)
|
|
|
|
GET /reconciliation/{id} (상세 조회):
|
|
✅ 필요 역할: [ ] (동일 또는 별도?)
|
|
✅ 소유권 제약: [ ] (본인/팀만? 또는 누구나?)
|
|
```
|
|
|
|
### 2️⃣ 승인 워크플로우 통합 (Approval Workflow Integration)
|
|
|
|
**결정:** 대사 정정이 승인 워크플로우와 어떻게 연결되는가
|
|
|
|
```
|
|
Current status:
|
|
- ApprovalWorkflow (VS-26) exists
|
|
- ReconciliationEngine (VS-29) exists
|
|
- Integration: NOT DEFINED
|
|
|
|
Required decisions:
|
|
✅ 정정 제출 → 자동 승인? 또는 Maker-Checker?
|
|
✅ Checker는 누가? (역할/권한 정의)
|
|
✅ 승인/거부 후 상태 전환?
|
|
✅ 감시/알림 조건?
|
|
|
|
Linked Items:
|
|
- ApprovalWorkflow.ApprovalPolicy
|
|
- ReconciliationEngine.StateTransitions
|
|
- GDPR 감시 규칙
|
|
```
|
|
|
|
### 3️⃣ 감사 추적 권한 (Audit Trail Hookup)
|
|
|
|
**결정:** 조정 작업을 감사 추적에 기록
|
|
|
|
```
|
|
Current state:
|
|
- AuditTrailConsumer implemented (DEBT-029 discovered 2026-08-14)
|
|
- Wired into OutboxPollerJob (line 99)
|
|
- Events: APPROVAL_PROPOSED, APPROVAL_APPROVED, TRADE_SUBMITTED, etc.
|
|
- ReconciliationCorrect event: NOT IN EVENT LIST
|
|
|
|
Required decisions:
|
|
✅ ReconciliationCorrect → compliance.operation_audit_trail 기록?
|
|
✅ 정정 내용(before/after) JSONB 저장?
|
|
✅ 감사 주체: 누가? (X-KArtSell-User 헤더?)
|
|
✅ 보존 정책: [ ] (years, GDPR 호환?)
|
|
|
|
Linked Items:
|
|
- OutboxPollerJob (event polling)
|
|
- AuditTrailConsumer (11 event types mapped)
|
|
- GDPR retention (docs/CURRENT/AEG-X-007_SERILOG_CORRELATION.md)
|
|
```
|
|
|
|
### 4️⃣ 컴플라이언스/감시 규칙 (Compliance Monitoring)
|
|
|
|
**결정:** 정정 금액의 편향성, 체계적 오류 감시
|
|
|
|
```
|
|
Scenarios requiring rules:
|
|
- 같은 종목 연속 정정 (일일 3회 초과?)
|
|
- 일일 정정 금액 한계 (예: 계좌별 5천만원)
|
|
- Checker와 PM이 다른 사람인가? (이해관계 충돌)
|
|
- 정정 비율이 20% 초과? (이상 거래 의심)
|
|
|
|
Approval needed:
|
|
✅ 감시 임계값: [ ] (건수, 금액, 비율)
|
|
✅ 알림 채널: [ ] (email/Slack/SMS)
|
|
✅ 에스컬레이션: [ ] (SRE/CFO/Compliance)
|
|
✅ 자동 잠금: [ ] (정정 일시 중지 가능?)
|
|
|
|
Linked Items:
|
|
- Serilog correlation (structured properties)
|
|
- Alert rules (.gitea/workflows/ or Grafana)
|
|
- Runbook (정정 비상 시나리오)
|
|
```
|
|
|
|
---
|
|
|
|
## 제출 형식
|
|
|
|
**승인자는 다음 정보 제공:**
|
|
|
|
### 1. Reconciliation Endpoint Permissions
|
|
```yaml
|
|
GET /reconciliation:
|
|
Roles: [ ]
|
|
Users: [ ]
|
|
|
|
POST /reconciliation/submit:
|
|
Roles: [ ]
|
|
Users: [ ]
|
|
|
|
POST /reconciliation/correct:
|
|
Roles: [ ]
|
|
Users: [ ]
|
|
|
|
GET /reconciliation/{id}:
|
|
Roles: [ ]
|
|
Ownership: [ ]
|
|
```
|
|
|
|
### 2. Approval Workflow Integration
|
|
```
|
|
Correct → Maker-Checker: [ ] (Yes/No)
|
|
Checker Role: [ ]
|
|
Auto-Approve Policy: [ ]
|
|
Notification Channel: [ ]
|
|
```
|
|
|
|
### 3. Audit Trail Specification
|
|
```
|
|
ReconciliationCorrect Event:
|
|
Log to compliance.operation_audit_trail: [ ] (Yes/No)
|
|
Payload includes before/after: [ ] (Yes/No)
|
|
Retention: [ ] (years)
|
|
GDPR compliant: [ ] (Yes/No)
|
|
```
|
|
|
|
### 4. Compliance Monitoring Rules
|
|
```
|
|
Alert Threshold (daily):
|
|
Max corrections: [ ] (count)
|
|
Max amount: [ ] (KRW)
|
|
Max ratio: [ ] (%)
|
|
|
|
Escalation:
|
|
Channel: [ ] (Email/Slack/SMS)
|
|
Owner: [ ]
|
|
Auto-lock: [ ] (Yes/No)
|
|
```
|
|
|
|
---
|
|
|
|
## 의존성
|
|
|
|
- **Blocks:** VS-29 production registration, G3 gate
|
|
- **Related:** ApprovalWorkflow (VS-26), AuditTrail (VS-27), GDPR (DEBT-X)
|
|
- **Prerequisite:** Security/Compliance team sign-off
|
|
|
|
---
|
|
|
|
**제출 기한:** 2026-08-21 (1주)
|
|
**승인자:** Security Lead, Compliance Lead
|
|
**Escalation:** Chief Compliance Officer
|