Skip to content

Commit

Permalink
Merge branch 'master' into monitoring/cpu_usage_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Oct 20, 2020
2 parents f4dec15 + bf0f8bb commit 16b6225
Show file tree
Hide file tree
Showing 1,163 changed files with 30,096 additions and 13,907 deletions.
16 changes: 8 additions & 8 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,18 @@
#CC# /x-pack/plugins/beats_management/ @elastic/beats

# Canvas
/src/plugins/dashboard/ @elastic/kibana-app
/src/plugins/input_control_vis/ @elastic/kibana-app
/src/plugins/vis_type_markdown/ @elastic/kibana-app
/src/plugins/dashboard/ @elastic/kibana-canvas
/src/plugins/input_control_vis/ @elastic/kibana-canvas
/src/plugins/vis_type_markdown/ @elastic/kibana-canvas
/x-pack/plugins/canvas/ @elastic/kibana-canvas
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-app
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-canvas
/x-pack/test/functional/apps/canvas/ @elastic/kibana-canvas
#CC# /src/legacy/core_plugins/kibana/public/dashboard/ @elastic/kibana-app
#CC# /src/legacy/core_plugins/input_control_vis @elastic/kibana-app
#CC# /src/legacy/core_plugins/kibana/public/dashboard/ @elastic/kibana-canvas
#CC# /src/legacy/core_plugins/input_control_vis @elastic/kibana-canvas
#CC# /src/plugins/kibana_react/public/code_editor/ @elastic/kibana-canvas
#CC# /x-pack/legacy/plugins/canvas/ @elastic/kibana-canvas
#CC# /x-pack/plugins/dashboard_mode @elastic/kibana-app
#CC# /x-pack/legacy/plugins/dashboard_mode/ @elastic/kibana-app
#CC# /x-pack/plugins/dashboard_mode @elastic/kibana-canvas
#CC# /x-pack/legacy/plugins/dashboard_mode/ @elastic/kibana-canvas

# Core UI
# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Security Solution Bug Report
name: Bug report for Security Solution
about: Help us identify bugs in Elastic Security, SIEM, and Endpoint so we can fix them!
title: '[Security Solution]'
labels: Team:Security Solution
labels: 'Team: SecuritySolution'
---

**Describe the bug:**
Expand Down
8 changes: 0 additions & 8 deletions docs/api/features.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ The API returns the following:
{
"id": "discover",
"name": "Discover",
"icon": "discoverApp",
"navLinkId": "discover",
"app": [
"kibana"
],
Expand Down Expand Up @@ -73,8 +71,6 @@ The API returns the following:
{
"id": "visualize",
"name": "Visualize",
"icon": "visualizeApp",
"navLinkId": "visualize",
"app": [
"kibana"
],
Expand Down Expand Up @@ -120,8 +116,6 @@ The API returns the following:
{
"id": "dashboard",
"name": "Dashboard",
"icon": "dashboardApp",
"navLinkId": "dashboards",
"app": [
"kibana"
],
Expand Down Expand Up @@ -172,8 +166,6 @@ The API returns the following:
{
"id": "dev_tools",
"name": "Dev Tools",
"icon": "devToolsApp",
"navLinkId": "dev_tools",
"app": [
"kibana"
],
Expand Down
3 changes: 3 additions & 0 deletions docs/api/saved-objects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The following saved objects APIs are available:

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

* <<saved-objects-api-rotate-encryption-key, Rotate encryption key API>> to rotate the encryption key for encrypted saved objects

include::saved-objects/get.asciidoc[]
include::saved-objects/bulk_get.asciidoc[]
include::saved-objects/find.asciidoc[]
Expand All @@ -38,3 +40,4 @@ include::saved-objects/delete.asciidoc[]
include::saved-objects/export.asciidoc[]
include::saved-objects/import.asciidoc[]
include::saved-objects/resolve_import_errors.asciidoc[]
include::saved-objects/rotate_encryption_key.asciidoc[]
110 changes: 110 additions & 0 deletions docs/api/saved-objects/rotate_encryption_key.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
[role="xpack"]
[[saved-objects-api-rotate-encryption-key]]
=== Rotate encryption key API
++++
<titleabbrev>Rotate encryption key</titleabbrev>
++++

experimental[] Rotate the encryption key for encrypted saved objects.

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.

[IMPORTANT]
============================================================================
Bulk key rotation can consume a considerable amount of resources and hence only user with a `superuser` role can trigger it.
============================================================================

[[saved-objects-api-rotate-encryption-key-request]]
==== Request

`POST <kibana host>:<port>/api/encrypted_saved_objects/_rotate_key`

[[saved-objects-api-rotate-encryption-key-request-query-params]]
==== Query parameters

`type`::
(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.

`batchSize`::
(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.

[[saved-objects-api-rotate-encryption-key-response-body]]
==== Response body

`total`::
(number) Indicates the total number of _all_ encrypted saved objects (optionally filtered by the requested `type`), regardless of the key {kib} used for encryption.

`successful`::
(number) Indicates the total number of _all_ encrypted saved objects (optionally filtered by the requested `type`), regardless of the key {kib} used for encryption.
+
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.

`failed`::
(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.

[[saved-objects-api-rotate-encryption-key-response-codes]]
==== Response code

`200`::
Indicates a successful call.

`400`::
Indicates that either query parameters are wrong or <<xpack-encryptedSavedObjects-keyRotation-decryptionOnlyKeys, decryption-only keys>> aren't configured.

`429`::
Indicates that key rotation is already in progress.

[[saved-objects-api-rotate-encryption-key-example]]
==== Examples

[[saved-objects-api-rotate-encryption-key-example-1]]
===== Encryption key rotation with default parameters

[source,sh]
--------------------------------------------------
$ curl -X POST /api/encrypted_saved_objects/_rotate_key
--------------------------------------------------
// KIBANA

The API returns the following:

[source,sh]
--------------------------------------------------
{
"total": 1000,
"successful": 300,
"failed": 0
}
--------------------------------------------------

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.

[[saved-objects-api-rotate-encryption-key-example-2]]
===== Encryption key rotation for the specific type with reduce batch size

[IMPORTANT]
============================================================================
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.
============================================================================

In this example, key rotation is performed for all saved objects with the `alert` type in batches of 5000.

[source,sh]
--------------------------------------------------
$ curl -X POST /api/encrypted_saved_objects/_rotate_key?type=alert&batchSize=5000
--------------------------------------------------
// KIBANA

The API returns the following:

[source,sh]
--------------------------------------------------
{
"total": 100,
"successful": 100,
"failed": 0
}
--------------------------------------------------

The result indicates that the encryption key was successfully rotated for all 100 saved objects with the `alert` type.

15 changes: 0 additions & 15 deletions docs/developer/architecture/security/feature-registration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,6 @@ of features within the management screens.
|See <<example-3-discover,Example 3>>
|The set of subfeatures that enables finer access control than the `all` and `read` feature privileges. These options are only available in the Gold subscription level and higher.

|`icon`
|`string`
|"discoverApp"
|An https://elastic.github.io/eui/#/display/icons[EUI Icon] to use for this feature.

|`navLinkId`
|`string`
|"sample_app"
|The ID of the navigation link associated with your feature.
|===

==== Privilege definition
Expand Down Expand Up @@ -100,8 +91,6 @@ public setup(core, { features }) {
features.registerKibanaFeature({
id: 'canvas',
name: 'Canvas',
icon: 'canvasApp',
navLinkId: 'canvas',
category: DEFAULT_APP_CATEGORIES.kibana,
app: ['canvas', 'kibana'],
catalogue: ['canvas'],
Expand Down Expand Up @@ -160,8 +149,6 @@ public setup(core, { features }) {
name: i18n.translate('xpack.features.devToolsFeatureName', {
defaultMessage: 'Dev Tools',
}),
icon: 'devToolsApp',
navLinkId: 'dev_tools',
category: DEFAULT_APP_CATEGORIES.management,
app: ['kibana'],
catalogue: ['console', 'searchprofiler', 'grokdebugger'],
Expand Down Expand Up @@ -223,8 +210,6 @@ public setup(core, { features }) {
defaultMessage: 'Discover',
}),
order: 100,
icon: 'discoverApp',
navLinkId: 'discover',
category: DEFAULT_APP_CATEGORIES.kibana,
app: ['kibana'],
catalogue: ['discover'],
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/best-practices/typescript.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This architecture imposes several limitations to which we must comply:
[discrete]
==== Prerequisites
Since project refs rely on generated `d.ts` files, the migration order does matter. You can migrate your plugin only when all the plugin dependencies already have migrated. It creates a situation where commonly used plugins (such as `data` or `kibana_react`) have to migrate first.
https://github.com/elastic/kibana/issues/79343 is going to provide a tool for identifying a plugin dependency tree.
Run `node scripts/find_plugins_without_ts_refs.js --id your_plugin_id` to get a list of plugins that should be switched to TS project refs to unblock your plugin migration.

[discrete]
==== Implementation
Expand Down
7 changes: 2 additions & 5 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,6 @@ which will load the visualization's editor.
|To access an elasticsearch instance that has live data you have two options:
|{kib-repo}blob/{branch}/x-pack/plugins/audit_trail[auditTrail]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/beats_management/readme.md[beatsManagement]
|Notes:
Failure to have auth enabled in Kibana will make for a broken UI. UI-based errors not yet in place
Expand Down Expand Up @@ -469,7 +465,8 @@ Elastic.
|{kib-repo}blob/{branch}/x-pack/plugins/security/README.md[security]
|See Configuring security in Kibana.
|See Configuring security in
Kibana.
|{kib-repo}blob/{branch}/x-pack/plugins/security_solution/README.md[securitySolution]
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions docs/development/core/server/kibana-plugin-core-server.auditor.md

This file was deleted.

Loading

0 comments on commit 16b6225

Please sign in to comment.