candle-annotator/services/ml/app
Marko Djordjevic 5f569d9134 feat(ml): add API key authentication via FastAPI Depends() on all endpoints except /health
- Import Header, Depends, Security from fastapi
- Add verify_api_key dependency: reads API_KEY env var, checks X-API-Key
  header, raises HTTP 401 if key mismatch; fail-open if env var not set
- Apply Depends(verify_api_key) to all 14 non-health endpoints
- /health endpoint remains unauthenticated for liveness probes
- Mark task 3.2 as complete in tasks.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 11:04:41 +01:00
..
__init__.py feat(ml): add database schema, config parser, and DVC setup 2026-02-15 12:08:53 +01:00
annotation_ingestion.py feat: add Python migration script and successfully test SQLite to PostgreSQL data migration 2026-02-17 14:01:21 +01:00
config.py feat(ml): add database schema, config parser, and DVC setup 2026-02-15 12:08:53 +01:00
data_access.py fix: resolve numpy type conversion issues in ML service data access 2026-02-17 14:10:21 +01:00
db.py security: remove credential SQL comments and add DATABASE_URL fail-fast check 2026-02-18 10:56:49 +01:00
main.py feat(ml): add API key authentication via FastAPI Depends() on all endpoints except /health 2026-02-18 11:04:41 +01:00
patterns.py feat: add FastAPI pattern detection endpoints (Section 1) 2026-02-17 18:34:14 +01:00
preprocessing.py fix(ml): add windowed feature flattening for inference parity 2026-02-15 22:07:06 +01:00