3.7 KiB
Chronos Security Model
This document outlines the security considerations and design decisions for Chronos, a Rust-based workflow automation platform.
Overview
Chronos implements a multi-layered security approach to protect against common threats while maintaining usability for legitimate users. The system is designed with defense-in-depth principles, where multiple controls work together to provide comprehensive protection.
Authentication and Authorization
User Accounts
- Users are stored in the database with hashed passwords using Argon2id
- Passwords must meet minimum complexity requirements
- Session management uses secure server-side sessions with automatic expiration
- Login rate limiting prevents brute-force attacks
Role-Based Access Control
Chronos implements a role-based system with three primary roles:
- Administrator: Full access to all system functionality
- Operator: Can create and manage workflows within granted permissions
- Viewer: Can view authorized workflows and execution records
Access controls are enforced at the API layer for all endpoints.
Data Protection
Secrets Management
- All sensitive data (API keys, passwords, tokens) are encrypted at rest using authenticated encryption
- Encryption keys are stored separately from the database
- Secrets are redacted from logs and API responses
- Credential management is handled through dedicated credential stores
Input Validation
All user inputs are validated and sanitized to prevent:
- SQL injection
- Cross-site scripting (XSS)
- Command injection
- Path traversal attacks
Process Execution Security
Native Execution Isolation
Chronos implements secure native process execution with multiple isolation layers:
- User Context Isolation: Tasks execute under dedicated unprivileged system users
- Resource Limiting: CPU, memory, and execution time limits enforced via cgroups v2
- Filesystem Restrictions: Access to sensitive directories is restricted
- Process Limits: Maximum number of processes per execution is enforced
- Network Isolation: Outbound network access can be restricted by configuration
Security Boundaries
The system explicitly documents security boundaries:
- Execution environment cannot access application secrets without explicit permission
- Regular users cannot configure unrestricted execution of privileged commands
- Administrative execution policies are separate from ordinary workflow configuration
Network Security
API Security
- All API endpoints require authentication
- HTTPS is required for all API communications
- CSRF protection is implemented for web forms
- Rate limiting is applied to prevent abuse
Communication Protocols
- Internal service communication uses local Unix sockets where possible
- External communications use secure protocols with certificate validation
Infrastructure Security
System Integration
- Chronos integrates with systemd for service management and security hardening
- Dedicated service accounts are used for each component
- Filesystem permissions are configured appropriately
- Journald integration provides audit logging
Container Exclusion
Chronos explicitly excludes container technologies:
- No Docker, Kubernetes, or other container runtimes
- All execution happens in native Linux processes
- This reduces attack surface by eliminating container escape vectors
Audit and Logging
Security Logging
- All authentication attempts are logged
- Access to sensitive data is recorded
- Administrative actions are audited
- Failed security events trigger alerts when configured
Log Management
- Logs are structured for easy parsing and analysis
- Sensitive information is redacted from logs
- Log retention policies are configurable