- Add service token rotation CLI command with force flag support - Implement token rotation in auth service with expiration handling - Add portfolio repository helper for transaction/batch operations - Add cascade delete support in postgres repository - Add comprehensive CLI tests for service token operations - Add REQ-012 specification for service token rotation - Create BAT-002 delivery batch for token rotation implementation - Update SRS and batch indexes
43 lines
1.3 KiB
Markdown
43 lines
1.3 KiB
Markdown
# BAT-002 Index
|
|
|
|
- Status: release-candidate
|
|
- Batch: BAT-002
|
|
- Profile: batch-lite
|
|
- Created: 2026-05-02
|
|
|
|
## Included REQ
|
|
|
|
| REQ | 제목 | Type | Priority |
|
|
|-----|------|------|----------|
|
|
| REQ-012 | service-token rotate CLI 명령 구현 | Interface | Medium |
|
|
|
|
## Source Discovery
|
|
|
|
- minor-change fast path (Discovery 없음)
|
|
|
|
## Scope Summary
|
|
|
|
- `pfhub service-token rotate <name> [--force]` CLI 명령 신규 추가
|
|
- `auth_tokens` 행의 `token_hash`, `token_prefix`, `runtime_id` in-place UPDATE
|
|
- 메타데이터(`id`, `permission`, `expires_at` 등) 유지
|
|
- DB 스키마 변경 없음
|
|
|
|
## Impacted Area
|
|
|
|
- Docs: 없음 (구조/인터페이스/런타임 흐름 변경 없음)
|
|
- Modules:
|
|
- `app/repositories/portfolio_repository.py` (Protocol stub 추가)
|
|
- `app/repositories/postgres.py` (UPDATE 메서드 추가)
|
|
- `app/services/auth_service.py` (rotate_service_token 메서드 추가)
|
|
- `app/cli/commands/service_tokens.py` (rotate 명령 추가)
|
|
- Tests:
|
|
- `tests/test_cli.py` (rotate 성공/없는이름/revoked 3개 케이스)
|
|
|
|
## Stage Documents
|
|
|
|
| Stage | File | Status |
|
|
|-------|------|--------|
|
|
| Planning | [planning.md](./planning.md) | confirmed |
|
|
| Implementation | implementation.md | pending |
|
|
| Verification | [verification.md](./verification.md) | verified |
|