Skip to content

Commit a6f7f71

Browse files
authored
chore(docs/admin): update encryption.md (#9660)
1 parent e2579e9 commit a6f7f71

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docs/admin/encryption.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ if you need to rotate keys, you can perform the following procedure:
8787
1. Generate a new encryption key following the same procedure as above.
8888
8989
1. Add the above key to the list of
90-
[external token encryption keys](../cli/server.md#external-token-encryption-keys).
90+
[external token encryption keys](../cli/server.md#--external-token-encryption-keys).
9191
**The new key must appear first in the list**. For example, in the Kubernetes
9292
secret created above:
9393
@@ -127,14 +127,19 @@ To disable encryption, perform the following actions:
127127
1. Ensure you have a valid backup of your database. **Do not skip this step.**
128128

129129
1. Stop all active coderd instances. This will prevent new encrypted data from
130-
being written.
130+
being written, which may cause the next step to fail.
131131

132132
1. Run [`coder server dbcrypt decrypt`](../cli/server_dbcrypt_decrypt.md). This
133133
command will decrypt all encrypted user tokens and revoke all active
134134
encryption keys.
135135

136+
> Note: for `decrypt` command, the equivalent environment variable for
137+
> `--keys` is `CODER_EXTERNAL_TOKEN_ENCRYPTION_DECRYPT_KEYS` and not
138+
> `CODER_EXTERNAL_TOKEN_ENCRYPTION_KEYS`. This is explicitly named
139+
> differently to help prevent accidentally decrypting data.
140+
136141
1. Remove all
137-
[external token encryption keys](../cli/server.md#external-token-encryption-keys)
142+
[external token encryption keys](../cli/server.md#--external-token-encryption-keys)
138143
from Coder's configuration.
139144

140145
1. Start coderd. You can now safely delete the encryption keys from your secret
@@ -156,7 +161,7 @@ To delete all encrypted data from your database, perform the following actions:
156161
encryption keys.
157162

158163
1. Remove all
159-
[external token encryption keys](../cli/server.md#external-token-encryption-keys)
164+
[external token encryption keys](../cli/server.md#--external-token-encryption-keys)
160165
from Coder's configuration.
161166

162167
1. Start coderd. You can now safely delete the encryption keys from your secret
@@ -171,3 +176,6 @@ To delete all encrypted data from your database, perform the following actions:
171176
that is no longer active, it will refuse to start. If you are seeing this
172177
behaviour, ensure that the encryption keys provided are correct and that you
173178
have not revoked any keys that are still in use.
179+
- Decryption may fail if newly encrypted data is written while decryption is in
180+
progress. If this happens, ensure that all active coder instances are stopped,
181+
and retry.

0 commit comments

Comments
 (0)