Skip to content

Commit

Permalink
Merge branch 'master' into nestedFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Dec 9, 2019
2 parents 6d3efd3 + 3d2db42 commit d3451aa
Show file tree
Hide file tree
Showing 718 changed files with 14,782 additions and 10,587 deletions.
14 changes: 13 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# App
/x-pack/legacy/plugins/lens/ @elastic/kibana-app
/x-pack/legacy/plugins/graph/ @elastic/kibana-app
/src/legacy/server/sample_data/ @elastic/kibana-app

# App Architecture
/src/plugins/data/ @elastic/kibana-app-arch
Expand Down Expand Up @@ -66,14 +67,25 @@
/packages/kbn-es/ @elastic/kibana-operations
/packages/kbn-pm/ @elastic/kibana-operations
/packages/kbn-test/ @elastic/kibana-operations
/src/legacy/server/keystore/ @elastic/kibana-operations
/src/legacy/server/pid/ @elastic/kibana-operations
/src/legacy/server/sass/ @elastic/kibana-operations
/src/legacy/server/utils/ @elastic/kibana-operations
/src/legacy/server/warnings/ @elastic/kibana-operations

# Platform
/src/core/ @elastic/kibana-platform
/src/legacy/server/saved_objects/ @elastic/kibana-platform
/config/kibana.yml @elastic/kibana-platform
/x-pack/plugins/features/ @elastic/kibana-platform
/x-pack/plugins/licensing/ @elastic/kibana-platform
/packages/kbn-config-schema/ @elastic/kibana-platform
/src/legacy/server/config/ @elastic/kibana-platform
/src/legacy/server/csp/ @elastic/kibana-platform
/src/legacy/server/http/ @elastic/kibana-platform
/src/legacy/server/i18n/ @elastic/kibana-platform
/src/legacy/server/logging/ @elastic/kibana-platform
/src/legacy/server/saved_objects/ @elastic/kibana-platform
/src/legacy/server/status/ @elastic/kibana-platform

# Security
/x-pack/legacy/plugins/security/ @elastic/kibana-security
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"kbnVislibVisTypes": "src/legacy/core_plugins/kbn_vislib_vis_types",
"kibana_react": "src/legacy/core_plugins/kibana_react",
"kibana-react": "src/plugins/kibana_react",
"kibana_utils": "src/plugins/kibana_utils",
"navigation": "src/legacy/core_plugins/navigation",
"newsfeed": "src/plugins/newsfeed",
"regionMap": "src/legacy/core_plugins/region_map",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ core: {
i18n: I18nStart;
notifications: NotificationsStart;
overlays: OverlayStart;
savedObjects: SavedObjectsStart;
uiSettings: IUiSettingsClient;
injectedMetadata: {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface AppMountContext

| Property | Type | Description |
| --- | --- | --- |
| [core](./kibana-plugin-public.appmountcontext.core.md) | <code>{</code><br/><code> application: Pick&lt;ApplicationStart, 'capabilities' &#124; 'navigateToApp'&gt;;</code><br/><code> chrome: ChromeStart;</code><br/><code> docLinks: DocLinksStart;</code><br/><code> http: HttpStart;</code><br/><code> i18n: I18nStart;</code><br/><code> notifications: NotificationsStart;</code><br/><code> overlays: OverlayStart;</code><br/><code> uiSettings: IUiSettingsClient;</code><br/><code> injectedMetadata: {</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> };</code><br/><code> }</code> | Core service APIs available to mounted applications. |
| [core](./kibana-plugin-public.appmountcontext.core.md) | <code>{</code><br/><code> application: Pick&lt;ApplicationStart, 'capabilities' &#124; 'navigateToApp'&gt;;</code><br/><code> chrome: ChromeStart;</code><br/><code> docLinks: DocLinksStart;</code><br/><code> http: HttpStart;</code><br/><code> i18n: I18nStart;</code><br/><code> notifications: NotificationsStart;</code><br/><code> overlays: OverlayStart;</code><br/><code> savedObjects: SavedObjectsStart;</code><br/><code> uiSettings: IUiSettingsClient;</code><br/><code> injectedMetadata: {</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> };</code><br/><code> }</code> | Core service APIs available to mounted applications. |

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface HttpServiceSetup
| [registerAuth](./kibana-plugin-server.httpservicesetup.registerauth.md) | <code>(handler: AuthenticationHandler) =&gt; void</code> | To define custom authentication and/or authorization mechanism for incoming requests. |
| [registerOnPostAuth](./kibana-plugin-server.httpservicesetup.registeronpostauth.md) | <code>(handler: OnPostAuthHandler) =&gt; void</code> | To define custom logic to perform for incoming requests. |
| [registerOnPreAuth](./kibana-plugin-server.httpservicesetup.registeronpreauth.md) | <code>(handler: OnPreAuthHandler) =&gt; void</code> | To define custom logic to perform for incoming requests. |
| [registerOnPreResponse](./kibana-plugin-server.httpservicesetup.registeronpreresponse.md) | <code>(handler: OnPreResponseHandler) =&gt; void</code> | To define custom logic to perform for the server response. |
| [registerRouteHandlerContext](./kibana-plugin-server.httpservicesetup.registerroutehandlercontext.md) | <code>&lt;T extends keyof RequestHandlerContext&gt;(contextName: T, provider: RequestHandlerContextProvider&lt;T&gt;) =&gt; RequestHandlerContextContainer</code> | Register a context provider for a route handler. |

## Example
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [HttpServiceSetup](./kibana-plugin-server.httpservicesetup.md) &gt; [registerOnPreResponse](./kibana-plugin-server.httpservicesetup.registeronpreresponse.md)

## HttpServiceSetup.registerOnPreResponse property

To define custom logic to perform for the server response.

<b>Signature:</b>

```typescript
registerOnPreResponse: (handler: OnPreResponseHandler) => void;
```

## Remarks

Doesn't provide the whole response object. Supports extending response with custom headers. See [OnPreResponseHandler](./kibana-plugin-server.onpreresponsehandler.md)<!-- -->.

4 changes: 4 additions & 0 deletions docs/development/core/server/kibana-plugin-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [LogMeta](./kibana-plugin-server.logmeta.md) | Contextual metadata |
| [OnPostAuthToolkit](./kibana-plugin-server.onpostauthtoolkit.md) | A tool set defining an outcome of OnPostAuth interceptor for incoming request. |
| [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. |
| [OnPreResponseExtensions](./kibana-plugin-server.onpreresponseextensions.md) | Additional data to extend a response. |
| [OnPreResponseInfo](./kibana-plugin-server.onpreresponseinfo.md) | Response status code. |
| [OnPreResponseToolkit](./kibana-plugin-server.onpreresponsetoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. |
| [PackageInfo](./kibana-plugin-server.packageinfo.md) | |
| [Plugin](./kibana-plugin-server.plugin.md) | The interface that should be returned by a <code>PluginInitializer</code>. |
| [PluginConfigDescriptor](./kibana-plugin-server.pluginconfigdescriptor.md) | Describes a plugin configuration schema and capabilities. |
Expand Down Expand Up @@ -173,6 +176,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [MutatingOperationRefreshSetting](./kibana-plugin-server.mutatingoperationrefreshsetting.md) | Elasticsearch Refresh setting for mutating operation |
| [OnPostAuthHandler](./kibana-plugin-server.onpostauthhandler.md) | See [OnPostAuthToolkit](./kibana-plugin-server.onpostauthtoolkit.md)<!-- -->. |
| [OnPreAuthHandler](./kibana-plugin-server.onpreauthhandler.md) | See [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md)<!-- -->. |
| [OnPreResponseHandler](./kibana-plugin-server.onpreresponsehandler.md) | See [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md)<!-- -->. |
| [PluginConfigSchema](./kibana-plugin-server.pluginconfigschema.md) | Dedicated type for plugin configuration schema. |
| [PluginInitializer](./kibana-plugin-server.plugininitializer.md) | The <code>plugin</code> export at the root of a plugin's <code>server</code> directory should conform to this interface. |
| [PluginName](./kibana-plugin-server.pluginname.md) | Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays that use it as a key or value more obvious. |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OnPreResponseExtensions](./kibana-plugin-server.onpreresponseextensions.md) &gt; [headers](./kibana-plugin-server.onpreresponseextensions.headers.md)

## OnPreResponseExtensions.headers property

additional headers to attach to the response

<b>Signature:</b>

```typescript
headers?: ResponseHeaders;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OnPreResponseExtensions](./kibana-plugin-server.onpreresponseextensions.md)

## OnPreResponseExtensions interface

Additional data to extend a response.

<b>Signature:</b>

```typescript
export interface OnPreResponseExtensions
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [headers](./kibana-plugin-server.onpreresponseextensions.headers.md) | <code>ResponseHeaders</code> | additional headers to attach to the response |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OnPreResponseHandler](./kibana-plugin-server.onpreresponsehandler.md)

## OnPreResponseHandler type

See [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md)<!-- -->.

<b>Signature:</b>

```typescript
export declare type OnPreResponseHandler = (request: KibanaRequest, preResponse: OnPreResponseInfo, toolkit: OnPreResponseToolkit) => OnPreResponseResult | Promise<OnPreResponseResult>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OnPreResponseInfo](./kibana-plugin-server.onpreresponseinfo.md)

## OnPreResponseInfo interface

Response status code.

<b>Signature:</b>

```typescript
export interface OnPreResponseInfo
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [statusCode](./kibana-plugin-server.onpreresponseinfo.statuscode.md) | <code>number</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OnPreResponseInfo](./kibana-plugin-server.onpreresponseinfo.md) &gt; [statusCode](./kibana-plugin-server.onpreresponseinfo.statuscode.md)

## OnPreResponseInfo.statusCode property

<b>Signature:</b>

```typescript
statusCode: number;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OnPreResponseToolkit](./kibana-plugin-server.onpreresponsetoolkit.md)

## OnPreResponseToolkit interface

A tool set defining an outcome of OnPreAuth interceptor for incoming request.

<b>Signature:</b>

```typescript
export interface OnPreResponseToolkit
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [next](./kibana-plugin-server.onpreresponsetoolkit.next.md) | <code>(responseExtensions?: OnPreResponseExtensions) =&gt; OnPreResponseResult</code> | To pass request to the next handler |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OnPreResponseToolkit](./kibana-plugin-server.onpreresponsetoolkit.md) &gt; [next](./kibana-plugin-server.onpreresponsetoolkit.next.md)

## OnPreResponseToolkit.next property

To pass request to the next handler

<b>Signature:</b>

```typescript
next: (responseExtensions?: OnPreResponseExtensions) => OnPreResponseResult;
```
2 changes: 2 additions & 0 deletions docs/management/field-formatters/url-formatter.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The `Url` field formatter can take on the following types:
* The *Image* type can be used to specify an image directory where a specified image is located.
* The *Audio* type can be used to specify an audio directory where a specified audio file is located.
For an *Image* type you can specify width and height attributes. These will be used to set the max width / max height of the image, while keeping the aspect ratio. Image will not be upscaled if it's smaller than the provided size parameters.

You can customize either type of URL field formats with templates. A _URL template_ enables you to add specific values
to a partial URL. Use the string `{{value}}` to add the contents of the field to a fixed URL.

Expand Down
13 changes: 11 additions & 2 deletions docs/maps/connect-to-ems.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ EMS requests are made to the following domains:
* vector.maps.elastic.co

**Elastic Maps** makes requests directly from the browser to EMS.
To proxy EMS requests through the Kibana server, set `map.proxyElasticMapsServiceInMaps` to `true` in your <<settings, kibana.yml>> file.

[float]
=== Connect to Elastic Maps Service from an internal network

To connect to EMS when your Kibana server and browser are in an internal network:

. Set `map.proxyElasticMapsServiceInMaps` to `true` in your <<settings, kibana.yml>> file to proxy EMS requests through the Kibana server.
. Update your firewall rules to whitelist connections from your Kibana server to the EMS domains listed above.

NOTE: Coordinate map and region map visualizations do not support `map.proxyElasticMapsServiceInMaps` and will not proxy EMS requests through the Kibana server.


[float]
=== Disabling Elastic Maps Service
=== Disable Elastic Maps Service

You might experience EMS connection issues if your Kibana server or browser are on a private network or
behind a firewall. If this happens, you can disable the EMS connection to avoid unnecessary EMS requests.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/security/images/role-management.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/security/images/role-new-user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/user/security/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ cause Kibana's authorization to behave unexpectedly.
include::authorization/index.asciidoc[]
include::authorization/kibana-privileges.asciidoc[]
include::api-keys/index.asciidoc[]

include::rbac_tutorial.asciidoc[]
104 changes: 104 additions & 0 deletions docs/user/security/rbac_tutorial.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
[[space-rbac-tutorial]]
=== Tutorial: Use role-based access control to customize Kibana spaces

With role-based access control (RBAC), you can provide users access to data, tools,
and Kibana spaces. In this tutorial, you will learn how to configure roles
that provide the right users with the right access to the data, tools, and
Kibana spaces.

[float]
==== Scenario

Our user is a web developer working on a bank's
online mortgage service. The web developer has these
three requirements:

* Have access to the data for that service
* Build visualizations and dashboards
* Monitor the performance of the system

You'll provide the web developer with the access and privileges to get the job done.

[float]
==== Prerequisites

To complete this tutorial, you'll need the following:

* **Administrative privileges**: You must have a role that grants privileges to create a space, role, and user. This is any role which grants the `manage_security` cluster privilege. By default, the `superuser` role provides this access. See the {ref}/built-in-roles.html[built-in] roles.
* **A space**: In this tutorial, use `Dev Mortgage` as the space
name. See <<spaces-managing, spaces management>> for
details on creating a space.
* **Data**: You can use <<tutorial-sample-data, sample data>> or
live data. In the steps below, Filebeat and Metricbeat data are used.

[float]
==== Steps

With the requirements in mind, here are the steps that you will work
through in this tutorial:

* Create a role named `mortgage-developer`
* Give the role permission to access the data in the relevant indices
* Give the role permission to create visualizations and dashboards
* Create the web developer's user account with the proper roles

[float]
==== Create a role

Go to **Management > Roles**
for an overview of your roles. This view provides actions
for you to create, edit, and delete roles.

[role="screenshot"]
image::security/images/role-management.png["Role management"]


You can create as many roles as you like. Click *Create role* and
provide a name. Use `dev-mortgage` because this role is for a developer
working on the bank's mortgage application.


[float]
==== Give the role permission to access the data

Access to data in indices is an index-level privilege, so in
*Index privileges*, add lines for the indices that contain the
data for this role. Two privileges are required: `read` and
`view_index_metadata`. All privileges are detailed in the
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html[security privileges] documentation.

In the screenshots, Filebeat and Metricbeat data is used, but you
should use the index patterns for your indices.

[role="screenshot"]
image::security/images/role-index-privilege.png["Index privilege"]

[float]
==== Give the role permission to create visualizations and dashboards

By default, roles do not give Kibana privileges. Click **Add space
privilege** and associate this role with the `Dev Mortgage` space.

To enable users with the `dev-mortgage` role to create visualizations
and dashboards, click *All* for *Visualize* and *Dashboard*. Also
assign *All* for *Discover* because it is common for developers
to create saved searches while designing visualizations.

[role="screenshot"]
image::security/images/role-space-visualization.png["Associate space"]

[float]
==== Create the developer's user account with the proper roles

Go to **Management > Users** and click on **Create user** to create a
user. Give the user the `dev-mortgage` role
and the `monitoring-user` role, which is required for users of **Stack Monitoring**.

[role="screenshot"]
image::security/images/role-new-user.png["Developer user"]

Finally, have the developer log in and access the Dev Mortgage space
and create a new visualization.

NOTE: If the user is assigned to only one space, they will automatically enter that space on login.

13 changes: 6 additions & 7 deletions docs/visualize/most-frequent.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ levels of {es} {ref}/search-aggregations-bucket.html[bucket] aggregations.

The most frequently used visualizations include:

* Line, Area and Bar charts
* Line, area, and bar charts
* Pie charts
* Data table
* Metric visualization
* Goal and Gauge visualization
* Data tables
* Metric, goals, and gauges
* Heat maps
* Tag cloud
* Tag clouds

[float]
=== Configure your visualization

You configure visualizations using the default editor, which is broken into *Metrics* and *Buckets*, and includes a default count
You configure visualizations using the default editor, which is broken into metrics and buckets, and includes a default count
metric. Each visualization supports different configurations for what the metrics and buckets
represent. For example, a Bar chart allows you to add an X-axis:
represent. For example, a bar chart allows you to add an X-axis:

[role="screenshot"]
image::images/add-bucket.png["",height=478]
Expand Down
Loading

0 comments on commit d3451aa

Please sign in to comment.