Skip to content

Commit b749f91

Browse files
author
Tim Bannister
committed
Document avoiding plain text retrieval
When you have set up your cluster for encryption at rest, you can take this defence in depth measure to make sure that anything held without encryption causes a retrieval error (which is then more likely to flag that there is a problem).
1 parent d792a64 commit b749f91

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

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

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,43 @@ For larger clusters, you may wish to subdivide the Secrets by namespace,
562562
or script an update.
563563
{{< /note >}}
564564

565+
## Prevent plain text retrieval {#cleanup-all-secrets-encrypted}
566+
567+
If you want to make sure that the only access to a particular API kind is done using
568+
encryption, you can remove the API server's ability to read that API's backing data
569+
as plaintext.
570+
571+
{{< warning >}}
572+
Making this change prevents the API server from retrieving resources that are marked
573+
as encrypted as rest, but are actually stored in the clear.
574+
575+
When you have configured encryption at rest for an API (for example: the API kind
576+
`Secret`, representing `secrets` resources in the core API group), you **must** ensure
577+
that all those resources in this cluster really are encrypted at rest. Check this before
578+
you carry on with the next steps.
579+
{{< /warning >}}
580+
581+
Once all Secrets in your cluster are encrypted, you can remove the `identity`
582+
part of the encryption configuration. For example:
583+
584+
{{< highlight yaml "linenos=false,hl_lines=12" >}}
585+
---
586+
apiVersion: apiserver.config.k8s.io/v1
587+
kind: EncryptionConfiguration
588+
resources:
589+
- resources:
590+
- secrets
591+
providers:
592+
- aescbc:
593+
keys:
594+
- name: key1
595+
secret: <BASE 64 ENCODED SECRET>
596+
- identity: {} # REMOVE THIS LINE
597+
{{< /highlight >}}
598+
599+
…and then restart each API server in turn. This change prevents the API server
600+
from accessing a plain-text Secret, even by accident.
601+
565602
## Rotating a decryption key
566603

567604
Changing a Secret without incurring downtime requires a multi-step operation, especially in

0 commit comments

Comments
 (0)