Complete v0.5.0 implementation: Database (@db-engineer): - 3 migrations: users, api_keys, report_schedules tables - Foreign keys, indexes, constraints, enums Backend (@backend-dev): - JWT authentication service with bcrypt (cost=12) - Auth endpoints: /register, /login, /refresh, /me - API Keys service with hash storage and prefix validation - API Keys endpoints: CRUD + rotate - Security module with JWT HS256 Frontend (@frontend-dev): - Login/Register pages with validation - AuthContext with localStorage persistence - Protected routes implementation - API Keys management UI (create, revoke, rotate) - Header with user dropdown DevOps (@devops-engineer): - .env.example and .env.production.example - docker-compose.scheduler.yml - scripts/setup-secrets.sh - INFRASTRUCTURE_SETUP.md QA (@qa-engineer): - 85 E2E tests: auth.spec.ts, apikeys.spec.ts, scenarios.spec.ts, regression-v050.spec.ts - auth-helpers.ts with 20+ utility functions - Test plans and documentation Architecture (@spec-architect): - SECURITY.md with best practices - SECURITY-CHECKLIST.md pre-deployment - Updated architecture.md with auth flows - Updated README.md with v0.5.0 features Documentation: - Updated todo.md with v0.5.0 status - Added docs/README.md index - Complete setup instructions Dependencies added: - bcrypt, python-jose, passlib, email-validator Tested: JWT auth flow, API keys CRUD, protected routes, 85 E2E tests ready Closes: v0.5.0 milestone
73 lines
1.8 KiB
Python
73 lines
1.8 KiB
Python
"""Services package."""
|
|
|
|
from src.services.pii_detector import PIIDetector, pii_detector, PIIDetectionResult
|
|
from src.services.cost_calculator import CostCalculator, cost_calculator
|
|
from src.services.ingest_service import IngestService, ingest_service
|
|
from src.services.report_service import ReportService, report_service
|
|
from src.services.auth_service import (
|
|
register_user,
|
|
authenticate_user,
|
|
change_password,
|
|
reset_password_request,
|
|
reset_password,
|
|
get_user_by_id,
|
|
get_user_by_email,
|
|
create_tokens_for_user,
|
|
AuthenticationError,
|
|
EmailAlreadyExistsError,
|
|
InvalidCredentialsError,
|
|
UserNotFoundError,
|
|
InvalidPasswordError,
|
|
InvalidTokenError,
|
|
)
|
|
from src.services.apikey_service import (
|
|
create_api_key,
|
|
validate_api_key,
|
|
list_api_keys,
|
|
get_api_key,
|
|
revoke_api_key,
|
|
rotate_api_key,
|
|
update_api_key,
|
|
APIKeyError,
|
|
APIKeyNotFoundError,
|
|
APIKeyRevokedError,
|
|
APIKeyExpiredError,
|
|
)
|
|
|
|
__all__ = [
|
|
"PIIDetector",
|
|
"pii_detector",
|
|
"PIIDetectionResult",
|
|
"CostCalculator",
|
|
"cost_calculator",
|
|
"IngestService",
|
|
"ingest_service",
|
|
"ReportService",
|
|
"report_service",
|
|
"register_user",
|
|
"authenticate_user",
|
|
"change_password",
|
|
"reset_password_request",
|
|
"reset_password",
|
|
"get_user_by_id",
|
|
"get_user_by_email",
|
|
"create_tokens_for_user",
|
|
"create_api_key",
|
|
"validate_api_key",
|
|
"list_api_keys",
|
|
"get_api_key",
|
|
"revoke_api_key",
|
|
"rotate_api_key",
|
|
"update_api_key",
|
|
"AuthenticationError",
|
|
"EmailAlreadyExistsError",
|
|
"InvalidCredentialsError",
|
|
"UserNotFoundError",
|
|
"InvalidPasswordError",
|
|
"InvalidTokenError",
|
|
"APIKeyError",
|
|
"APIKeyNotFoundError",
|
|
"APIKeyRevokedError",
|
|
"APIKeyExpiredError",
|
|
]
|