Skip to content

Commit eeb5218

Browse files
[docs] Improve Secure saved objects and kibana-encryption-keys docs (elastic#132828) (elastic#132871)
(cherry picked from commit ef9e3c4) Co-authored-by: Thomas Watson <[email protected]>
1 parent b139613 commit eeb5218

File tree

2 files changed

+38
-23
lines changed

2 files changed

+38
-23
lines changed

docs/user/security/encryption-keys/index.asciidoc

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,35 @@
11
[[kibana-encryption-keys]]
22
=== Set up encryptions keys to protect sensitive information
33

4-
The `kibana-encryption-keys` command helps you set up encryption keys that {kib} uses
4+
The `kibana-encryption-keys` command helps you generate encryption keys that {kib} uses
55
to protect sensitive information.
66

7-
[discrete]
8-
=== Synopsis
9-
10-
[source,shell]
11-
--------------------------------------------------
12-
bin/kibana-encryption-keys generate
13-
[-i, --interactive] [-q, --quiet]
14-
[-f, --force] [-h, --help]
15-
--------------------------------------------------
16-
17-
[discrete]
18-
=== Description
19-
207
{kib} uses encryption keys in several areas, ranging from encrypting data
218
in {kib} associated indices to storing session information. By defining these
229
encryption keys in your configuration, you'll ensure consistent operations
2310
across restarts.
2411

2512
[discrete]
26-
[[encryption-key-parameters]]
27-
=== Parameters
28-
29-
`generate`:: Randomly generates passwords to the console.
13+
=== Usage
3014

31-
`-i, --interactive`:: Prompts you for which encryption keys to set and optionally
32-
where to save a sample configuration file.
33-
34-
`-q, --quiet`:: Outputs the encryption keys without helper information.
15+
[source,shell]
16+
--------------------------------------------------
17+
bin/kibana-encryption-keys [command] [options]
18+
--------------------------------------------------
3519

36-
`-f, --force`:: Shows help information.
20+
[discrete]
21+
[[encryption-key-parameters]]
22+
=== Commands
23+
24+
`generate`:: Generate encryption keys.
25+
+
26+
Unless interactive mode (`-i`) is used, the generated encryption keys will be output to your console only.
27+
From here, you should manually copy the keys into either `kibana.yml` or where else you're configurating {kib}.
28+
+
29+
`-i, --interactive`::: Prompts you for which encryption keys to set and optionally where to save a sample configuration file.
30+
`-q, --quiet`::: Outputs the config options/encryption keys only (without helper information).
31+
`-f, --force`::: Generates new keys for all settings. By default, only un-configured encryption keys will be generated.
32+
`-h, --help`::: Shows help information.
3733

3834
[discrete]
3935
=== Examples

docs/user/security/secure-saved-objects.asciidoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ xpack.encryptedSavedObjects:
1919
If you don't specify an encryption key, {kib} automatically generates a random key at startup. Every time you restart {kib}, it uses a new ephemeral encryption key and is unable to decrypt saved objects encrypted with another key. To prevent data loss, {kib} might disable features that rely on this encryption until you explicitly set an encryption key.
2020
============================================================================
2121

22+
[TIP]
23+
============================================================================
24+
For help generating the encryption key, refer to the <<kibana-encryption-keys, `kibana-encryption-keys`>> script.
25+
============================================================================
26+
2227
[[encryption-key-rotation]]
2328
==== Encryption key rotation
2429

@@ -45,3 +50,17 @@ You might also leverage this functionality if multiple {kib} instances connected
4550
============================================================================
4651

4752
At some point, you might want to dispose of old encryption keys completely. Make sure there are no saved objects that {kib} encrypted with these encryption keys. You can use the <<saved-objects-api-rotate-encryption-key, rotate encryption key API>> to determine which existing saved objects require decryption-only keys and re-encrypt them with the primary key.
53+
54+
[[encryption-key-docker-configuration]]
55+
==== Docker configuration
56+
57+
It's also possible to configure the encryption keys using <<environment-variable-config,Docker environment variables>>.
58+
59+
Docker environment variable examples:
60+
61+
[source,sh]
62+
--------------------------------------------------------------------------------
63+
XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY="min-32-byte-long-NEW-encryption-key"
64+
XPACK_ENCRYPTEDSAVEDOBJECTS_KEYROTATION_DECRYPTIONONLYKEYS[0]="min-32-byte-long-OLD#1-encryption-key"
65+
XPACK_ENCRYPTEDSAVEDOBJECTS_KEYROTATION_DECRYPTIONONLYKEYS[1]="min-32-byte-long-OLD#2-encryption-key"
66+
--------------------------------------------------------------------------------

0 commit comments

Comments
 (0)