Description
With --peer-auto-tls=true, etcd generates self-signed certificates to encrypt traffic between members. To verify that a connection comes from a trusted peer, configure a peer CA and a certificate for each member.
Potential impact
Without peer verification, a member cannot confirm the identity of its replication partner. Disabling automatic TLS before its replacement is ready can interrupt peer connectivity or encryption.
Remediation
- Prepare the peer certificate and private key on each member, HTTPS peer URLs and
--peer-trusted-ca-file. - Set
--peer-client-cert-auth=trueand disable automatic TLS as you switch to the prepared settings. - Confirm that members still communicate and untrusted certificates are rejected. Renew the certificates before they expire.
Examples
These excerpts show etcd 3.2.18 arguments. Use a supported version in production.
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-auto-tls=true"]
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: []
The empty argument list in the second excerpt only removes automatic TLS. Supply the peer certificates and HTTPS settings described above.