Description
Check that etcd members verify one another’s certificates on the HTTPS peer connections they use for replication and consensus. In etcd 3.4, setting --peer-trusted-ca-file enables peer verification even when --peer-client-cert-auth=false.
Potential impact
If peer identity goes unchecked and the peer network is accessible to unauthorized parties, replication data and cluster operations are at risk.
Remediation
- Configure a peer certificate, private key and HTTPS peer URLs on each member. Point
--peer-trusted-ca-fileto the peer CA and set--peer-client-cert-auth=true. - Restrict private-key and peer-network access, and plan certificate renewal. After the change, check that members can communicate and that untrusted certificates are rejected. Configure client API authentication separately.
Examples
The etcd 3.2.18 excerpts change the peer verification flag from false to true. They omit the peer CA, certificates, keys and HTTPS URLs.
Before
yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-etcd-deployment
spec:
template:
spec:
containers:
- name: database
image: gcr.io/google_containers/etcd:v3.2.18
command: ["etcd"]
args: ["--peer-client-cert-auth=false"]
After
yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-etcd-deployment
spec:
template:
spec:
containers:
- name: database
image: gcr.io/google_containers/etcd:v3.2.18
command: ["etcd"]
args: ["--peer-client-cert-auth=true"]