Core Security Principles
Talos security is built on five foundational principles:- No SSH - Shell access is an attack vector, not a feature
- Immutable infrastructure - Systems cannot be modified at runtime
- API-only access - All operations go through authenticated, authorized API calls
- Mutual TLS everywhere - Every connection is authenticated and encrypted
- Minimal attack surface - No unnecessary services, packages, or binaries
No SSH, No Shell
Talos Linux does not include SSH, bash, or any interactive shell by design.Why No SSH?
SSH introduces security risks that are incompatible with Talos’s security model:- Attack surface - SSH daemons are frequent targets for exploitation
- Credential management - SSH keys require secure distribution and rotation
- Audit trail - Interactive sessions are difficult to audit comprehensively
- Configuration drift - Shell access enables imperative changes that cause drift
- Privilege escalation - sudo and root access are common escalation targets
What Replaces SSH?
Every operation that traditionally required SSH is available through the API:| SSH Use Case | Talos Alternative |
|---|---|
| View logs | talosctl logs or talosctl dmesg |
| Edit files | Update machine config and apply via API |
| Check processes | talosctl processes |
| Network troubleshooting | talosctl netstat, talosctl routes |
| Restart services | talosctl service restart |
| Debug containers | talosctl debug (launches ephemeral pod) |
For emergency debugging, Talos supports ephemeral debug containers that self-destruct after use. These are launched via the API and fully audited.
Immutable Root Filesystem
The Talos root filesystem is mounted read-only and cannot be modified at runtime.Implementation
- Immutable system partition - BOOT-A and BOOT-B partitions are read-only
- No package manager - Cannot install or modify software
- No configuration files - System configured via machine config only
- Controlled mutable space - Only STATE and EPHEMERAL partitions are writable
Benefits
- Prevents persistence - Malware cannot modify the system
- Eliminates drift - Every node boots to identical state
- Enables rollback - A/B partitions allow instant recovery
- Simplifies validation - System integrity verified at boot
What Is Mutable?
| Path | Mutable | Purpose |
|---|---|---|
/ | No | System binaries and libraries |
/etc | Partially | Generated configs (kubelet, etcd) |
/var/lib | Yes | Container images, etcd data |
/var/log | In-memory | Ephemeral logs (not persisted) |
/run | In-memory | Runtime state and sockets |
/system/state | Yes | Machine config and PKI |
API-Only Access Model
All Talos operations are performed through gRPC APIs secured with mutual TLS.API Architecture
Authentication Flow
- Client certificate - Client presents X.509 certificate
- CA verification - Certificate signed by Talos CA
- Role extraction - Roles embedded in certificate organization field
- Authorization - RBAC rules checked for requested operation
- Execution - If authorized, operation proceeds
Role-Based Access Control
Frominternal/app/machined/internal/server/v1alpha1/v1alpha1_server.go, Talos implements fine-grained RBAC:
Built-in Roles
Admin Role
Admin Role
Full access to all operations:
- Apply configuration changes
- Reset and wipe nodes
- Upgrade Talos version
- Manage etcd cluster
- All read and restart operations
Operator Role
Operator Role
Day-to-day operations without destructive actions:
- Restart services
- View logs and metrics
- Reboot nodes
- Manage containers
- Cannot: Reset, upgrade, or modify config
Reader Role
Reader Role
Read-only access for monitoring:
- View system information
- Read logs
- Check service status
- Get metrics
- Cannot: Modify anything
EtcdBackup Role
EtcdBackup Role
Specialized role for backup systems:
- Take etcd snapshots
- Check etcd status
- List etcd members
- Cannot: Modify etcd or other services
Mutual TLS (mTLS)
Every API connection in Talos uses mutual TLS for authentication and encryption.Certificate Hierarchy
Certificate Storage
Certificates are stored in the STATE partition and managed through COSI resources:secrets.API- apid certificates (read by apid only)secrets.Trustd- trustd certificates (read by trustd only)secrets.Etcd- etcd CA and certificatessecrets.Kubernetes- Kubernetes component certificates
internal/app/machined/pkg/system/services/apid.go:56-74, resource filtering ensures isolation:
Certificate Rotation
Talos supports online certificate rotation:- Generate new certificates
- Apply updated machine config with new certs
- Services reload certificates without downtime
- Old certificates can be revoked
Privilege Separation
Talos components run with minimal privileges using multiple isolation mechanisms.User Isolation
Services run as dedicated users with minimal privileges:Capability Dropping
Frominternal/app/machined/pkg/system/services/apid.go:213, most capabilities are dropped:
SELinux Labels
When SELinux is enabled, services get dedicated labels:constants.SelinuxLabelApid- apid container labelconstants.SelinuxLabelTrustd- trustd container labelconstants.SelinuxLabelKubelet- kubelet container labelconstants.SelinuxLabelSystemRuntime- containerd label
OOM Score Adjustment
Critical services protected from OOM killer:Kernel Hardening
Talos enforces Kernel Self Protection Project (KSPP) parameters at boot.KSPP Parameters Enforced
Frominternal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer_tasks.go:118-126:
kernel.kptr_restrict=1- Hide kernel pointerskernel.dmesg_restrict=1- Restrict dmesg accesskernel.perf_event_paranoid=3- Restrict perf eventskernel.yama.ptrace_scope=1- Restrict ptracenet.core.bpf_jit_harden=2- Harden BPF JIT
Attack Surface Reduction
Talos minimizes the attack surface by removing unnecessary components.Not Included in Talos
- ❌ SSH daemon
- ❌ Shell (bash, sh)
- ❌ Package manager (apt, yum)
- ❌ Init system (systemd, sysvinit)
- ❌ GUI or display server
- ❌ Compilers or dev tools
- ❌ Python, Perl, or scripting languages
- ❌ Unnecessary kernel modules
- ❌ Man pages or documentation files
What Is Included
- ✅ Linux kernel (minimal config)
- ✅ containerd runtime
- ✅ Talos system services
- ✅ Minimal networking tools
- ✅ Required kernel modules only
Binary Size Comparison
| Component | Size |
|---|---|
| Talos ISO | ~120 MB |
| Talos System Partition | ~90 MB |
| Ubuntu Server ISO | ~1.4 GB |
| RHEL CoreOS | ~800 MB |
Smaller size = fewer binaries = smaller attack surface = fewer CVEs to patch
Network Security
All network communication in Talos is encrypted and authenticated.Port Security
| Port | Service | Access |
|---|---|---|
| 50000 | apid (Talos API) | mTLS required |
| 50001 | trustd | mTLS required |
| 6443 | Kubernetes API | mTLS required |
| 2379-2380 | etcd | mTLS required, control plane only |
| 10250 | kubelet | TLS required |
Network Policies
Firewall rules can be configured in machine config:Secure Boot (UEFI)
Talos supports UEFI Secure Boot for hardware-rooted trust:- UEFI firmware verifies bootloader signature
- Bootloader verifies kernel and initramfs signatures
- Kernel loads only signed kernel modules
- Talos verifies system partition integrity
Setting Up Secure Boot
- Generate and enroll keys in UEFI
- Sign Talos bootloader and kernel
- Configure machine to boot only signed images
- Enable in machine config:
Audit and Compliance
Talos provides comprehensive audit capabilities for compliance requirements.Event Stream
All operations generate events that can be streamed in real-time:- Service state changes
- Configuration updates
- Network changes
- Container lifecycle
- Security events
Audit Logs
Kubernetes audit logs can be configured:Security Best Practices
Rotate Certificates
Regularly rotate API certificates and Kubernetes certificates
Limit Admin Access
Use Operator and Reader roles for day-to-day operations
Enable Secure Boot
Use UEFI Secure Boot for hardware-rooted trust
Monitor Events
Stream events to SIEM for security monitoring
Network Segmentation
Use firewall rules to restrict API access
Regular Updates
Keep Talos updated for security patches
Threat Model
Talos is designed to protect against:Mitigated Threats
- ✅ SSH exploitation - No SSH daemon to attack
- ✅ Privilege escalation - No shell or sudo
- ✅ Persistent malware - Immutable root filesystem
- ✅ Configuration tampering - API-only config changes
- ✅ Lateral movement - mTLS required for all connections
- ✅ Supply chain attacks - Signed images and Secure Boot
Remaining Attack Vectors
- ⚠️ Compromised credentials - Protect talosconfig files
- ⚠️ Kubernetes exploits - Keep Kubernetes updated
- ⚠️ Container escapes - Use seccomp and AppArmor in pods
- ⚠️ Physical access - Use disk encryption and Secure Boot
Compliance
Talos security features support compliance with:- CIS Kubernetes Benchmark - Many controls built-in
- PCI-DSS - Immutability and audit logging
- HIPAA - Encryption and access controls
- SOC 2 - Change management and monitoring
- FedRAMP - Hardening and FIPS mode support
Talos supports FIPS 140-2 mode for cryptographic operations when built with FIPS-enabled Go toolchain.
Next Steps
Generate Certificates
Learn how to generate and manage Talos certificates
RBAC Configuration
Configure role-based access control
Network Security
Understand Talos network architecture
Audit Logging
Set up audit logging for compliance