# BAT-020 — daemon-scoped 브로커 인증정보 - Batch ID: BAT-020 - Profile: standard - Status: in-progress - Discovery: dcy-010 - Included REQ: REQ-046, REQ-047, REQ-048, REQ-049, REQ-050, REQ-051 - Folder: docs/batches/bat-020_20260628_daemon-scoped-broker-credential/ - Created: 2026-06-28 ## Summary dcy-010(daemon-scoped 브로커 인증정보 소유·전달)을 portfolio-hub에 구현한다. BrokerCredential 도메인 모델에 daemon_id 필드 추가, broker_credentials 테이블 PK 전환 마이그레이션(Step1/Step2), 백필 CLI, GET /v1/user_info daemon-scoped 단일 broker 전달, CLI --daemon-id 옵션, 보안 격리 검증. ## Included REQ | REQ | 제목 | Type | 의존 | | --- | --- | --- | --- | | REQ-046 | BrokerCredential daemon_id 필드 추가 | Data | 없음 | | REQ-047 | broker_credentials PK 전환 마이그레이션 | Migration | REQ-046 | | REQ-048 | 기존 user-scoped 인증정보 daemon_id 백필 | Migration | REQ-047 Step1 | | REQ-049 | GET /v1/user_info daemon-scoped 단일 broker 전달 | Interface | REQ-046, REQ-047 | | REQ-050 | credential CLI --daemon-id 옵션 추가 | Interface | REQ-046, REQ-047 | | REQ-051 | 브로커 인증정보 보안 격리 | Non-Functional | REQ-049 | ## DoR (진입 조건) - [x] 6개 REQ 전건 Approved 상태 확인 - [x] dcy-010 confirmed Discovery 확인 - [x] 구현 대상 파일 존재 확인(app/domain/models.py, app/repositories/postgres.py, app/api/v1_user_info.py, app/schemas/v1.py, app/cli/commands/credential.py, migrations/versions/) - [x] design 위임 2건 식별 완료(REQ-048 구현방식, REQ-050 --daemon-id 입력 타입·과도기 정책) ## DoD (완료 조건) - [ ] REQ-046~051 전 AC 테스트 통과 - [ ] alembic revision Step1/Step2 작성 완료(dev DB 검증) - [ ] 기존 테스트 회귀 없음 - [ ] draft-batch-verification 문서에 evidence 기록 ## 비가역 결재 게이트 REQ-047 Step2(PK 전환) 실DB 적용은 사장님 결재 대상. 이 batch에서는 revision 코드 작성 + dev/test DB 검증까지만 수행.