Skip to content

Commit b7d90f6

Browse files
committed
Merge branch 'master' of github.com:elastic/kibana into deangularize/dashboard
2 parents 4e6bafe + 11470ac commit b7d90f6

File tree

135 files changed

+13361
-65946
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+13361
-65946
lines changed

.i18nrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
],
2929
"maps_legacy": "src/plugins/maps_legacy",
3030
"monaco": "packages/kbn-monaco/src",
31+
"presentationUtil": "src/plugins/presentation_util",
3132
"indexPatternManagement": "src/plugins/index_pattern_management",
3233
"advancedSettings": "src/plugins/advanced_settings",
3334
"kibana_legacy": "src/plugins/kibana_legacy",

docs/developer/plugin-list.asciidoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ as uiSettings within the code.
4747
- Adds a dashboard embeddable that can be used in other applications.
4848
4949
50-
|{kib-repo}blob/{branch}/src/plugins/data/README.md[data]
50+
|{kib-repo}blob/{branch}/src/plugins/data/README.mdx[data]
5151
|The data plugin provides common data access services, such as search and query, for solutions and application developers.
5252
5353
@@ -160,6 +160,10 @@ It also provides a stateful version of it on the start contract.
160160
Content is fetched from the remote (https://feeds.elastic.co and https://feeds-staging.elastic.co in dev mode) once a day, with periodic checks if the content needs to be refreshed. All newsfeed content is hosted remotely.
161161
162162
163+
|{kib-repo}blob/{branch}/src/plugins/presentation_util/README.md[presentationUtil]
164+
|Utilities and components used by the presentation-related plugins
165+
166+
163167
|{kib-repo}blob/{branch}/src/plugins/region_map/README.md[regionMap]
164168
|Create choropleth maps. Display the results of a term-aggregation as e.g. countries, zip-codes, states.
165169

docs/settings/security-settings.asciidoc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,51 @@ In addition to <<authentication-provider-settings,the settings that are valid fo
162162

163163
|===
164164

165+
[float]
166+
[[anonymous-authentication-provider-settings]]
167+
===== Anonymous authentication provider settings
168+
169+
In addition to <<authentication-provider-settings,the settings that are valid for all providers>>, you can specify the following settings:
170+
171+
[NOTE]
172+
============
173+
You can configure only one anonymous provider per {kib} instance.
174+
============
175+
176+
[cols="2*<"]
177+
|===
178+
| `xpack.security.authc.providers.`
179+
`anonymous.<provider-name>.credentials` {ess-icon}
180+
| Credentials that {kib} should use internally to authenticate anonymous requests to {es}. Possible values are: username and password, API key, or the constant `elasticsearch_anonymous_user` if you want to leverage {ref}/anonymous-access.html[{es} anonymous access].
181+
182+
2+a| For example:
183+
184+
[source,yaml]
185+
----------------------------------------
186+
# Username and password credentials
187+
xpack.security.authc.providers.anonymous.anonymous1:
188+
credentials:
189+
username: "anonymous_service_account"
190+
password: "anonymous_service_account_password"
191+
192+
# API key (concatenated and base64-encoded)
193+
xpack.security.authc.providers.anonymous.anonymous1:
194+
credentials:
195+
apiKey: "VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw=="
196+
197+
# API key (as returned from Elasticsearch API)
198+
xpack.security.authc.providers.anonymous.anonymous1:
199+
credentials:
200+
apiKey.id: "VuaCfGcBCdbkQm-e5aOx"
201+
apiKey.key: "ui2lp2axTNmsyakw9tvNnw"
202+
203+
# Elasticsearch anonymous access
204+
xpack.security.authc.providers.anonymous.anonymous1:
205+
credentials: "elasticsearch_anonymous_user"
206+
----------------------------------------
207+
208+
|===
209+
165210
[float]
166211
[[http-authentication-settings]]
167212
===== HTTP authentication settings

docs/user/security/authentication/index.asciidoc

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- <<saml>>
1414
- <<oidc>>
1515
- <<kerberos>>
16+
- <<anonymous-authentication>>
1617
- <<http-authentication>>
1718

1819
Enable multiple authentication mechanisms at the same time specifying a prioritized list of the authentication _providers_ (typically of various types) in the configuration. Providers are consulted in ascending order. Make sure each configured provider has a unique name (e.g. `basic1` or `saml1` in the configuration example) and `order` setting. In the event that two or more providers have the same name or `order`, {kib} will fail to start.
@@ -293,6 +294,111 @@ xpack.security.authc.providers:
293294

294295
Kibana uses SPNEGO, which wraps the Kerberos protocol for use with HTTP, extending it to web applications. At the end of the Kerberos handshake, Kibana will forward the service ticket to Elasticsearch. Elasticsearch will unpack it and it will respond with an access and refresh token which are then used for subsequent authentication.
295296

297+
[[anonymous-authentication]]
298+
==== Anonymous authentication
299+
300+
[IMPORTANT]
301+
============================================================================
302+
Anyone with access to the network {kib} is exposed to will be able to access {kib}. Make sure that you've properly restricted the capabilities of the anonymous service account so that anonymous users can't perform destructive actions or escalate their own privileges.
303+
============================================================================
304+
305+
Anonymous authentication gives users access to {kib} without requiring them to provide credentials. This can be useful if you want your users to skip the login step when you embed dashboards in another application or set up a demo {kib} instance in your internal network, while still keeping other security features intact.
306+
307+
To enable anonymous authentication in {kib}, you must decide what credentials the anonymous service account {kib} should use internally to authenticate anonymous requests.
308+
309+
NOTE: You can configure only one anonymous authentication provider per {kib} instance.
310+
311+
There are three ways to specify these credentials:
312+
313+
If you have a user who can authenticate to {es} using username and password, for instance from the Native or LDAP security realms, you can also use these credentials to impersonate the anonymous users. Here is how your `kibana.yml` might look if you use username and password credentials:
314+
315+
[source,yaml]
316+
-----------------------------------------------
317+
xpack.security.authc.providers:
318+
anonymous.anonymous1:
319+
order: 0
320+
credentials:
321+
username: "anonymous_service_account"
322+
password: "anonymous_service_account_password"
323+
-----------------------------------------------
324+
325+
If using username and password credentials isn't desired or feasible, then you can create a dedicated <<api-keys, API key>> for the anonymous service account. In this case, your `kibana.yml` might look like this:
326+
327+
[source,yaml]
328+
-----------------------------------------------
329+
xpack.security.authc.providers:
330+
anonymous.anonymous1:
331+
order: 0
332+
credentials:
333+
apiKey: "VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw=="
334+
-----------------------------------------------
335+
336+
The previous configuration snippet uses an API key string that is the result of base64-encoding of the `id` and `api_key` fields returned from the {es} API, joined by a colon. You can also specify these fields separately, and {kib} will do the concatenation and base64-encoding for you:
337+
338+
[source,yaml]
339+
-----------------------------------------------
340+
xpack.security.authc.providers:
341+
anonymous.anonymous1:
342+
order: 0
343+
credentials:
344+
apiKey.id: "VuaCfGcBCdbkQm-e5aOx"
345+
apiKey.key: "ui2lp2axTNmsyakw9tvNnw"
346+
-----------------------------------------------
347+
348+
It's also possible to use {kib} anonymous access in conjunction with the {es} anonymous access.
349+
350+
Prior to configuring {kib}, ensure that anonymous access is enabled and properly configured in {es}. See {ref}/anonymous-access.html[Enabling anonymous access] for more information.
351+
352+
Here is how your `kibana.yml` might look like if you want to use {es} anonymous access to impersonate anonymous users in {kib}:
353+
354+
[source,yaml]
355+
-----------------------------------------------
356+
xpack.security.authc.providers:
357+
anonymous.anonymous1:
358+
order: 0
359+
credentials: "elasticsearch_anonymous_user" <1>
360+
-----------------------------------------------
361+
362+
<1> The `elasticsearch_anonymous_user` is a special constant that indicates you want to use the {es} anonymous user.
363+
364+
[float]
365+
===== Anonymous access and other types of authentication
366+
367+
You can configure more authentication providers in addition to anonymous access in {kib}. In this case, the Login Selector presents a configurable *Continue as Guest* option for anonymous access:
368+
369+
[source,yaml]
370+
--------------------------------------------------------------------------------
371+
xpack.security.authc.providers:
372+
basic.basic1:
373+
order: 0
374+
anonymous.anonymous1:
375+
order: 1
376+
credentials:
377+
username: "anonymous_service_account"
378+
password: "anonymous_service_account_password"
379+
--------------------------------------------------------------------------------
380+
381+
[float]
382+
===== Anonymous access and embedding
383+
384+
One of the most popular use cases for anonymous access is when you embed {kib} into other applications and don't want to force your users to log in to view it. If you configured {kib} to use anonymous access as the sole authentication mechanism, you don't need to do anything special while embedding {kib}.
385+
386+
If you have multiple authentication providers enabled, and you want to automatically log in anonymous users when embedding, then you will need to add the `auth_provider_hint=<anonymous-provider-name>` query string parameter to the {kib} URL that you're embedding.
387+
388+
For example, if you generate the iframe code to embed {kib}, it will look like this:
389+
390+
```html
391+
<iframe src="https://localhost:5601/app/dashboards#/view/722b74f0-b882-11e8-a6d9-e546fe2bba5f?embed=true&_g=(....)" height="600" width="800"></iframe>
392+
```
393+
394+
To make this iframe leverage anonymous access automatically, you will need to modify a link to {kib} in the `src` iframe attribute to look like this:
395+
396+
```html
397+
<iframe src="https://localhost:5601/app/dashboards?auth_provider_hint=anonymous1#/view/722b74f0-b882-11e8-a6d9-e546fe2bba5f?embed=true&_g=(....)" height="600" width="800"></iframe>
398+
```
399+
400+
Note that `auth_provider_hint` query string parameter goes *before* the hash URL fragment.
401+
296402
[[http-authentication]]
297403
==== HTTP authentication
298404

packages/kbn-dev-utils/src/plugin_list/discover_plugins.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ export interface Plugin {
3838
export type Plugins = Plugin[];
3939

4040
const getReadmeName = (directory: string) =>
41-
Fs.readdirSync(directory).find((name) => name.toLowerCase() === 'readme.md');
41+
Fs.readdirSync(directory).find(
42+
(name) => name.toLowerCase() === 'readme.md' || name.toLowerCase() === 'readme.mdx'
43+
);
4244

4345
const getReadmeAsciidocName = (directory: string) =>
4446
Fs.readdirSync(directory).find((name) => name.toLowerCase() === 'readme.asciidoc');

packages/kbn-optimizer/limits.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,4 @@ pageLoadAssetSize:
104104
watcher: 43598
105105
runtimeFields: 41752
106106
stackAlerts: 29684
107+
presentationUtil: 28545

src/dev/precommit_hook/casing_check_config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const IGNORE_FILE_GLOBS = [
3030
'docs/**/*',
3131
'**/bin/**/*',
3232
'**/+([A-Z_]).md',
33+
'**/+([A-Z_]).mdx',
3334
'**/+([A-Z_]).asciidoc',
3435
'**/LICENSE',
3536
'**/*.txt',

src/plugins/dashboard/public/application/hooks/use_dashboard_container.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export const useDashboardContainer = (
112112
(incomingEmbeddable.embeddableId &&
113113
!newContainer.getInput().panels[incomingEmbeddable.embeddableId]))
114114
) {
115+
dashboardStateManager.switchViewMode(ViewMode.EDIT);
115116
newContainer.addNewEmbeddable<EmbeddableInput>(
116117
incomingEmbeddable.type,
117118
incomingEmbeddable.input

src/plugins/data/README.md renamed to src/plugins/data/README.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
---
2+
id: kibDataPlugin
3+
slug: /kibana-dev-guide/services/data-plugin
4+
title: Data services
5+
image: https://source.unsplash.com/400x175/?Search
6+
summary: The data plugin contains services for searching, querying and filtering.
7+
date: 2020-12-02
8+
tags: ['kibana','dev', 'contributor', 'api docs']
9+
---
10+
111
# data
212

313
The data plugin provides common data access services, such as `search` and `query`, for solutions and application developers.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# presentationUtil
2+
3+
Utilities and components used by the presentation-related plugins

0 commit comments

Comments
 (0)