mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-09 13:35:12 +09:00
Adds API key rotation, IP allowlisting, anomaly detection, and replay protection to the ServerKit agent system. Backend changes include new endpoints, models, and services for security alerts, nonce tracking, and anomaly detection, as well as updates to the server model and agent authentication logic. The agent now supports credential rotation and replay protection via nonces. Frontend updates add UI and API methods for managing allowed IPs, viewing security alerts, and rotating API keys. Documentation and environment setup instructions are included.
27 lines
939 B
Bash
27 lines
939 B
Bash
# Flask Configuration
|
|
FLASK_ENV=development
|
|
|
|
# IMPORTANT: Generate secure keys for production!
|
|
# Run: python -c "import secrets; print(secrets.token_hex(32))"
|
|
SECRET_KEY=change-this-to-a-secure-random-string
|
|
|
|
# Database
|
|
DATABASE_URL=sqlite:///serverkit.db
|
|
|
|
# JWT Configuration
|
|
# IMPORTANT: Generate a unique key for production!
|
|
# Run: python -c "import secrets; print(secrets.token_hex(32))"
|
|
JWT_SECRET_KEY=change-this-to-another-secure-random-string
|
|
|
|
# CORS - comma-separated list of allowed origins
|
|
CORS_ORIGINS=http://localhost:5173,http://localhost:3000
|
|
|
|
# Server
|
|
PORT=5000
|
|
|
|
# Security - Agent API Secret Encryption
|
|
# IMPORTANT: Generate a unique key for production!
|
|
# Run: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
|
|
# Or: python -c "import base64; import os; print(base64.urlsafe_b64encode(os.urandom(32)).decode())"
|
|
SERVERKIT_ENCRYPTION_KEY=dSenbMzCii4PMYP3Bb_N9jdqm6pa_TOD4l9yAwhhSBA=
|