Skip to content

Commit

Permalink
Merge branch 'main' into 120999-time-picker-options-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Dec 16, 2021
2 parents df89cf4 + ba9213b commit 7661c38
Show file tree
Hide file tree
Showing 196 changed files with 4,408 additions and 2,120 deletions.
2 changes: 1 addition & 1 deletion .buildkite/scripts/post_build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ echo "--- Upload Build Artifacts"
# Moving to `target/` first will keep `buildkite-agent` from including directories in the artifact name
cd "$KIBANA_DIR/target"
cp kibana-*-linux-x86_64.tar.gz kibana-default.tar.gz
buildkite-agent artifact upload "./*.tar.gz;./*.zip"
buildkite-agent artifact upload "./*.tar.gz;./*.zip;./*.deb;./*.rpm"
cd -
6 changes: 2 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -409,15 +409,13 @@
/x-pack/plugins/security_solution/public/common/lib/endpoint*/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/public/common/components/endpoint/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/common/endpoint/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/server/endpoint/routes/actions/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/server/endpoint/routes/metadata/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/server/endpoint/lib/policy/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/server/endpoint/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/server/lib/license/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/server/fleet_integration/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/scripts/endpoint/event_filters/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/test/security_solution_endpoint/apps/endpoint/ @elastic/security-onboarding-and-lifecycle-mgt
/x-pack/test/security_solution_endpoint_api_int/ @elastic/security-onboarding-and-lifecycle-mgt

## Security Solution sub teams - security-telemetry (Data Engineering)
x-pack/plugins/security_solution/server/usage/ @elastic/security-telemetry
Expand Down
2 changes: 1 addition & 1 deletion docs/api/saved-objects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Manage {kib} saved objects, including dashboards, visualizations, and more.
WARNING: Do not write documents directly to the `.kibana` index. When you write directly
to the `.kibana` index, the data becomes corrupted and permanently breaks future {kib} versions.

NOTE: For managing {kib} index patterns, use the <<data-views-api, index patterns API>>.
NOTE: For managing {data-sources}, use the <<data-views-api, {data-sources} API>>.

The following saved objects APIs are available:

Expand Down
4 changes: 2 additions & 2 deletions docs/api/saved-objects/bulk_create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Saved objects that are unable to persist are replaced with an error object.
[[saved-objects-api-bulk-create-example]]
==== Example

Create an index pattern with the `my-pattern` ID, and a dashboard with the `my-dashboard` ID:
Create {a-data-source} with the `my-pattern` ID, and a dashboard with the `my-dashboard` ID:

[source,sh]
--------------------------------------------------
Expand Down Expand Up @@ -122,7 +122,7 @@ The API returns the following:
}
--------------------------------------------------

There is already a saved object with the `my-dashboard` ID, so only the index pattern is created.
There is already a saved object with the `my-dashboard` ID, so only the {data-source} is created.

[[saved-objects-api-bulk-create-conflict-errors]]
==== Conflict errors
Expand Down
4 changes: 2 additions & 2 deletions docs/api/saved-objects/bulk_get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Saved objects that are unable to persist are replaced with an error object.
[[saved-objects-api-bulk-get-body-example]]
==== Example

Retrieve an index pattern with the `my-pattern` ID, and a dashboard with the `my-dashboard` ID:
Retrieve a {data-source} with the `my-pattern` ID, and a dashboard with the `my-dashboard` ID:

[source,sh]
--------------------------------------------------
Expand Down Expand Up @@ -103,4 +103,4 @@ The API returns the following:
}
--------------------------------------------------

Only the index pattern exists.
Only the {data-source} exists.
2 changes: 1 addition & 1 deletion docs/api/saved-objects/delete.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TIP: Use this if you attempted to delete an object and received an HTTP 400 erro

==== Example

Delete an index pattern object with the `my-pattern` ID:
Delete {a-data-source} object with the `my-pattern` ID:

[source,sh]
--------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/api/saved-objects/export.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ When `excludeExportDetails=false` (the default) we append an export result detai
[[ssaved-objects-api-create-example]]
==== Examples

Export all index pattern saved objects:
Export all {data-source} saved objects:

[source,sh]
--------------------------------------------------
Expand All @@ -78,7 +78,7 @@ $ curl -X POST api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: a
--------------------------------------------------
// KIBANA

Export all index pattern saved objects and exclude the export summary from the stream:
Export all {data-source} saved objects and exclude the export summary from the stream:

[source,sh]
--------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/api/saved-objects/find.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ change. Use the find API for traditional paginated results, but avoid using it t

==== Examples

Find index patterns with titles that start with `my`:
Find {data-sources} with titles that start with `my`:

[source,sh]
--------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/api/saved-objects/get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ experimental[] Retrieve a single {kib} saved object by ID.
[[saved-objects-api-get-example]]
==== Example

Retrieve the index pattern object with the `my-pattern` ID:
Retrieve the {data-source} object with the `my-pattern` ID:

[source,sh]
--------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions docs/api/saved-objects/import.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ to resolve errors, refer to the <<saved-objects-api-import-example,examples>>.
[[saved-objects-api-import-example-1]]
===== Successful import with `createNewCopies` enabled

Import an index pattern and dashboard:
Import {a-data-source} and dashboard:

[source,sh]
--------------------------------------------------
Expand Down Expand Up @@ -147,7 +147,7 @@ The result indicates a successful import, and both objects are created. Since th
[[saved-objects-api-import-example-2]]
===== Successful import with `createNewCopies` disabled

Import an index pattern and dashboard:
Import {a-data-source} and dashboard:

[source,sh]
--------------------------------------------------
Expand Down Expand Up @@ -196,7 +196,7 @@ The result indicates a successful import, and both objects are created.
[[saved-objects-api-import-example-3]]
===== Failed import with conflict errors

Import an index pattern, visualization, *Canvas* workpad, and dashboard that include saved objects:
Import {a-data-source}, visualization, *Canvas* workpad, and dashboard that include saved objects:

[source,sh]
--------------------------------------------------
Expand Down Expand Up @@ -285,10 +285,10 @@ The API returns the following:
}
--------------------------------------------------

The result indicates an unsuccessful import because the index pattern, visualization, *Canvas* workpad, and dashboard resulted in a conflict
The result indicates an unsuccessful import because the {data-source}, visualization, *Canvas* workpad, and dashboard resulted in a conflict
error:

* An index pattern with the same ID already exists, which resulted in a conflict error. To resolve the error, overwrite the existing object,
* A {data-source} with the same ID already exists, which resulted in a conflict error. To resolve the error, overwrite the existing object,
or skip the object.

* A visualization with a different ID, but the same origin already exists, which resulted in a conflict error. The `destinationId` field
Expand All @@ -307,7 +307,7 @@ Objects are created when the error is resolved using the <<saved-objects-api-res
[[saved-objects-api-import-example-4]]
===== Failed import with missing reference errors

Import a visualization and dashboard when the index pattern for the visualization doesn't exist:
Import a visualization and dashboard when the {data-source} for the visualization doesn't exist:

[source,sh]
--------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/api/saved-objects/resolve.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object can be retrieved via the Resolve API using either its new ID or its old I
[[saved-objects-api-resolve-example]]
==== Example

Retrieve the index pattern object with the `my-pattern` ID:
Retrieve the {data-source} object with the `my-pattern` ID:

[source,sh]
--------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/api/saved-objects/resolve_import_errors.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ to the <<saved-objects-api-resolve-import-errors-example, examples>>.

This example builds upon the <<saved-objects-api-import-example-3,Import objects API example with conflict errors>>.

Resolve conflict errors for an index pattern, visualization, and *Canvas* workpad by overwriting the existing saved objects:
Resolve conflict errors for {a-data-source}, visualization, and *Canvas* workpad by overwriting the existing saved objects:

[source,sh]
--------------------------------------------------
Expand Down Expand Up @@ -173,7 +173,7 @@ that were returned in the `successResults` array. In this example, we retried im

This example builds upon the <<saved-objects-api-import-example-4,Import objects API example with missing reference errors>>.

Resolve a missing reference error for a visualization by replacing the index pattern with another, and resolve a missing reference error for
Resolve a missing reference error for a visualization by replacing the {data-source} with another, and resolve a missing reference error for
a search by ignoring it:

[source,sh]
Expand Down
2 changes: 1 addition & 1 deletion docs/api/saved-objects/update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ WARNING: When you update, attributes are not validated, which allows you to pass
[[saved-objects-api-update-example]]
==== Example

Update an existing index pattern object,`my-pattern`, with a different title:
Update an existing {data-source} object,`my-pattern`, with a different title:

[source,sh]
--------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions docs/api/spaces-management/copy_saved_objects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
experimental[] Copy saved objects between spaces.

It also allows you to automatically copy related objects, so when you copy a `dashboard`, this can automatically copy over the
associated visualizations, index patterns, and saved searches, as required.
associated visualizations, {data-sources}, and saved searches, as required.

You can request to overwrite any objects that already exist in the target space if they share an ID, or you can use the
<<spaces-api-resolve-copy-saved-objects-conflicts, Resolve copy saved objects conflicts API>> to do this on a per-object basis.
Expand Down Expand Up @@ -125,7 +125,7 @@ refer to the <<spaces-api-copy-saved-objects-example,examples>>.
===== Successful copy (with `createNewCopies` enabled)

Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` space. In this example,
the dashboard has a reference to a visualization, and that has a reference to an index pattern:
the dashboard has a reference to a visualization, and that has a reference to {a-data-source}:

[source,sh]
----
Expand Down Expand Up @@ -189,7 +189,7 @@ The result indicates a successful copy, and all three objects are created. Since
===== Successful copy (with `createNewCopies` disabled)

Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` space. In this example,
the dashboard has a reference to a visualization, and that has a reference to an index pattern:
the dashboard has a reference to a visualization, and that has a reference to {a-data-source}:

[source,sh]
----
Expand Down Expand Up @@ -379,10 +379,10 @@ The API returns the following:
}
----

The result indicates a successful copy for the `marketing` space, and an unsuccessful copy for the `sales` space because the index pattern,
The result indicates a successful copy for the `marketing` space, and an unsuccessful copy for the `sales` space because the {data-source},
visualization, and *Canvas* workpad each resulted in a conflict error:

* An index pattern with the same ID already exists, which resulted in a conflict error. To resolve the error, overwrite the existing object,
* A {data-source} with the same ID already exists, which resulted in a conflict error. To resolve the error, overwrite the existing object,
or skip the object.

* A visualization with a different ID, but the same origin already exists, which resulted in a conflict error. The `destinationId` field
Expand All @@ -403,7 +403,7 @@ API>>.
===== Failed copy (with missing reference errors)

Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` space. In this example,
the dashboard has a reference to a visualization and a *Canvas* workpad, and the visualization has a reference to an index pattern:
the dashboard has a reference to a visualization and a *Canvas* workpad, and the visualization has a reference to {a-data-source}:

[source,sh]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ refer to the <<spaces-api-resolve-copy-saved-objects-conflicts-example,examples>

This example builds upon the <<spaces-api-copy-saved-objects-example-3,Copy objects API example with conflict errors>>.

Resolve conflict errors for an index pattern, visualization, and *Canvas* workpad by overwriting the existing saved objects:
Resolve conflict errors for {a-data-source}, visualization, and *Canvas* workpad by overwriting the existing saved objects:

[source,sh]
----
Expand Down
103 changes: 103 additions & 0 deletions docs/apm/api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Some APM app features are provided via a REST API:
* <<agent-config-api>>
* <<apm-annotation-api>>
* <<rum-sourcemap-api>>
* <<agent-key-api>>

[float]
[[apm-api-example]]
Expand Down Expand Up @@ -708,3 +709,105 @@ curl -X DELETE "http://localhost:5601/api/apm/sourcemaps/apm:foo-1.0.0-644fd5a9"
--------------------------------------------------
{}
--------------------------------------------------

////
*******************************************************
*******************************************************
////

[role="xpack"]
[[agent-key-api]]
=== APM agent Key API

The Agent Key API allows you to configure agent keys to authorize requests from APM agents to the APM Server.

The following Agent key APIs are available:

* <<apm-create-agent-key>> to create an agent key

[float]
[[use-agent-key-api]]
==== How to use APM APIs

.Expand for required headers, privileges, and usage details
[%collapsible%closed]
======
include::api.asciidoc[tag=using-the-APIs]
======

////
*******************************************************
////

[[apm-create-agent-key]]
==== Create agent key

Create an APM agent key. Specify privileges in the request body at creation time.

[[apm-create-agent-key-privileges]]
===== Privileges

Users must have at least the `manage_own_api_key` cluster privilege and the required application privileges.

====== Example role:

[source,js]
--------------------------------------------------
POST /_security/role/apm_agent_key_user
{
"cluster": ["manage_own_api_key"],
"applications": [{
"application": "apm",
"privileges": ["event:write", "sourcemap:write", "config_agent:read"],
"resources": ["*"]
}]
}
--------------------------------------------------

[[apm-create-agent-key-req]]
===== Request

`POST /api/apm/agent_keys`

[role="child_attributes"]
[[apm-create-agent-key-req-body]]
===== Request body

`name`::
(required, string) Name of the agent key.

`privileges`::
(required, array) APM agent key privileges. It can take one or more of the following values:

- `event:write`. Required for ingesting agent events.
- `config_agent:read`. Required for agents to read agent configuration remotely.
- `sourcemap:write`. Required for uploading sourcemaps.

[[apm-agent-key-create-example]]
===== Example

[source,curl]
--------------------------------------------------
POST /api/apm/agent_keys
{
"name": "apm-key",
"privileges": ["event:write", "config_agent:read", "sourcemap:write"]
}
--------------------------------------------------

[[apm-agent-key-create-body]]
===== Response body

[source,js]
--------------------------------------------------
{
"agentKey": {
"id": "3DCLmn0B3ZMhLUa7WBG9",
"name": "apm-key",
"api_key": "PjGloCGOTzaZr8ilUPvkjA",
"encoded": "M0RDTG1uMEIzWk1oTFVhN1dCRzk6UGpHbG9DR09UemFacjhpbFVQdmtqQQ=="
}
}
--------------------------------------------------

Once created, you can copy the API key (Base64 encoded) and use it to to authorize requests from APM agents to the APM Server.
4 changes: 2 additions & 2 deletions docs/concepts/data-views.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ or all indices that contain your data.
[[data-views-read-only-access]]
=== Required permissions

* Access to *Data Views* requires the <<xpack-kibana-role-management, {kib} privilege>>
* Access to *Data Views* requires the <<kibana-role-management, {kib} privilege>>
`Data View Management`.

* To create a data view, you must have the <<xpack-kibana-role-management,{es} privilege>>
* To create a data view, you must have the <<kibana-role-management,{es} privilege>>
`view_index_metadata`.

* If a read-only indicator appears in {kib}, you have insufficient privileges
Expand Down
Loading

0 comments on commit 7661c38

Please sign in to comment.