Skip to content

Commit df14a3a

Browse files
Merge branch 'master' into ml-fix-link-regression
2 parents ac8ffcc + 5858dd8 commit df14a3a

File tree

353 files changed

+6091
-3381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

353 files changed

+6091
-3381
lines changed

.github/ISSUE_TEMPLATE/security_solution_bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Bug report for Security Solution
33
about: Help us identify bugs in Elastic Security, SIEM, and Endpoint so we can fix them!
44
title: '[Security Solution]'
5-
labels: 'Team: Security Solution'
5+
labels: Team: SecuritySolution
66
---
77

88
**Describe the bug:**

docs/api/saved-objects.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ The following saved objects APIs are available:
2828

2929
* <<saved-objects-api-resolve-import-errors, Resolve import errors API>> to resolve errors from the import API
3030

31+
* <<saved-objects-api-rotate-encryption-key, Rotate encryption key API>> to rotate the encryption key for encrypted saved objects
32+
3133
include::saved-objects/get.asciidoc[]
3234
include::saved-objects/bulk_get.asciidoc[]
3335
include::saved-objects/find.asciidoc[]
@@ -38,3 +40,4 @@ include::saved-objects/delete.asciidoc[]
3840
include::saved-objects/export.asciidoc[]
3941
include::saved-objects/import.asciidoc[]
4042
include::saved-objects/resolve_import_errors.asciidoc[]
43+
include::saved-objects/rotate_encryption_key.asciidoc[]
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
[role="xpack"]
2+
[[saved-objects-api-rotate-encryption-key]]
3+
=== Rotate encryption key API
4+
++++
5+
<titleabbrev>Rotate encryption key</titleabbrev>
6+
++++
7+
8+
experimental[] Rotate the encryption key for encrypted saved objects.
9+
10+
If a saved object cannot be decrypted using the primary encryption key, then {kib} will attempt to decrypt it using the specified <<xpack-encryptedSavedObjects-keyRotation-decryptionOnlyKeys, decryption-only keys>>. In most of the cases this overhead is negligible, but if you're dealing with a large number of saved objects and experiencing performance issues, you may want to rotate the encryption key.
11+
12+
[IMPORTANT]
13+
============================================================================
14+
Bulk key rotation can consume a considerable amount of resources and hence only user with a `superuser` role can trigger it.
15+
============================================================================
16+
17+
[[saved-objects-api-rotate-encryption-key-request]]
18+
==== Request
19+
20+
`POST <kibana host>:<port>/api/encrypted_saved_objects/_rotate_key`
21+
22+
[[saved-objects-api-rotate-encryption-key-request-query-params]]
23+
==== Query parameters
24+
25+
`type`::
26+
(Optional, string) Limits encryption key rotation only to the saved objects with the specified type. By default, {kib} tries to rotate the encryption key for all saved object types that may contain encrypted attributes.
27+
28+
`batchSize`::
29+
(Optional, number) Specifies a maximum number of saved objects that {kib} can process in a single batch. Bulk key rotation is an iterative process since {kib} may not be able to fetch and process all required saved objects in one go and splits processing into consequent batches. By default, the batch size is 10000, which is also a maximum allowed value.
30+
31+
[[saved-objects-api-rotate-encryption-key-response-body]]
32+
==== Response body
33+
34+
`total`::
35+
(number) Indicates the total number of _all_ encrypted saved objects (optionally filtered by the requested `type`), regardless of the key {kib} used for encryption.
36+
37+
`successful`::
38+
(number) Indicates the total number of _all_ encrypted saved objects (optionally filtered by the requested `type`), regardless of the key {kib} used for encryption.
39+
+
40+
NOTE: In most cases, `total` will be greater than `successful` even if `failed` is zero. The reason is that {kib} may not need or may not be able to rotate encryption keys for all encrypted saved objects.
41+
42+
`failed`::
43+
(number) Indicates the number of the saved objects that were still encrypted with one of the old encryption keys that {kib} failed to re-encrypt with the primary key.
44+
45+
[[saved-objects-api-rotate-encryption-key-response-codes]]
46+
==== Response code
47+
48+
`200`::
49+
Indicates a successful call.
50+
51+
`400`::
52+
Indicates that either query parameters are wrong or <<xpack-encryptedSavedObjects-keyRotation-decryptionOnlyKeys, decryption-only keys>> aren't configured.
53+
54+
`429`::
55+
Indicates that key rotation is already in progress.
56+
57+
[[saved-objects-api-rotate-encryption-key-example]]
58+
==== Examples
59+
60+
[[saved-objects-api-rotate-encryption-key-example-1]]
61+
===== Encryption key rotation with default parameters
62+
63+
[source,sh]
64+
--------------------------------------------------
65+
$ curl -X POST /api/encrypted_saved_objects/_rotate_key
66+
--------------------------------------------------
67+
// KIBANA
68+
69+
The API returns the following:
70+
71+
[source,sh]
72+
--------------------------------------------------
73+
{
74+
"total": 1000,
75+
"successful": 300,
76+
"failed": 0
77+
}
78+
--------------------------------------------------
79+
80+
The result indicates that the encryption key was successfully rotated for 300 out of 1000 saved objects with encrypted attributes, and 700 of the saved objects either didn't require key rotation, or were encrypted with an unknown encryption key.
81+
82+
[[saved-objects-api-rotate-encryption-key-example-2]]
83+
===== Encryption key rotation for the specific type with reduce batch size
84+
85+
[IMPORTANT]
86+
============================================================================
87+
Default parameters are optimized for speed. Change the parameters only when necessary. However, if you're experiencing any issues with this API, you may want to decrease a batch size or rotate the encryption keys for the specific types only. In this case, you may need to run key rotation multiple times in a row.
88+
============================================================================
89+
90+
In this example, key rotation is performed for all saved objects with the `alert` type in batches of 5000.
91+
92+
[source,sh]
93+
--------------------------------------------------
94+
$ curl -X POST /api/encrypted_saved_objects/_rotate_key?type=alert&batchSize=5000
95+
--------------------------------------------------
96+
// KIBANA
97+
98+
The API returns the following:
99+
100+
[source,sh]
101+
--------------------------------------------------
102+
{
103+
"total": 100,
104+
"successful": 100,
105+
"failed": 0
106+
}
107+
--------------------------------------------------
108+
109+
The result indicates that the encryption key was successfully rotated for all 100 saved objects with the `alert` type.
110+

docs/developer/plugin-list.asciidoc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,6 @@ which will load the visualization's editor.
286286
|To access an elasticsearch instance that has live data you have two options:
287287
288288
289-
|{kib-repo}blob/{branch}/x-pack/plugins/audit_trail[auditTrail]
290-
|WARNING: Missing README.
291-
292-
293289
|{kib-repo}blob/{branch}/x-pack/plugins/beats_management/readme.md[beatsManagement]
294290
|Notes:
295291
Failure to have auth enabled in Kibana will make for a broken UI. UI-based errors not yet in place
@@ -469,7 +465,8 @@ Elastic.
469465
470466
471467
|{kib-repo}blob/{branch}/x-pack/plugins/security/README.md[security]
472-
|See Configuring security in Kibana.
468+
|See Configuring security in
469+
Kibana.
473470
474471
475472
|{kib-repo}blob/{branch}/x-pack/plugins/security_solution/README.md[securitySolution]

docs/development/core/server/kibana-plugin-core-server.auditableevent.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

docs/development/core/server/kibana-plugin-core-server.auditableevent.message.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/development/core/server/kibana-plugin-core-server.auditableevent.type.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/development/core/server/kibana-plugin-core-server.auditor.add.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

docs/development/core/server/kibana-plugin-core-server.auditor.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/development/core/server/kibana-plugin-core-server.auditor.withauditscope.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)