Phase 1.1 — Secure Credential Management
TODO Reference
- Phase: Phase 1: Critical Security & Stability (Weeks 1–4)
- Category: 1.1 Secure Credential Management
- Priority: Critical
Overview
Replace all plaintext credential storage with an encrypted vault, implement credential rotation, and add API key permission validation on startup. app/pt_credentials.py provides the Fernet-based vault foundation — this issue tracks completing and wiring it throughout the application.
Tasks
Replace Plaintext Credential Storage
Credential Rotation Mechanism
API Key Permission Validation
Files to Modify
app/pt_credentials.py — complete vault implementation, add rotation scheduler
app/pt_trader.py — replace any direct config/file credential reads
app/pt_security.py — integrate permission validation
app/pt_security_logger.py — credential usage and rotation audit events
Acceptance Criteria
Dependencies
None — implement first, all other Phase 1 tasks benefit from this foundation.
Phase 1.1 — Secure Credential Management
TODO Reference
Overview
Replace all plaintext credential storage with an encrypted vault, implement credential rotation, and add API key permission validation on startup.
app/pt_credentials.pyprovides the Fernet-based vault foundation — this issue tracks completing and wiring it throughout the application.Tasks
Replace Plaintext Credential Storage
r_key.txt/r_secret.txtplaintext files from codebase and.gitignorethempt_credentials.pyencrypt_credentials()/decrypt_credentials()are used everywhere credentials are read or writtenCredential Rotation Mechanism
API Key Permission Validation
pt_security_logger.pyFiles to Modify
app/pt_credentials.py— complete vault implementation, add rotation schedulerapp/pt_trader.py— replace any direct config/file credential readsapp/pt_security.py— integrate permission validationapp/pt_security_logger.py— credential usage and rotation audit eventsAcceptance Criteria
pt_credentials.pyvaultDependencies
None — implement first, all other Phase 1 tasks benefit from this foundation.