CIS etcd Benchmark

Security configuration benchmark for etcd distributed key-value store

v1.0.0 03-2025

Overview

▶

This benchmark provides prescriptive guidance for establishing a secure configuration posture for etcd. It covers TLS encryption for client and peer communications, RBAC authentication, data directory permissions, storage quotas, snapshot backups, and cluster health management.

14Recommendations
7Sections
2Profile Levels
SectionAreaFocus
1Installation & PermissionsUser isolation, data directory security
2TLS ConfigurationClient TLS, peer TLS, certificate auth
3Authentication & AuthorizationRBAC, role management, user policies
4Storage & BackupsQuotas, automated snapshots, data protection
5Network HardeningListen address binding, request size limits
6Cluster OperationsCompaction, health checks, quorum management
7Maintenance & MonitoringVersion updates, metrics endpoint security

Profile Definitions

▶
ProfileDescriptionIntended Use
L1Level 1 — StandardEssential security for all etcd deployments; minimal performance impact.
L2Level 2 — HardenedAdvanced hardening for PCI-DSS, HIPAA, or high-security environments.

1 — Installation & Permissions

▶

1.1 Process & Data Security

▶
1.1.1 Ensure etcd runs as a dedicated non-root user (Automated)
L1 Auto
Description

This recommendation verifies that etcd runs as a dedicated non-root user on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify etcd runs as a dedicated non-root user
ps -eo user,pid,comm | grep etcd
id etcd 2>/dev/null
Remediation
# Create dedicated etcd user and update service
useradd -r -s /usr/sbin/nologin etcd
chown -R etcd:etcd /var/lib/etcd /etc/etcd
# Update systemd: User=etcd, Group=etcd
1.1.2 Ensure data directory permissions are restricted (Automated)
L1 Auto
Description

This setting ensures that data directory permissions are restricted on the etcd distributed key-value store. Restricting this capability limits potential abuse and enforces the principle of least privilege across the environment.

Rationale

Unrestricted access to this capability could allow unauthorized users or processes to perform actions beyond their intended scope. Applying least-privilege principles to the etcd distributed key-value store is essential for defense in depth.

Audit
# Check etcd data directory permissions
stat -c '%a %U %G' /var/lib/etcd
ls -la /var/lib/etcd/
Remediation
# Restrict data directory permissions
chmod 700 /var/lib/etcd
chown etcd:etcd /var/lib/etcd

2 — TLS Configuration

▶

2.1 Transport Encryption

▶
2.1.1 Ensure client-to-server TLS is enabled with client cert auth (Automated)
L1 Auto
Description

This recommendation verifies that client-to-server TLS is enabled with client cert auth on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify client-to-server TLS is enabled
etcdctl endpoint status --endpoints=https://127.0.0.1:2379 --cacert=/etc/etcd/ca.pem --cert=/etc/etcd/server.pem --key=/etc/etcd/server-key.pem
grep -E 'cert-file|key-file|client-cert-auth' /etc/etcd/etcd.conf.yml
Remediation
# Configure client TLS
# In etcd.conf.yml:
# client-transport-security:
#   cert-file: /etc/etcd/server.pem
#   key-file: /etc/etcd/server-key.pem
#   client-cert-auth: true
#   trusted-ca-file: /etc/etcd/ca.pem
2.1.2 Ensure peer-to-peer TLS is enabled (Automated)
L1 Auto
Description

This recommendation verifies that peer-to-peer TLS is enabled on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify peer-to-peer TLS is enabled
grep -E 'peer-cert-file|peer-key-file|peer-client-cert-auth' /etc/etcd/etcd.conf.yml
Remediation
# Configure peer TLS
# In etcd.conf.yml:
# peer-transport-security:
#   cert-file: /etc/etcd/peer.pem
#   key-file: /etc/etcd/peer-key.pem
#   client-cert-auth: true
#   trusted-ca-file: /etc/etcd/ca.pem

3 — Authentication & Authorization

▶

3.1 RBAC

▶
3.1.1 Ensure RBAC authentication is enabled (Automated)
L1 Auto
Description

This recommendation verifies that RBAC authentication is enabled on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check if RBAC authentication is enabled
etcdctl auth status --endpoints=https://127.0.0.1:2379 --cacert=/etc/etcd/ca.pem
grep 'auth-token' /etc/etcd/etcd.conf.yml
Remediation
# Enable RBAC authentication
etcdctl auth enable
# Create root role and user:
etcdctl role add root
etcdctl user add root --new-user-password='<secure>'
etcdctl user grant-role root root
3.1.2 Ensure least-privilege roles are configured (Manual)
L2 Manual
Description

This recommendation verifies that least-privilege roles are configured on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# List roles and their permissions
etcdctl role list
etcdctl role get root
etcdctl user list
Remediation
# Create least-privilege roles
etcdctl role add app-reader
etcdctl role grant-permission app-reader read /app/ --prefix
etcdctl user add app-svc --new-user-password='<secure>'
etcdctl user grant-role app-svc app-reader

4 — Storage & Backups

▶

4.1 Quotas & Snapshots

▶
4.1.1 Ensure storage quota is configured (Automated)
L1 Auto
Description

This recommendation verifies that storage quota is configured on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify quota backend bytes is configured
grep 'quota-backend-bytes' /etc/etcd/etcd.conf.yml
etcdctl endpoint status -w table
Remediation
# Set storage quota (e.g., 8 GB)
# In etcd.conf.yml:
# quota-backend-bytes: 8589934592
# Monitor with:
etcdctl alarm list
4.1.2 Ensure automated snapshots are configured (Automated)
L1 Auto
Description

This recommendation verifies that automated snapshots are configured on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check snapshot and backup configuration
ls -la /var/backups/etcd/
crontab -l | grep etcd
Remediation
# Configure automated snapshots
mkdir -p /var/backups/etcd
# Add cron job:
# 0 */6 * * * etcdctl snapshot save /var/backups/etcd/snap-$(date +\%Y\%m\%d-\%H\%M).db
# Verify snapshots:
etcdctl snapshot status /var/backups/etcd/latest.db -w table

5 — Network Hardening

▶

5.1 Binding & Limits

▶
5.1.1 Ensure listen addresses are restricted to specific interfaces (Automated)
L1 Auto
Description

This setting ensures that listen addresses are restricted to specific interfaces on the etcd distributed key-value store. Restricting this capability limits potential abuse and enforces the principle of least privilege across the environment.

Rationale

Unrestricted access to this capability could allow unauthorized users or processes to perform actions beyond their intended scope. Applying least-privilege principles to the etcd distributed key-value store is essential for defense in depth.

Audit
# Verify listen addresses are restricted
grep -E 'listen-client-urls|listen-peer-urls|advertise-client-urls' /etc/etcd/etcd.conf.yml
Remediation
# Bind to specific interfaces only
# In etcd.conf.yml:
# listen-client-urls: https://10.0.0.1:2379
# listen-peer-urls: https://10.0.0.1:2380
# Do NOT bind to 0.0.0.0
5.1.2 Ensure maximum request size is limited (Automated)
L2 Auto
Description

This setting ensures that maximum request size is limited on the etcd distributed key-value store. Restricting this capability limits potential abuse and enforces the principle of least privilege across the environment.

Rationale

Unrestricted access to this capability could allow unauthorized users or processes to perform actions beyond their intended scope. Applying least-privilege principles to the etcd distributed key-value store is essential for defense in depth.

Audit
# Check maximum request size limits
grep 'max-request-bytes' /etc/etcd/etcd.conf.yml
Remediation
# Set maximum request size
# In etcd.conf.yml:
# max-request-bytes: 1572864
# (default is 1.5 MB, reduce if not needed)

6 — Cluster Operations

▶

6.1 Compaction & Health

▶
6.1.1 Ensure automatic compaction is configured (Automated)
L1 Auto
Description

This recommendation verifies that automatic compaction is configured on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify WAL and compaction settings
grep -E 'auto-compaction|snapshot-count' /etc/etcd/etcd.conf.yml
etcdctl endpoint status -w table
Remediation
# Configure automatic compaction
# In etcd.conf.yml:
# auto-compaction-mode: periodic
# auto-compaction-retention: '1h'
# snapshot-count: 10000
6.1.2 Ensure cluster has minimum 3-node quorum (Manual)
L1 Manual
Description

This recommendation verifies that cluster has minimum 3-node quorum on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check cluster health and member list
etcdctl endpoint health --cluster
etcdctl member list -w table
Remediation
# Verify minimum 3-node cluster for HA
etcdctl member list -w table
# Ensure odd number of members (3 or 5)
# Remove unhealthy members:
etcdctl member remove <member_id>

7 — Maintenance & Monitoring

▶

7.1 Updates & Metrics

▶
7.1.1 Ensure etcd is running the latest stable version (Manual)
L1 Manual
Description

This recommendation verifies that etcd is running the latest stable version on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check etcd version
etcd --version
etcdctl version
Remediation
# Update etcd to latest stable release
# Download from: https://github.com/etcd-io/etcd/releases
# Follow rolling upgrade procedure:
# 1. Backup current data
# 2. Stop member, replace binary, restart
# 3. Verify health before next member
7.1.2 Ensure metrics endpoint is secured with TLS (Automated)
L2 Auto
Description

This recommendation verifies that metrics endpoint is secured with TLS on the etcd distributed key-value store. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the etcd distributed key-value store vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify metrics endpoint is available and secured
curl -s --cacert /etc/etcd/ca.pem https://127.0.0.1:2379/metrics | head -5
grep 'metrics' /etc/etcd/etcd.conf.yml
Remediation
# Configure metrics endpoint
# In etcd.conf.yml:
# listen-metrics-urls: https://127.0.0.1:2381
# Ensure metrics endpoint requires TLS