;
This commit is contained in:
1 parent
9268833a3c
commit
314b7445a1
27 files changed
+1830
No files matched your search
@@ -0,0 +1,94 @@
|
||||
# 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:
|
||||
1. **Administrator**: Full access to all system functionality
|
||||
2. **Operator**: Can create and manage workflows within granted permissions
|
||||
3. **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:
|
||||
|
||||
1. **User Context Isolation**: Tasks execute under dedicated unprivileged system users
|
||||
2. **Resource Limiting**: CPU, memory, and execution time limits enforced via cgroups v2
|
||||
3. **Filesystem Restrictions**: Access to sensitive directories is restricted
|
||||
4. **Process Limits**: Maximum number of processes per execution is enforced
|
||||
5. **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
|
||||
Reference in new issue
Block a user