Skip to content

Commit ae8e35e

Browse files
committed
address review comments
1 parent 5415725 commit ae8e35e

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

docs/tasks/administer-cluster/encrypt-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Name | Encryption | Strength | Speed | Key Length | Other Considerations
7979
`aescbc` | AES-CBC with PKCS#7 padding | Strongest | Fast | 32-byte | The recommended choice for encryption at rest but may be slightly slower than `secretbox`.
8080
`secretbox` | XSalsa20 and Poly1305 | Strong | Faster | 32-byte | A newer standard and may not be considered acceptable in environments that require high levels of review.
8181
`aesgcm` | AES-GCM with random nonce | Must be rotated every 200k writes | Fastest | 16, 24, or 32-byte | Is not recommended for use except when an automated key rotation scheme is implemented.
82-
`kms` | Data is encrypted using AES-CBC with PKCS#7 padding, DEKs are encrypted according to configuration in KMS | Strongest, new DEK is generated for each encryption | Fast | 32-bytes for data, Key length for encrypting DEKs is configured in kms | [Configure the KMS provider](/docs/tasks/administer-cluster/kms-provider/)
82+
`kms` | Uses envelope encryption scheme: Data is encrypted by data encryption keys (DEKs) using AES-CBC with PKCS#7 padding, DEKs are encrypted by key encryption keys (KEKs) according to configuration in Key Management Service (KMS) | Strongest | Fast | 32-bytes | The recommended choice for using a third party tool for key management. Simplifies key rotation, with a new DEK generated for each encryption, and KEK rotation controlled by the user. [Configure the KMS provider](/docs/tasks/administer-cluster/kms-provider/)
8383

8484
Each provider supports multiple keys - the keys are tried in order for decryption, and if the provider
8585
is the first provider, the first key is used for encryption.

docs/tasks/administer-cluster/kms-provider.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,22 @@ This page shows how to configure a Key Management Service (KMS) provider and plu
1515

1616
* etcd v3 or later is required
1717

18-
*The KMS provider is alpha in Kubernetes version 1.10.0, which means that it may change without notice. You may be required to decrypt your data prior to upgrading to 1.11.0
18+
{% assign for_k8s_version="v1.10" %}{% include feature-state-alpha.md %}
1919

2020
{% endcapture %}
2121

2222
{% capture steps %}
2323

24-
The KMS encryption provider uses an envelope encryption scheme to encrypt data in etcd. The Key encryption keys (KEKs) are
25-
stored and managed in a remote KMS. The KMS provider uses gRPC to communicate with a specific KMS
24+
The KMS encryption provider uses an envelope encryption scheme to encrypt data in etcd. The data is encrypted using a data encryption key (DEK); a new DEK is generated for each encryption. The DEKs are encrypted with a key encryption key (KEK) that is stored and managed in a remote KMS. The KMS provider uses gRPC to communicate with a specific KMS
2625
plugin. The KMS plugin, which is implemented as a gRPC server and deployed on the same host(s) as the Kubernetes master(s), is responsible for all communication with the remote KMS.
2726

2827
## Configuring the KMS provider
2928

30-
To configure a KMS provider on the API server, include a provider of type kms in the providers array in the encryption configuration file and set the following properties:
29+
To configure a KMS provider on the API server, include a provider of type ```kms``` in the providers array in the encryption configuration file and set the following properties:
3130

3231
* `name`: Display name of the KMS plugin.
33-
* `endpoint`: Listen address of the gRPC server (KMS plugin). The endpoint is a UNIX domain socket connection.
34-
* `cachesize`: Number of data encryption keys (DEKs) to be cached in the clear. DEKs are used in Envelope encryption.
32+
* `endpoint`: Listen address of the gRPC server (KMS plugin). The endpoint is a UNIX domain socket.
33+
* `cachesize`: Number of data encryption keys (DEKs) to be cached in the clear. When cached, DEKs can be used without another call to the KMS; whereas DEKs that are not cached require a call to the KMS to unwrap..
3534

3635
See [Understanding the encryption at rest configuration.](/docs/tasks/administer-cluster/encrypt-data)
3736

@@ -76,7 +75,7 @@ Ensure that the KMS plugin runs on the same host(s) as the Kubernetes master(s).
7675
## Encrypting your data with the KMS provider
7776
To encrypt the data:
7877

79-
1. Create a new encryption configuration file using the appropriate properties for the KMS provider:
78+
1. Create a new encryption configuration file using the appropriate properties for the `kms` provider:
8079

8180
```yaml
8281
kind: EncryptionConfig
@@ -86,9 +85,9 @@ resources:
8685
- secrets
8786
providers:
8887
- kms:
89-
name: <display name of the KMS plugin>
90-
endpoint: <UNIX domain socket listen address of the gRPC server (KMS plugin)>
91-
cachesize: <number of data encryption keys (DEKs) to be cached in the clear>
88+
name: myKmsPlugin
89+
endpoint: unix:///tmp/socketfile.sock
90+
cachesize: 100
9291
- identity: {}
9392
```
9493
@@ -106,9 +105,9 @@ kubectl create secret generic secret1 -n default --from-literal=mykey=mydata
106105
```
107106
ETCDCTL_API=3 etcdctl get /kubernetes.io/secrets/default/secret1 [...] | hexdump -C
108107
```
109-
where [...] must be the additional arguments for connecting to the etcd server.
108+
where `[...]` must be the additional arguments for connecting to the etcd server.
110109

111-
3. Verify the stored secret is prefixed with `k8s:enc:kms:v1:`, which indicates that the KMS provider has encrypted the resulting data.
110+
3. Verify the stored secret is prefixed with `k8s:enc:kms:v1:`, which indicates that the `kms` provider has encrypted the resulting data.
112111

113112
4. Verify that the secret is correctly decrypted when retrieved via the API:
114113
```
@@ -125,9 +124,9 @@ kubectl get secrets --all-namespaces -o json | kubectl replace -f -
125124
```
126125
127126
## Switching from a local encryption provider to the KMS provider
128-
To switch from a local encryption provider to the KMS provider and re-encrypt all of the secrets:
127+
To switch from a local encryption provider to the `kms` provider and re-encrypt all of the secrets:
129128
130-
1. Add the KMS provider as the first entry in the configuration file as shown in the following example.
129+
1. Add the `kms` provider as the first entry in the configuration file as shown in the following example.
131130
132131
```yaml
133132
kind: EncryptionConfig
@@ -137,9 +136,9 @@ resources:
137136
- secrets
138137
providers:
139138
- kms:
140-
name : <display name of the KMS plugin>
141-
endpoint: <UNIX domain socket listen address of the gRPC server (KMS plugin)>
142-
cachesize: <number of data encryption keys (DEKs) to be cached in the clear>
139+
name : myKmsPlugin
140+
endpoint: unix:///tmp/socketfile.sock
141+
cachesize: 100
143142
- aescbc:
144143
keys:
145144
- name: key1
@@ -148,16 +147,16 @@ resources:
148147

149148
2. Restart all kube-apiserver processes.
150149

151-
3. Run the following command to force all secrets to be re-encrypted using the KMS provider.
150+
3. Run the following command to force all secrets to be re-encrypted using the `kms` provider.
152151

153152
```
154153
kubectl get secrets --all-namespaces -o json| kubectl replace -f -
155154
```
156155

157-
## Decrypting your data
156+
## Disabling encryption at rest
158157
To disable encryption at rest:
159158

160-
1. Place the identity provider as the first entry in the configuration file:
159+
1. Place the `identity` provider as the first entry in the configuration file:
161160

162161
```yaml
163162
kind: EncryptionConfig
@@ -168,9 +167,9 @@ resources:
168167
providers:
169168
- identity: {}
170169
- kms:
171-
name : <display name for the KMS plugin>
172-
endpoint: <unix domain socket listen address of the gRPC server (KMS plugin)>
173-
cachesize: <number of data encryption keys (DEKs) to be cached in clear>
170+
name : myKmsPlugin
171+
endpoint: unix:///tmp/socketfile.sock
172+
cachesize: 100
174173
```
175174
2. Restart all kube-apiserver processes.
176175
3. Run the following command to force all secrets to be decrypted.

0 commit comments

Comments
 (0)