Skip to content

Commit

Permalink
Merge branch 'master' into actions/webhook-remove-header
Browse files Browse the repository at this point in the history
* master: (54 commits)
  [ML] Migrate to React BrowserRouter and Kibana provided History. (elastic#71941)
  [Discover] Improve  saveSearch functional test handling (elastic#73626)
  [Metrics UI] Fix all threshold alert conditions disappearing due to alert prefill (elastic#73708)
  [Metrics UI] Fix alert previews of ungrouped alerts (elastic#73735)
  [SIEM] Fixes "include building block button" to operate (elastic#73900)
  [Metrics UI] Fix alert management to open without refresh (elastic#73739)
  [Security Solution][Lists] - Tests cleanup and remove unnecessary import (elastic#73865)
  [Ingest Management] main branch uses epr-snapshot. Others production (elastic#73555)
  [Canvas][tech-debt] Fix SVG not shrinking vertically properly (elastic#73867)
  [Maps] upgrade turf (elastic#73816)
  [Security Solution][Telemetry] Concurrent telemetry requests (elastic#73558)
  [Security Solution][Exceptions] - Update how nested entries are displayed in exceptions viewer (elastic#73745)
  [Security Solution][Exceptions] Adds autocomplete workaround for .text fields (elastic#73761)
  [Metrics UI] Fix previewing of No Data results (elastic#73753)
  Closes elastic#72914 by hiding anomaly detection settings links when the ml plugin is disabled. (elastic#73638)
  [Ingest Manager] Fix config selection in enrollment flyout from config list page (elastic#73833)
  [DOCS] Fixes typo in Alerting actions (elastic#73756)
  [APM] fixes linking errors to ML and Discover (elastic#73758)
  Handle promise rejections when building artifacts (elastic#73831)
  [Security Solution][Detections] Change from sha1 to sha256 (elastic#73741)
  ...
  • Loading branch information
gmmorris committed Jul 31, 2020
2 parents e4280f2 + 145f2ee commit 28b1676
Show file tree
Hide file tree
Showing 526 changed files with 13,444 additions and 5,184 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ module.exports = {
'x-pack/test_utils/**/*',
'x-pack/gulpfile.js',
'x-pack/plugins/apm/public/utils/testHelpers.js',
'x-pack/plugins/canvas/shareable_runtime/postcss.config.js',
],
rules: {
'import/no-extraneous-dependencies': [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## AssistanceAPIResponse interface

> Warning: This API is now obsolete.
>
>
<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## AssistantAPIClientParams interface

> Warning: This API is now obsolete.
>
>
<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## DeprecationAPIClientParams interface

> Warning: This API is now obsolete.
>
>
<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## DeprecationAPIResponse interface

> Warning: This API is now obsolete.
>
>
<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## DeprecationInfo interface

> Warning: This API is now obsolete.
>
>
<b>Signature:</b>

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-core-server](./kibana-plugin-core-server.md) &gt; [ElasticsearchClientConfig](./kibana-plugin-core-server.elasticsearchclientconfig.md)

## ElasticsearchClientConfig type

Configuration options to be used to create a [cluster client](./kibana-plugin-core-server.iclusterclient.md) using the [createClient API](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md)

<b>Signature:</b>

```typescript
export declare type ElasticsearchClientConfig = Pick<ElasticsearchConfig, 'customHeaders' | 'logQueries' | 'sniffOnStart' | 'sniffOnConnectionFault' | 'requestHeadersWhitelist' | 'sniffInterval' | 'hosts' | 'username' | 'password'> & {
pingTimeout?: ElasticsearchConfig['pingTimeout'] | ClientOptions['pingTimeout'];
requestTimeout?: ElasticsearchConfig['requestTimeout'] | ClientOptions['requestTimeout'];
ssl?: Partial<ElasticsearchConfig['ssl']>;
keepAlive?: boolean;
};
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) &gt; [client](./kibana-plugin-core-server.elasticsearchservicestart.client.md)

## ElasticsearchServiceStart.client property

A pre-configured [Elasticsearch client](./kibana-plugin-core-server.iclusterclient.md)

<b>Signature:</b>

```typescript
readonly client: IClusterClient;
```

## Example


```js
const client = core.elasticsearch.client;

```

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

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) &gt; [createClient](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md)

## ElasticsearchServiceStart.createClient property

Create application specific Elasticsearch cluster API client with customized config. See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)<!-- -->.

<b>Signature:</b>

```typescript
readonly createClient: (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient;
```

## Example


```js
const client = elasticsearch.createClient('my-app-name', config);
const data = await client.asInternalUser.search();

```

Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ export interface ElasticsearchServiceStart

| Property | Type | Description |
| --- | --- | --- |
| [client](./kibana-plugin-core-server.elasticsearchservicestart.client.md) | <code>IClusterClient</code> | A pre-configured [Elasticsearch client](./kibana-plugin-core-server.iclusterclient.md) |
| [createClient](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) | <code>(type: string, clientConfig?: Partial&lt;ElasticsearchClientConfig&gt;) =&gt; ICustomClusterClient</code> | Create application specific Elasticsearch cluster API client with customized config. See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)<!-- -->. |
| [legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) | <code>{</code><br/><code> readonly createClient: (type: string, clientConfig?: Partial&lt;LegacyElasticsearchClientConfig&gt;) =&gt; ILegacyCustomClusterClient;</code><br/><code> readonly client: ILegacyClusterClient;</code><br/><code> }</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ registerRouteHandlerContext: <T extends keyof RequestHandlerContext>(contextName
'myApp',
(context, req) => {
async function search (id: string) {
return await context.elasticsearch.legacy.client.callAsInternalUser('endpoint', id);
return await context.elasticsearch.client.asCurrentUser.find(id);
}
return { search };
}
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-core-server](./kibana-plugin-core-server.md) &gt; [IClusterClient](./kibana-plugin-core-server.iclusterclient.md) &gt; [asInternalUser](./kibana-plugin-core-server.iclusterclient.asinternaluser.md)

## IClusterClient.asInternalUser property

A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the ES cluster on behalf of the Kibana internal user

<b>Signature:</b>

```typescript
readonly asInternalUser: ElasticsearchClient;
```
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-core-server](./kibana-plugin-core-server.md) &gt; [IClusterClient](./kibana-plugin-core-server.iclusterclient.md) &gt; [asScoped](./kibana-plugin-core-server.iclusterclient.asscoped.md)

## IClusterClient.asScoped property

Creates a [scoped cluster client](./kibana-plugin-core-server.iscopedclusterclient.md) bound to given [request](./kibana-plugin-core-server.scopeablerequest.md)

<b>Signature:</b>

```typescript
asScoped: (request: ScopeableRequest) => IScopedClusterClient;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)

## IClusterClient interface

Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).

<b>Signature:</b>

```typescript
export interface IClusterClient
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [asInternalUser](./kibana-plugin-core-server.iclusterclient.asinternaluser.md) | <code>ElasticsearchClient</code> | A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the ES cluster on behalf of the Kibana internal user |
| [asScoped](./kibana-plugin-core-server.iclusterclient.asscoped.md) | <code>(request: ScopeableRequest) =&gt; IScopedClusterClient</code> | Creates a [scoped cluster client](./kibana-plugin-core-server.iscopedclusterclient.md) bound to given [request](./kibana-plugin-core-server.scopeablerequest.md) |

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-core-server](./kibana-plugin-core-server.md) &gt; [ICustomClusterClient](./kibana-plugin-core-server.icustomclusterclient.md) &gt; [close](./kibana-plugin-core-server.icustomclusterclient.close.md)

## ICustomClusterClient.close property

Closes the cluster client. After that client cannot be used and one should create a new client instance to be able to interact with Elasticsearch API.

<b>Signature:</b>

```typescript
close: () => Promise<void>;
```
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-core-server](./kibana-plugin-core-server.md) &gt; [ICustomClusterClient](./kibana-plugin-core-server.icustomclusterclient.md)

## ICustomClusterClient interface

See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)

<b>Signature:</b>

```typescript
export interface ICustomClusterClient extends IClusterClient
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [close](./kibana-plugin-core-server.icustomclusterclient.close.md) | <code>() =&gt; Promise&lt;void&gt;</code> | Closes the cluster client. After that client cannot be used and one should create a new client instance to be able to interact with Elasticsearch API. |
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## ILegacyClusterClient type

> Warning: This API is now obsolete.
>
> Use [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)<!-- -->.
>
Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).

See [LegacyClusterClient](./kibana-plugin-core-server.legacyclusterclient.md)<!-- -->.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## ILegacyCustomClusterClient type

> Warning: This API is now obsolete.
>
> Use [ICustomClusterClient](./kibana-plugin-core-server.icustomclusterclient.md)<!-- -->.
>
Represents an Elasticsearch cluster API client created by a plugin. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).

See [LegacyClusterClient](./kibana-plugin-core-server.legacyclusterclient.md)<!-- -->.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## ILegacyScopedClusterClient type

> Warning: This API is now obsolete.
>
> Use [IScopedClusterClient](./kibana-plugin-core-server.iscopedclusterclient.md)<!-- -->.
>
Serves the same purpose as "normal" `ClusterClient` but exposes additional `callAsCurrentUser` method that doesn't use credentials of the Kibana internal user (as `callAsInternalUser` does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API.

See [LegacyScopedClusterClient](./kibana-plugin-core-server.legacyscopedclusterclient.md)<!-- -->.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## IndexSettingsDeprecationInfo interface

> Warning: This API is now obsolete.
>
>
<b>Signature:</b>

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-core-server](./kibana-plugin-core-server.md) &gt; [IScopedClusterClient](./kibana-plugin-core-server.iscopedclusterclient.md) &gt; [asCurrentUser](./kibana-plugin-core-server.iscopedclusterclient.ascurrentuser.md)

## IScopedClusterClient.asCurrentUser property

A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the elasticsearch cluster on behalf of the user that initiated the request to the Kibana server.

<b>Signature:</b>

```typescript
readonly asCurrentUser: ElasticsearchClient;
```
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-core-server](./kibana-plugin-core-server.md) &gt; [IScopedClusterClient](./kibana-plugin-core-server.iscopedclusterclient.md) &gt; [asInternalUser](./kibana-plugin-core-server.iscopedclusterclient.asinternaluser.md)

## IScopedClusterClient.asInternalUser property

A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the elasticsearch cluster on behalf of the internal Kibana user.

<b>Signature:</b>

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

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [IScopedClusterClient](./kibana-plugin-core-server.iscopedclusterclient.md)

## IScopedClusterClient interface

Serves the same purpose as the normal [cluster client](./kibana-plugin-core-server.iclusterclient.md) but exposes an additional `asCurrentUser` method that doesn't use credentials of the Kibana internal user (as `asInternalUser` does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API instead.

<b>Signature:</b>

```typescript
export interface IScopedClusterClient
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [asCurrentUser](./kibana-plugin-core-server.iscopedclusterclient.ascurrentuser.md) | <code>ElasticsearchClient</code> | A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the elasticsearch cluster on behalf of the user that initiated the request to the Kibana server. |
| [asInternalUser](./kibana-plugin-core-server.iscopedclusterclient.asinternaluser.md) | <code>ElasticsearchClient</code> | A [client](./kibana-plugin-core-server.elasticsearchclient.md) to be used to query the elasticsearch cluster on behalf of the internal Kibana user. |

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## LegacyAPICaller interface

> Warning: This API is now obsolete.
>
>
<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## LegacyCallAPIOptions interface

> Warning: This API is now obsolete.
>
>
The set of options that defines how API call should be made and result be processed.

<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## LegacyClusterClient class

> Warning: This API is now obsolete.
>
> Use [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)<!-- -->.
>
Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## LegacyElasticsearchClientConfig type

> Warning: This API is now obsolete.
>
>
<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## LegacyElasticsearchError interface

@<!-- -->deprecated. The new elasticsearch client doesn't wrap errors anymore.

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## LegacyScopedClusterClient class

> Warning: This API is now obsolete.
>
> Use [scoped cluster client](./kibana-plugin-core-server.iscopedclusterclient.md)<!-- -->.
>
Serves the same purpose as the normal [cluster client](./kibana-plugin-core-server.iclusterclient.md) but exposes an additional `asCurrentUser` method that doesn't use credentials of the Kibana internal user (as `asInternalUser` does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API instead.

<b>Signature:</b>

Expand Down
Loading

0 comments on commit 28b1676

Please sign in to comment.