mirror of
https://github.com/zvx-echo6/central.git
synced 2026-05-21 18:14:44 +02:00
- Add migrations 007-010 for system config, operators, sessions, audit_log - Implement argon2id password hashing via argon2-cffi - Implement session-based authentication with database-stored tokens - Add SetupGateMiddleware to redirect to /setup until first operator created - Add SessionMiddleware to load session from cookie and attach operator - Create /setup, /login, /logout, /change-password routes with CSRF protection - Add periodic session cleanup task (hourly) - Add audit logging for auth events - Update systemd unit with EnvironmentFile for /etc/central/central.env - Add comprehensive tests for auth, middleware, and audit modules Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .gitkeep | ||
| central-archive.service | ||
| central-gui.service | ||
| central-supervisor.service | ||
| README.md | ||
Systemd Unit Files
These unit files configure Central services for systemd.
Installation
# Copy unit files
sudo cp central-supervisor.service /etc/systemd/system/
sudo cp central-archive.service /etc/systemd/system/
# Reload systemd
sudo systemctl daemon-reload
# Enable and start services
sudo systemctl enable --now central-supervisor
sudo systemctl enable --now central-archive
Configuration
Both services load environment variables from /etc/central/central.env:
CENTRAL_DB_DSN=postgresql://central:password@localhost/central
CENTRAL_NATS_URL=nats://localhost:4222
CENTRAL_CONFIG_SOURCE=db
CENTRAL_MASTER_KEY_PATH=/etc/central/master.key
Service Dependencies
- central-supervisor: Requires NATS server
- central-archive: Requires NATS server and PostgreSQL
Logs
journalctl -u central-supervisor -f
journalctl -u central-archive -f