10. Machine Identity
10. Machine Identity
← Previous: AI Agent Identity | Index | Next: Service Mesh Integration →
10.1 Machine Identity Overview
10.1.1 Scope
Machine identity covers non-Kubernetes workloads:
| Machine Type | Examples |
|---|---|
| Virtual Machines | AWS EC2, GCP GCE, Azure VM, on-premises VMs |
| Bare Metal | Physical servers |
| Edge Devices | IoT gateways, edge compute nodes |
| CI/CD Runners | Self-hosted GitHub runners, GitLab runners |
10.1.2 Identity Requirements
| Requirement | Rationale |
|---|---|
| Attestation-based | Prove machine properties, not just secrets |
| Short-lived credentials | Limit compromise window |
| Automatic rotation | No manual intervention |
| Vault integration | Access to platform secrets |
| Kubernetes access | Manage Kubernetes resources |
10.2 Teleport Machine ID
10.2.1 tbot Overview
Teleport Machine ID uses tbot agent for machine identity:
| Component | Purpose |
|---|---|
| tbot | Agent that manages machine certificates |
| Bot User | Teleport user representing the machine |
| Bot Role | Permissions granted to the machine |
| Join Method | How the machine proves its identity |
10.2.2 Join Methods
| Method | Platform | Attestation |
|---|---|---|
iam | AWS | IAM role, instance identity |
gcp | GCP | Instance metadata, service account |
azure | Azure | Managed identity, instance metadata |
kubernetes | Kubernetes | ServiceAccount token |
github | GitHub Actions | OIDC token |
token | Any | Pre-shared token (bootstrap only) |
10.2.3 tbot Architecture
10.3 tbot Deployment
10.3.1 AWS EC2 Deployment
IAM role policy for EC2:
Teleport token configuration:
10.3.2 Kubernetes Deployment
For machines needing Kubernetes access from outside the cluster:
10.3.3 GitHub Actions Deployment
For self-hosted runners:
10.4 VM Attestation
10.4.1 Cloud Instance Attestation
| Cloud | Attestation Document |
|---|---|
| AWS | Instance Identity Document (signed by AWS) |
| GCP | Instance metadata token (signed by Google) |
| Azure | Instance metadata (signed by Azure) |
10.4.2 AWS Instance Identity
10.4.3 On-Premises Attestation
For on-premises machines without cloud attestation:
| Method | Security Level |
|---|---|
| Token (one-time) | Bootstrap only |
| TPM attestation | Hardware-based (future) |
| Certificate chain | Enterprise PKI |
10.5 Certificate Lifecycle
10.5.1 Certificate Types
| Certificate | Purpose | TTL |
|---|---|---|
| Identity cert | General machine identity | 1 hour |
| SSH host cert | SSH server identity | 1 hour |
| SSH user cert | SSH client authentication | 1 hour |
| Kubernetes cert | kubectl access | 1 hour |
| Database cert | Database client auth | 1 hour |
10.5.2 Automatic Renewal
10.5.3 Renewal Configuration
10.6 Vault Integration
10.6.1 Teleport Auth Method
Machines authenticate to Vault using Teleport certificates:
10.6.2 Machine Secret Access
10.6.3 Vault Policy for Machines
10.7 Use Cases
10.7.1 Ansible Automation
Ansible control node with machine identity:
Ansible inventory using Teleport:
10.7.2 CI/CD Runner
Self-hosted runner with Teleport access:
10.7.3 Backup System
Backup server with database access:
10.8 Security Considerations
10.8.1 Attestation Security
| Concern | Mitigation |
|---|---|
| IMDS token theft | IMDSv2 with session tokens |
| Role impersonation | Bound to specific instance/role |
| Token replay | Single-use join tokens |
10.8.2 Certificate Security
| Concern | Mitigation |
|---|---|
| Certificate theft | 1-hour TTL limits exposure |
| Key compromise | Private keys never leave machine |
| Unauthorized access | Teleport RBAC controls |
10.8.3 Defense in Depth
10.9 Operational Runbook
10.9.1 Deploying tbot
- Create Teleport token for join method
- Deploy tbot configuration to machine
- Start tbot service
- Verify certificate issuance
10.9.2 Troubleshooting
| Issue | Diagnostic |
|---|---|
| Join failed | Check cloud attestation, token validity |
| Renewal failed | Check network, Teleport auth logs |
| Access denied | Check Teleport roles, Vault policies |
10.9.3 Monitoring
| Metric | Alert Threshold |
|---|---|
| Certificate age | > 80% of TTL |
| Renewal failures | > 2 consecutive |
| Auth failures | > 5 per minute |
10.10 Compliance Mapping
10.10.1 Invariant Enforcement
| Invariant | Machine Identity Implementation |
|---|---|
| INV-1 | tbot provides cryptographic identity |
| INV-2 | Certificates have 1-hour TTL |
| INV-3 | Cloud attestation proves machine properties |
| INV-10 | All access logged in Teleport audit |
10.10.2 Audit Trail
| Event | Audit Source |
|---|---|
| Machine join | Teleport audit |
| Certificate issuance | Teleport audit |
| Resource access | Teleport session recording |
| Vault access | Vault audit |
Document Navigation
End of Section 10