-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Move and rename legacy elasticsearch client (#69797) * move last snapshot to inline * move legacy files to legacy subfolder * move request types out of legacy * export Headers from http instead of elasticsearch * renaming - first pass * renaming - second pass * fix core mocks * adapt new calls * update generated doc * fix IT test mocks * fix new usages # Conflicts: # src/core/server/saved_objects/service/lib/repository.ts # x-pack/plugins/event_log/server/es/context.test.ts # x-pack/plugins/oss_telemetry/server/test_utils/index.ts # x-pack/plugins/upgrade_assistant/server/lib/es_migration_apis.ts * fix usages
- Loading branch information
1 parent
e0e276e
commit ecd2082
Showing
306 changed files
with
1,675 additions
and
1,548 deletions.
There are no files selected for viewing
21 changes: 0 additions & 21 deletions
21
docs/development/core/server/kibana-plugin-core-server.callapioptions.md
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...evelopment/core/server/kibana-plugin-core-server.clusterclient._constructor_.md
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
docs/development/core/server/kibana-plugin-core-server.clusterclient.asscoped.md
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
...pment/core/server/kibana-plugin-core-server.clusterclient.callasinternaluser.md
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
docs/development/core/server/kibana-plugin-core-server.clusterclient.md
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
.../development/core/server/kibana-plugin-core-server.elasticsearcherror._code_.md
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
docs/development/core/server/kibana-plugin-core-server.elasticsearcherror.md
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...ver/kibana-plugin-core-server.elasticsearcherrorhelpers.isnotauthorizederror.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...bana-plugin-core-server.iclusterclient.md → ...lugin-core-server.ilegacyclusterclient.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [IClusterClient](./kibana-plugin-core-server.iclusterclient.md) | ||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ILegacyClusterClient](./kibana-plugin-core-server.ilegacyclusterclient.md) | ||
|
||
## IClusterClient type | ||
## ILegacyClusterClient type | ||
|
||
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 [ClusterClient](./kibana-plugin-core-server.clusterclient.md)<!-- -->. | ||
See [LegacyClusterClient](./kibana-plugin-core-server.legacyclusterclient.md)<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type IClusterClient = Pick<ClusterClient, 'callAsInternalUser' | 'asScoped'>; | ||
export declare type ILegacyClusterClient = Pick<LegacyClusterClient, 'callAsInternalUser' | 'asScoped'>; | ||
``` |
8 changes: 4 additions & 4 deletions
8
...lugin-core-server.icustomclusterclient.md → ...core-server.ilegacycustomclusterclient.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ICustomClusterClient](./kibana-plugin-core-server.icustomclusterclient.md) | ||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ILegacyCustomClusterClient](./kibana-plugin-core-server.ilegacycustomclusterclient.md) | ||
|
||
## ICustomClusterClient type | ||
## ILegacyCustomClusterClient type | ||
|
||
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 [ClusterClient](./kibana-plugin-core-server.clusterclient.md)<!-- -->. | ||
See [LegacyClusterClient](./kibana-plugin-core-server.legacyclusterclient.md)<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type ICustomClusterClient = Pick<ClusterClient, 'callAsInternalUser' | 'close' | 'asScoped'>; | ||
export declare type ILegacyCustomClusterClient = Pick<LegacyClusterClient, 'callAsInternalUser' | 'close' | 'asScoped'>; | ||
``` |
8 changes: 4 additions & 4 deletions
8
...lugin-core-server.iscopedclusterclient.md → ...core-server.ilegacyscopedclusterclient.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [IScopedClusterClient](./kibana-plugin-core-server.iscopedclusterclient.md) | ||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ILegacyScopedClusterClient](./kibana-plugin-core-server.ilegacyscopedclusterclient.md) | ||
|
||
## IScopedClusterClient type | ||
## ILegacyScopedClusterClient type | ||
|
||
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 [ScopedClusterClient](./kibana-plugin-core-server.scopedclusterclient.md)<!-- -->. | ||
See [LegacyScopedClusterClient](./kibana-plugin-core-server.legacyscopedclusterclient.md)<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type IScopedClusterClient = Pick<ScopedClusterClient, 'callAsCurrentUser' | 'callAsInternalUser'>; | ||
export declare type ILegacyScopedClusterClient = Pick<LegacyScopedClusterClient, 'callAsCurrentUser' | 'callAsInternalUser'>; | ||
``` |
6 changes: 3 additions & 3 deletions
6
...er/kibana-plugin-core-server.apicaller.md → ...ana-plugin-core-server.legacyapicaller.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [APICaller](./kibana-plugin-core-server.apicaller.md) | ||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md) | ||
|
||
## APICaller interface | ||
## LegacyAPICaller interface | ||
|
||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface APICaller | ||
export interface LegacyAPICaller | ||
``` |
21 changes: 21 additions & 0 deletions
21
docs/development/core/server/kibana-plugin-core-server.legacycallapioptions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [LegacyCallAPIOptions](./kibana-plugin-core-server.legacycallapioptions.md) | ||
|
||
## LegacyCallAPIOptions interface | ||
|
||
The set of options that defines how API call should be made and result be processed. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface LegacyCallAPIOptions | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [signal](./kibana-plugin-core-server.legacycallapioptions.signal.md) | <code>AbortSignal</code> | A signal object that allows you to abort the request via an AbortController object. | | ||
| [wrap401Errors](./kibana-plugin-core-server.legacycallapioptions.wrap401errors.md) | <code>boolean</code> | Indicates whether <code>401 Unauthorized</code> errors returned from the Elasticsearch API should be wrapped into <code>Boom</code> error instances with properly set <code>WWW-Authenticate</code> header that could have been returned by the API itself. If API didn't specify that then <code>Basic realm="Authorization Required"</code> is used as <code>WWW-Authenticate</code>. | | ||
|
4 changes: 2 additions & 2 deletions
4
...ugin-core-server.callapioptions.signal.md → ...ore-server.legacycallapioptions.signal.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...re-server.callapioptions.wrap401errors.md → ...ver.legacycallapioptions.wrap401errors.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ment/core/server/kibana-plugin-core-server.legacyclusterclient._constructor_.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [LegacyClusterClient](./kibana-plugin-core-server.legacyclusterclient.md) > [(constructor)](./kibana-plugin-core-server.legacyclusterclient._constructor_.md) | ||
|
||
## LegacyClusterClient.(constructor) | ||
|
||
Constructs a new instance of the `LegacyClusterClient` class | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
constructor(config: LegacyElasticsearchClientConfig, log: Logger, getAuthHeaders?: GetAuthHeaders); | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| config | <code>LegacyElasticsearchClientConfig</code> | | | ||
| log | <code>Logger</code> | | | ||
| getAuthHeaders | <code>GetAuthHeaders</code> | | | ||
|
24 changes: 24 additions & 0 deletions
24
...velopment/core/server/kibana-plugin-core-server.legacyclusterclient.asscoped.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [LegacyClusterClient](./kibana-plugin-core-server.legacyclusterclient.md) > [asScoped](./kibana-plugin-core-server.legacyclusterclient.asscoped.md) | ||
|
||
## LegacyClusterClient.asScoped() method | ||
|
||
Creates an instance of [ILegacyScopedClusterClient](./kibana-plugin-core-server.ilegacyscopedclusterclient.md) based on the configuration the current cluster client that exposes additional `callAsCurrentUser` method scoped to the provided req. Consumers shouldn't worry about closing scoped client instances, these will be automatically closed as soon as the original cluster client isn't needed anymore and closed. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
asScoped(request?: ScopeableRequest): ILegacyScopedClusterClient; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| request | <code>ScopeableRequest</code> | Request the <code>IScopedClusterClient</code> instance will be scoped to. Supports request optionality, Legacy.Request & FakeRequest for BWC with LegacyPlatform | | ||
|
||
<b>Returns:</b> | ||
|
||
`ILegacyScopedClusterClient` | ||
|
13 changes: 13 additions & 0 deletions
13
...core/server/kibana-plugin-core-server.legacyclusterclient.callasinternaluser.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [LegacyClusterClient](./kibana-plugin-core-server.legacyclusterclient.md) > [callAsInternalUser](./kibana-plugin-core-server.legacyclusterclient.callasinternaluser.md) | ||
|
||
## LegacyClusterClient.callAsInternalUser property | ||
|
||
Calls specified endpoint with provided clientParams on behalf of the Kibana internal user. See [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md)<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
callAsInternalUser: LegacyAPICaller; | ||
``` |
Oops, something went wrong.