@@ -122,15 +122,17 @@ resources:
122
122
123
123
Each ` resources` array item is a separate config and contains a complete configuration. The
124
124
` resources.resources` field is an array of Kubernetes resource names (`resource` or `resource.group`)
125
- that should be encrypted like Secrets, ConfigMaps, or other resources.
125
+ that should be encrypted like Secrets, ConfigMaps, or other resources.
126
126
127
- If custom resources are added to `EncryptionConfiguration` and the cluster version is 1.26 or newer,
128
- any newly created custom resources mentioned in the `EncryptionConfiguration` will be encrypted.
127
+ If custom resources are added to `EncryptionConfiguration` and the cluster version is 1.26 or newer,
128
+ any newly created custom resources mentioned in the `EncryptionConfiguration` will be encrypted.
129
129
Any custom resources that existed in etcd prior to that version and configuration will be unencrypted
130
130
until they are next written to storage. This is the same behavior as built-in resources.
131
131
See the [Ensure all secrets are encrypted](#ensure-all-secrets-are-encrypted) section.
132
132
133
133
The `providers` array is an ordered list of the possible encryption providers to use for the APIs that you listed.
134
+ Each provider supports multiple keys - the keys are tried in order for decryption, and if the provider
135
+ is the first provider, the first key is used for encryption.
134
136
135
137
Only one provider type may be specified per entry (`identity` or `aescbc` may be provided,
136
138
but not both in the same item).
@@ -142,7 +144,7 @@ is returned which prevents clients from accessing that resource.
142
144
` EncryptionConfiguration` supports the use of wildcards to specify the resources that should be encrypted.
143
145
Use '`*.<group>`' to encrypt all resources within a group (for eg '`*.apps`' in above example) or '`*.*`'
144
146
to encrypt all resources. '`*.`' can be used to encrypt all resource in the core group. '`*.*`' will
145
- encrypt all resources, even custom resources that are added after API server start.
147
+ encrypt all resources, even custom resources that are added after API server start.
146
148
147
149
{{< note >}} Use of wildcards that overlap within the same resource list or across multiple entries are not allowed
148
150
since part of the configuration would be ineffective. The `resources` list's processing order and precedence
@@ -171,9 +173,12 @@ the only recourse is to delete that key from the underlying etcd directly. Calls
171
173
read that resource will fail until it is deleted or a valid decryption key is provided.
172
174
{{< /caution >}}
173
175
174
- # ## Providers
176
+ # ## Available providers {#providers}
175
177
176
- The following table describes each available provider :
178
+ Before you configure encryption-at-rest for data in your cluster's Kubernetes API, you
179
+ need to select which provider(s) you will use.
180
+
181
+ The following table describes each available provider.
177
182
178
183
<!-- localization note : if it makes sense to adapt this table to work for your localization,
179
184
please do that. Each sentence in the English original should have a direct equivalent in the adapted
@@ -279,31 +284,43 @@ The following table describes each available provider:
279
284
</tbody>
280
285
</table>
281
286
282
- Each provider supports multiple keys - the keys are tried in order for decryption, and if the provider
283
- is the first provider, the first key is used for encryption.
287
+ The `identity` provider is the default if you do not specify otherwise. **The `identity` provider does not
288
+ encrypt stored data and provides _no_ additional confidentiality protection.**
284
289
290
+ # ## Key storage
285
291
286
- {{< caution >}}
287
- Storing the raw encryption key in the EncryptionConfig only moderately improves your security
288
- posture, compared to no encryption. Please use `kms` provider for additional security.
289
- {{< /caution >}}
290
-
291
- By default, the `identity` provider is used to protect secret data in etcd, which provides no
292
- encryption. `EncryptionConfiguration` was introduced to encrypt secret data locally, with a locally
293
- managed key.
292
+ # ### Local key storage
294
293
295
294
Encrypting secret data with a locally managed key protects against an etcd compromise, but it fails to
296
295
protect against a host compromise. Since the encryption keys are stored on the host in the
297
296
EncryptionConfiguration YAML file, a skilled attacker can access that file and extract the encryption
298
297
keys.
299
298
300
- Envelope encryption creates dependence on a separate key, not stored in Kubernetes. In this case,
301
- an attacker would need to compromise etcd, the `kubeapi-server`, and the third-party KMS provider to
302
- retrieve the plaintext values, providing a higher level of security than locally stored encryption keys.
299
+ # ### Managed (KMS) key storage {#kms-key-storage}
300
+
301
+ The KMS provider uses _envelope encryption_ : Kubernetes encrypts resources using a data key, and then
302
+ encrypts that data key using the managed encryption service. Kubernetes generates a unique data key for
303
+ each resource. The API server stores an encrypted version of the data key in etcd alongside the ciphertext;
304
+ when reading the resource, the API server calls the managed encryption service and provides both the
305
+ ciphertext and the (encrypted) data key.
306
+ Within the managed encryption service, the provider use a _key encryption key_ to decipher the data key,
307
+ deciphers the data key, and finally recovers the plain text. Communication between the control plane
308
+ and the KMS requires in-transit protection, such as TLS.
309
+
310
+ Using envelope encryption creates dependence on the key encryption key, which is not stored in Kubernetes.
311
+ In the KMS case, an attacker who intends to get unauthorised access to the plaintext
312
+ values would need to compromise etcd **and** the third-party KMS provider.
303
313
304
- # # Encrypting your data
314
+ # # Write an encryption configuration file
315
+
316
+ {{< caution >}}
317
+ The encryption configuration file may contain keys that can decrypt content in etcd.
318
+ If the configuration file contains any key material, you must properly
319
+ restrict permissions on all your control plane hosts so only the user
320
+ who runs the kube-apiserver can read this configuration.
321
+ {{< /caution >}}
305
322
306
- Create a new encryption config file :
323
+ Create a new encryption configuration file. The contents should be similar to :
307
324
308
325
` ` ` yaml
309
326
---
0 commit comments