Description
If etcd and kube-apiserver trust the same CA for client authentication, a certificate issued for one may pass certificate verification at the other. Each service’s authentication and authorization settings still govern access.
Potential impact
A compromised CA key or issuer account may require replacing client certificates for both services.
Remediation
Use separate CAs and issuance permissions. Compare the actual CA certificates in etcd’s --trusted-ca-file and the API server’s --client-ca-file. Migrate existing clients, then test that the expected certificates work and certificates from the other CA are rejected.
Examples
These excerpts show historical etcd and API server arguments. Mount the certificate files and configure both components for supported versions.
Before
apiVersion: apps/v1
kind: Deployment
metadata:
name: database
spec:
template:
spec:
containers:
- name: database
image: gcr.io/google_containers/etcd:v3.2.18
command: ["etcd"]
args: ["--trusted-ca-file=/etc/env/valid3.pem"]
---
apiVersion: v1
kind: Pod
metadata:
name: command-demo
spec:
containers:
- name: command-demo-container
image: gcr.io/google_containers/kube-apiserver-amd64:v1.6.0
command: ["kube-apiserver"]
args: ["--client-ca-file=/etc/env/valid3.pem"]
After
apiVersion: v1
kind: Pod
metadata:
name: command-demo
spec:
containers:
- name: command-demo-container
image: gcr.io/google_containers/kube-apiserver-amd64:v1.6.0
command: ["kube-apiserver"]
args: ["--client-ca-file=/etc/env/valid.pem"]
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: database
spec:
template:
spec:
containers:
- name: database
image: gcr.io/google_containers/etcd:v3.2.18
command: ["etcd"]
args: ["--trusted-ca-file=/etc/env/valid2.pem"]