fetch_ml/configs/config-multi-user.yaml
Jeremie Fraeys ea15af1833 Fix multi-user authentication and clean up debug code
- Fix YAML tags in auth config struct (json -> yaml)
- Update CLI configs to use pre-hashed API keys
- Remove double hashing in WebSocket client
- Fix port mapping (9102 -> 9103) in CLI commands
- Update permission keys to use jobs:read, jobs:create, etc.
- Clean up all debug logging from CLI and server
- All user roles now authenticate correctly:
  * Admin: Can queue jobs and see all jobs
  * Researcher: Can queue jobs and see own jobs
  * Analyst: Can see status (read-only access)

Multi-user authentication is now fully functional.
2025-12-06 12:35:32 -05:00

78 lines
1.7 KiB
YAML

base_path: "/app/data/experiments"
auth:
enabled: true
api_keys:
admin_user:
hash: "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8" # "password"
admin: true
roles: ["user", "admin"]
permissions:
read: true
write: true
delete: true
researcher1:
hash: "ef92b778ba7a6c8f2150019a5678047b6a9a2b95cef8189518f9b35c54d2e3ae" # "research123"
admin: false
roles: ["user", "researcher"]
permissions:
jobs:read: true
jobs:create: true
jobs:update: true
jobs:delete: false
analyst1:
hash: "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3" # "analyst123"
admin: false
roles: ["user", "analyst"]
permissions:
jobs:read: true
jobs:create: false
jobs:update: false
jobs:delete: false
server:
address: ":9101"
tls:
enabled: false
security:
rate_limit:
enabled: true
requests_per_minute: 60
burst_size: 20
ip_whitelist: []
cors:
enabled: true
allowed_origins: ["https://localhost:9103", "https://localhost:3000"]
allowed_methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"]
allowed_headers: ["Content-Type", "Authorization"]
database:
type: "sqlite"
connection: "/app/data/experiments/fetch_ml.db"
max_connections: 20
connection_timeout: "30s"
redis:
url: "redis://redis:6379"
max_connections: 15
connection_timeout: "10s"
logging:
level: "info"
file: "/app/logs/app.log"
max_size: "100MB"
max_backups: 5
compress: true
resources:
max_workers: 3
desired_rps_per_worker: 3
podman_cpus: "2"
podman_memory: "4g"
job_timeout: "30m"
monitoring:
enabled: true
metrics_path: "/metrics"
health_check_interval: "30s"