Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into np-migration/…
Browse files Browse the repository at this point in the history
…license-management

* 'master' of github.com:elastic/kibana: (48 commits)
  Enable alerting and actions plugin by default (elastic#51254)
  Fix error returned when creating an alert with ES security disabled (elastic#51639)
  [Discover] Improve Percy functional tests (elastic#51699)
  fixes timeline data providers tests (elastic#51862)
  [Dependencies]: upgrade react to latest v16.12.0 (elastic#51145)
  Allow routes to define some payload config values (elastic#50783)
  Move saved queries service + language switcher ⇒ NP (elastic#51812)
  [ML] Re-activate after method in transform test (elastic#51815)
  [SIEM] [Detection Engine] Add edit on rule creation (elastic#51670)
  De-angularize visLegend (elastic#50613)
  [SIEM][Detection Engine] Change security model to use SIEM permissions
  [Monitoring] Sass cleanup (elastic#51100)
  Move errors and validate index pattern ⇒ NP (elastic#51805)
  fixes pagination tests (elastic#51822)
  Split legacy plugin discovery, expose SavedObjects scopedClient, wrappers, repository (elastic#48882)
  [SIEM][Detection Engine] Adds ecs threat properties to rules (elastic#51782)
  [Lens] Remove client-side reference to server source code (elastic#51763)
  Fix infinite redirect loop when multiple cookies are sent (elastic#50452)
  fixes drag and drop in tests (elastic#51806)
  [Console] Proxy fallback (elastic#50185)
  ...
  • Loading branch information
jloleysens committed Nov 28, 2019
2 parents 5e0548a + 1367814 commit 65e74cf
Show file tree
Hide file tree
Showing 1,152 changed files with 21,824 additions and 15,249 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ bower_components
/plugins
/built_assets
/html_docs
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
/src/fixtures/vislib/mock_data
/src/legacy/ui/public/angular-bootstrap
/src/legacy/ui/public/flot-charts
Expand All @@ -19,7 +20,6 @@ bower_components
/src/core/lib/kbn_internal_native_observable
/packages/*/target
/packages/eslint-config-kibana
/packages/kbn-es-query/src/kuery/ast/kuery.js
/packages/kbn-pm/dist
/packages/kbn-plugin-generator/sao_template/template
/packages/kbn-ui-framework/dist
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
/src/dev/i18n @elastic/kibana-stack-services
/packages/kbn-analytics/ @elastic/kibana-stack-services
/src/legacy/core_plugins/ui_metric/ @elastic/kibana-stack-services
/src/plugins/usage_collection/ @elastic/kibana-stack-services
/x-pack/legacy/plugins/telemetry @elastic/kibana-stack-services
/x-pack/legacy/plugins/alerting @elastic/kibana-stack-services
/x-pack/legacy/plugins/actions @elastic/kibana-stack-services
Expand Down
1 change: 0 additions & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"interpreter": "src/legacy/core_plugins/interpreter",
"kbn": "src/legacy/core_plugins/kibana",
"kbnDocViews": "src/legacy/core_plugins/kbn_doc_views",
"kbnESQuery": "packages/kbn-es-query",
"kbnVislibVisTypes": "src/legacy/core_plugins/kbn_vislib_vis_types",
"kibana_react": "src/legacy/core_plugins/kibana_react",
"kibana-react": "src/plugins/kibana_react",
Expand Down
4 changes: 3 additions & 1 deletion docs/api/role-management/put.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ To use the create or update role API, you must have the `manage_security` cluste
(Optional, object) In the `metadata` object, keys that begin with `_` are reserved for system usage.

`elasticsearch`::
(Optional, object) {es} cluster and index privileges. Valid keys include `cluster`, `indices`, and `run_as`. For more information, see {xpack-ref}/defining-roles.html[Defining Roles].
(Optional, object) {es} cluster and index privileges. Valid keys include
`cluster`, `indices`, and `run_as`. For more information, see
{ref}/defining-roles.html[Defining roles].

`kibana`::
(list) Objects that specify the <<kibana-privileges, Kibana privileges>> for the role:
Expand Down
9 changes: 8 additions & 1 deletion docs/developer/security/rbac.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
[[development-security-rbac]]
=== Role-based access control

Role-based access control (RBAC) in {kib} relies upon the {xpack-ref}/security-privileges.html#application-privileges[application privileges] that Elasticsearch exposes. This allows {kib} to define the privileges that {kib} wishes to grant to users, assign them to the relevant users using roles, and then authorize the user to perform a specific action. This is handled within a secured instance of the `SavedObjectsClient` and available transparently to consumers when using `request.getSavedObjectsClient()` or `savedObjects.getScopedSavedObjectsClient()`.
Role-based access control (RBAC) in {kib} relies upon the
{ref}/security-privileges.html#application-privileges[application privileges]
that Elasticsearch exposes. This allows {kib} to define the privileges that
{kib} wishes to grant to users, assign them to the relevant users using roles,
and then authorize the user to perform a specific action. This is handled within
a secured instance of the `SavedObjectsClient` and available transparently to
consumers when using `request.getSavedObjectsClient()` or
`savedObjects.getScopedSavedObjectsClient()`.

[[development-rbac-privileges]]
==== {kib} Privileges
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Search for objects
<b>Signature:</b>

```typescript
find: <T extends SavedObjectAttributes>(options: Pick<SavedObjectFindOptionsServer, "search" | "filter" | "type" | "searchFields" | "defaultSearchOperator" | "hasReference" | "sortField" | "page" | "perPage" | "fields">) => Promise<SavedObjectsFindResponsePublic<T>>;
find: <T extends SavedObjectAttributes>(options: Pick<SavedObjectFindOptionsServer, "search" | "filter" | "type" | "fields" | "searchFields" | "defaultSearchOperator" | "hasReference" | "sortField" | "page" | "perPage">) => Promise<SavedObjectsFindResponsePublic<T>>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export declare class SavedObjectsClient
| [bulkGet](./kibana-plugin-public.savedobjectsclient.bulkget.md) | | <code>(objects?: {</code><br/><code> id: string;</code><br/><code> type: string;</code><br/><code> }[]) =&gt; Promise&lt;SavedObjectsBatchResponse&lt;SavedObjectAttributes&gt;&gt;</code> | Returns an array of objects by id |
| [create](./kibana-plugin-public.savedobjectsclient.create.md) | | <code>&lt;T extends SavedObjectAttributes&gt;(type: string, attributes: T, options?: SavedObjectsCreateOptions) =&gt; Promise&lt;SimpleSavedObject&lt;T&gt;&gt;</code> | Persists an object |
| [delete](./kibana-plugin-public.savedobjectsclient.delete.md) | | <code>(type: string, id: string) =&gt; Promise&lt;{}&gt;</code> | Deletes an object |
| [find](./kibana-plugin-public.savedobjectsclient.find.md) | | <code>&lt;T extends SavedObjectAttributes&gt;(options: Pick&lt;SavedObjectFindOptionsServer, &quot;search&quot; &#124; &quot;filter&quot; &#124; &quot;type&quot; &#124; &quot;searchFields&quot; &#124; &quot;defaultSearchOperator&quot; &#124; &quot;hasReference&quot; &#124; &quot;sortField&quot; &#124; &quot;page&quot; &#124; &quot;perPage&quot; &#124; &quot;fields&quot;&gt;) =&gt; Promise&lt;SavedObjectsFindResponsePublic&lt;T&gt;&gt;</code> | Search for objects |
| [find](./kibana-plugin-public.savedobjectsclient.find.md) | | <code>&lt;T extends SavedObjectAttributes&gt;(options: Pick&lt;SavedObjectFindOptionsServer, &quot;search&quot; &#124; &quot;filter&quot; &#124; &quot;type&quot; &#124; &quot;fields&quot; &#124; &quot;searchFields&quot; &#124; &quot;defaultSearchOperator&quot; &#124; &quot;hasReference&quot; &#124; &quot;sortField&quot; &#124; &quot;page&quot; &#124; &quot;perPage&quot;&gt;) =&gt; Promise&lt;SavedObjectsFindResponsePublic&lt;T&gt;&gt;</code> | Search for objects |
| [get](./kibana-plugin-public.savedobjectsclient.get.md) | | <code>&lt;T extends SavedObjectAttributes&gt;(type: string, id: string) =&gt; Promise&lt;SimpleSavedObject&lt;T&gt;&gt;</code> | Fetches a single object |

## Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ returns `basePath` value, specific for an incoming request.
<b>Signature:</b>

```typescript
get: (request: KibanaRequest<unknown, unknown, unknown> | LegacyRequest) => string;
get: (request: KibanaRequest<unknown, unknown, unknown, any> | LegacyRequest) => string;
```
4 changes: 2 additions & 2 deletions docs/development/core/server/kibana-plugin-server.basepath.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export declare class BasePath

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [get](./kibana-plugin-server.basepath.get.md) | | <code>(request: KibanaRequest&lt;unknown, unknown, unknown&gt; &#124; LegacyRequest) =&gt; string</code> | returns <code>basePath</code> value, specific for an incoming request. |
| [get](./kibana-plugin-server.basepath.get.md) | | <code>(request: KibanaRequest&lt;unknown, unknown, unknown, any&gt; &#124; LegacyRequest) =&gt; string</code> | returns <code>basePath</code> value, specific for an incoming request. |
| [prepend](./kibana-plugin-server.basepath.prepend.md) | | <code>(path: string) =&gt; string</code> | Prepends <code>path</code> with the basePath. |
| [remove](./kibana-plugin-server.basepath.remove.md) | | <code>(path: string) =&gt; string</code> | Removes the prepended basePath from the <code>path</code>. |
| [serverBasePath](./kibana-plugin-server.basepath.serverbasepath.md) | | <code>string</code> | returns the server's basePath<!-- -->See [BasePath.get](./kibana-plugin-server.basepath.get.md) for getting the basePath value for a specific request |
| [set](./kibana-plugin-server.basepath.set.md) | | <code>(request: KibanaRequest&lt;unknown, unknown, unknown&gt; &#124; LegacyRequest, requestSpecificBasePath: string) =&gt; void</code> | sets <code>basePath</code> value, specific for an incoming request. |
| [set](./kibana-plugin-server.basepath.set.md) | | <code>(request: KibanaRequest&lt;unknown, unknown, unknown, any&gt; &#124; LegacyRequest, requestSpecificBasePath: string) =&gt; void</code> | sets <code>basePath</code> value, specific for an incoming request. |

## Remarks

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ sets `basePath` value, specific for an incoming request.
<b>Signature:</b>

```typescript
set: (request: KibanaRequest<unknown, unknown, unknown> | LegacyRequest, requestSpecificBasePath: string) => void;
set: (request: KibanaRequest<unknown, unknown, unknown, any> | LegacyRequest, requestSpecificBasePath: string) => void;
```
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ export interface CoreSetup
| [context](./kibana-plugin-server.coresetup.context.md) | <code>ContextSetup</code> | [ContextSetup](./kibana-plugin-server.contextsetup.md) |
| [elasticsearch](./kibana-plugin-server.coresetup.elasticsearch.md) | <code>ElasticsearchServiceSetup</code> | [ElasticsearchServiceSetup](./kibana-plugin-server.elasticsearchservicesetup.md) |
| [http](./kibana-plugin-server.coresetup.http.md) | <code>HttpServiceSetup</code> | [HttpServiceSetup](./kibana-plugin-server.httpservicesetup.md) |
| [savedObjects](./kibana-plugin-server.coresetup.savedobjects.md) | <code>SavedObjectsServiceSetup</code> | [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) |
| [uiSettings](./kibana-plugin-server.coresetup.uisettings.md) | <code>UiSettingsServiceSetup</code> | [UiSettingsServiceSetup](./kibana-plugin-server.uisettingsservicesetup.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-server](./kibana-plugin-server.md) &gt; [CoreSetup](./kibana-plugin-server.coresetup.md) &gt; [savedObjects](./kibana-plugin-server.coresetup.savedobjects.md)

## CoreSetup.savedObjects property

[SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md)

<b>Signature:</b>

```typescript
savedObjects: SavedObjectsServiceSetup;
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ Context passed to the plugins `start` method.
```typescript
export interface CoreStart
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [savedObjects](./kibana-plugin-server.corestart.savedobjects.md) | <code>SavedObjectsServiceStart</code> | [SavedObjectsServiceStart](./kibana-plugin-server.savedobjectsservicestart.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-server](./kibana-plugin-server.md) &gt; [CoreStart](./kibana-plugin-server.corestart.md) &gt; [savedObjects](./kibana-plugin-server.corestart.savedobjects.md)

## CoreStart.savedObjects property

[SavedObjectsServiceStart](./kibana-plugin-server.savedobjectsservicestart.md)

<b>Signature:</b>

```typescript
savedObjects: SavedObjectsServiceStart;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Register a route handler for `DELETE` request.
<b>Signature:</b>

```typescript
delete: RouteRegistrar;
delete: RouteRegistrar<'delete'>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Register a route handler for `GET` request.
<b>Signature:</b>

```typescript
get: RouteRegistrar;
get: RouteRegistrar<'get'>;
```
9 changes: 5 additions & 4 deletions docs/development/core/server/kibana-plugin-server.irouter.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ export interface IRouter

| Property | Type | Description |
| --- | --- | --- |
| [delete](./kibana-plugin-server.irouter.delete.md) | <code>RouteRegistrar</code> | Register a route handler for <code>DELETE</code> request. |
| [get](./kibana-plugin-server.irouter.get.md) | <code>RouteRegistrar</code> | Register a route handler for <code>GET</code> request. |
| [delete](./kibana-plugin-server.irouter.delete.md) | <code>RouteRegistrar&lt;'delete'&gt;</code> | Register a route handler for <code>DELETE</code> request. |
| [get](./kibana-plugin-server.irouter.get.md) | <code>RouteRegistrar&lt;'get'&gt;</code> | Register a route handler for <code>GET</code> request. |
| [handleLegacyErrors](./kibana-plugin-server.irouter.handlelegacyerrors.md) | <code>&lt;P extends ObjectType, Q extends ObjectType, B extends ObjectType&gt;(handler: RequestHandler&lt;P, Q, B&gt;) =&gt; RequestHandler&lt;P, Q, B&gt;</code> | Wrap a router handler to catch and converts legacy boom errors to proper custom errors. |
| [post](./kibana-plugin-server.irouter.post.md) | <code>RouteRegistrar</code> | Register a route handler for <code>POST</code> request. |
| [put](./kibana-plugin-server.irouter.put.md) | <code>RouteRegistrar</code> | Register a route handler for <code>PUT</code> request. |
| [patch](./kibana-plugin-server.irouter.patch.md) | <code>RouteRegistrar&lt;'patch'&gt;</code> | Register a route handler for <code>PATCH</code> request. |
| [post](./kibana-plugin-server.irouter.post.md) | <code>RouteRegistrar&lt;'post'&gt;</code> | Register a route handler for <code>POST</code> request. |
| [put](./kibana-plugin-server.irouter.put.md) | <code>RouteRegistrar&lt;'put'&gt;</code> | Register a route handler for <code>PUT</code> request. |
| [routerPath](./kibana-plugin-server.irouter.routerpath.md) | <code>string</code> | Resulted path |

13 changes: 13 additions & 0 deletions docs/development/core/server/kibana-plugin-server.irouter.patch.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-server](./kibana-plugin-server.md) &gt; [IRouter](./kibana-plugin-server.irouter.md) &gt; [patch](./kibana-plugin-server.irouter.patch.md)

## IRouter.patch property

Register a route handler for `PATCH` request.

<b>Signature:</b>

```typescript
patch: RouteRegistrar<'patch'>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Register a route handler for `POST` request.
<b>Signature:</b>

```typescript
post: RouteRegistrar;
post: RouteRegistrar<'post'>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Register a route handler for `PUT` request.
<b>Signature:</b>

```typescript
put: RouteRegistrar;
put: RouteRegistrar<'put'>;
```
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; [ISavedObjectsRepository](./kibana-plugin-server.isavedobjectsrepository.md)

## ISavedObjectsRepository type

See [SavedObjectsRepository](./kibana-plugin-server.savedobjectsrepository.md)

<b>Signature:</b>

```typescript
export declare type ISavedObjectsRepository = Pick<SavedObjectsRepository, keyof SavedObjectsRepository>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Kibana specific abstraction for an incoming request.
<b>Signature:</b>

```typescript
export declare class KibanaRequest<Params = unknown, Query = unknown, Body = unknown>
export declare class KibanaRequest<Params = unknown, Query = unknown, Body = unknown, Method extends RouteMethod = any>
```

## Constructors
Expand All @@ -26,7 +26,7 @@ export declare class KibanaRequest<Params = unknown, Query = unknown, Body = unk
| [headers](./kibana-plugin-server.kibanarequest.headers.md) | | <code>Headers</code> | Readonly copy of incoming request headers. |
| [params](./kibana-plugin-server.kibanarequest.params.md) | | <code>Params</code> | |
| [query](./kibana-plugin-server.kibanarequest.query.md) | | <code>Query</code> | |
| [route](./kibana-plugin-server.kibanarequest.route.md) | | <code>RecursiveReadonly&lt;KibanaRequestRoute&gt;</code> | matched route details |
| [route](./kibana-plugin-server.kibanarequest.route.md) | | <code>RecursiveReadonly&lt;KibanaRequestRoute&lt;Method&gt;&gt;</code> | matched route details |
| [socket](./kibana-plugin-server.kibanarequest.socket.md) | | <code>IKibanaSocket</code> | |
| [url](./kibana-plugin-server.kibanarequest.url.md) | | <code>Url</code> | a WHATWG URL standard object. |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ matched route details
<b>Signature:</b>

```typescript
readonly route: RecursiveReadonly<KibanaRequestRoute>;
readonly route: RecursiveReadonly<KibanaRequestRoute<Method>>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Request specific route information exposed to a handler.
<b>Signature:</b>

```typescript
export interface KibanaRequestRoute
export interface KibanaRequestRoute<Method extends RouteMethod>
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [method](./kibana-plugin-server.kibanarequestroute.method.md) | <code>RouteMethod &#124; 'patch' &#124; 'options'</code> | |
| [options](./kibana-plugin-server.kibanarequestroute.options.md) | <code>Required&lt;RouteConfigOptions&gt;</code> | |
| [method](./kibana-plugin-server.kibanarequestroute.method.md) | <code>Method</code> | |
| [options](./kibana-plugin-server.kibanarequestroute.options.md) | <code>KibanaRequestRouteOptions&lt;Method&gt;</code> | |
| [path](./kibana-plugin-server.kibanarequestroute.path.md) | <code>string</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
method: RouteMethod | 'patch' | 'options';
method: Method;
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
options: Required<RouteConfigOptions>;
options: KibanaRequestRouteOptions<Method>;
```
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; [KibanaRequestRouteOptions](./kibana-plugin-server.kibanarequestrouteoptions.md)

## KibanaRequestRouteOptions type

Route options: If 'GET' or 'OPTIONS' method, body options won't be returned.

<b>Signature:</b>

```typescript
export declare type KibanaRequestRouteOptions<Method extends RouteMethod> = Method extends 'get' | 'options' ? Required<Omit<RouteConfigOptions<Method>, 'body'>> : Required<RouteConfigOptions<Method>>;
```
Loading

0 comments on commit 65e74cf

Please sign in to comment.