작업 내용 저장

This commit is contained in:
2026-04-23 09:56:08 +00:00
parent 514b49cb98
commit d383c7086f
29 changed files with 1654 additions and 1372 deletions
+12 -11
View File
@@ -32,7 +32,7 @@ When deploying to production, set environment variables directly instead of usin
- **DB repository switch**: `pfhub_DB_ENABLED` (enables DB-backed persistence)
- **Initial user bootstrap**: `pfhub_BOOTSTRAP_USERNAME`, `pfhub_BOOTSTRAP_EMAIL`
- **Initial user password**: `pfhub_BOOTSTRAP_PASSWORD`
- **Session/token TTL**: `pfhub_SESSION_TOKEN_TTL_HOURS`, `pfhub_CLIENT_TOKEN_DEFAULT_TTL_DAYS`, `pfhub_BOT_TOKEN_DEFAULT_TTL_DAYS`
- **Session/token TTL**: `pfhub_SESSION_TOKEN_TTL_HOURS`, `pfhub_CLIENT_TOKEN_DEFAULT_TTL_DAYS`, `pfhub_SERVICE_TOKEN_DEFAULT_TTL_DAYS`
- **TimescaleDB / PostgreSQL**: `TIMESCALEDB_*` (single source of DB connection settings)
- **Redis**: `REDIS_*` (for caching and sessions)
- **Loki**: `LOKI_*` (for centralized logging)
@@ -105,9 +105,9 @@ pfhub user create --username alice --password password123 --email alice@example.
pfhub user get <user-id>
pfhub user update <user-id> --username alice-updated --force
pfhub user delete <user-id> --force
pfhub service-token issue <bot-id> --name nightly --ttl-days 30
pfhub service-token issue <bot-id> --name permanent --no-expiry
pfhub service-token revoke <bot-id> <token-id> --force
pfhub service-token issue nightly --user alice --ttl-days 30
pfhub service-token issue permanent --user alice --no-expiry
pfhub service-token revoke nightly --force
pfhub portfolio list
pfhub portfolio status 005930:tv --recent 10
pfhub portfolio create 005930:tv --symbol 005930 --cash-balance 10000000 --force
@@ -144,7 +144,7 @@ Supported commands:
Write commands ask for confirmation by default. Use `--force` to skip the prompt for scripts and automation.
Bot token issue policy:
Service token issue policy:
- 기본값은 365일 TTL이다.
- `--ttl-days`와 `--no-expiry`는 동시에 사용할 수 없다.
@@ -226,12 +226,13 @@ Frontend and app authentication is exposed through `/auth`.
- `GET /auth/tokens`: list current user's issued tokens
- `POST /auth/tokens`: issue a client token for app/script usage
- `DELETE /auth/tokens/{token_id}`: revoke a previously issued token
- `POST /auth/bots`: create external bot principal (admin only)
- `GET /auth/bots`: list bot principals (admin only)
- `POST /auth/bots/{bot_id}/tokens`: issue bot API key with expiration (admin only)
- `GET /auth/bots/{bot_id}/tokens`: list bot keys (admin only)
- `DELETE /auth/bots/{bot_id}/tokens/{token_id}`: revoke bot key (admin only)
- `DELETE /auth/bots/{bot_id}`: deactivate bot and revoke linked keys (admin only)
Service tokens (long-lived integration tokens) are managed via CLI:
```bash
pfhub service-token issue <name> --user <username> [--permission read|trade-write] [--ttl-days N | --no-expiry]
pfhub service-token revoke <name> [--force]
```
Example API calls: