Skip to content

Commit

Permalink
Merge branch 'master' into ep-details
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Jan 30, 2020
2 parents 7ecc524 + 8a4d680 commit 4a50a5c
Show file tree
Hide file tree
Showing 1,123 changed files with 4,883 additions and 4,444 deletions.
9 changes: 6 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
/src/legacy/core_plugins/kibana/public/discover/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/visualize/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/home/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app
/src/legacy/core_plugins/metrics/ @elastic/kibana-app
/src/legacy/core_plugins/vis_type_vislib/ @elastic/kibana-app
# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon
/src/plugins/home/public @elastic/kibana-app
/src/plugins/home/server/*.ts @elastic/kibana-app
/src/plugins/home/server/services/ @elastic/kibana-app
# Exclude tutorial resources folder for now because they are not owned by Kibana app and most will move out soon
/src/legacy/core_plugins/kibana/public/home/*.ts @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/home/*.scss @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/home/np_ready/ @elastic/kibana-app
/src/plugins/kibana_legacy/ @elastic/kibana-app
/src/plugins/timelion/ @elastic/kibana-app
/src/plugins/dev_tools/ @elastic/kibana-app
Expand Down Expand Up @@ -150,9 +153,9 @@
**/*.scss @elastic/kibana-design

# Elasticsearch UI
/src/legacy/core_plugins/console/ @elastic/es-ui
/src/plugins/console/ @elastic/es-ui
/src/plugins/es_ui_shared/ @elastic/es-ui
/x-pack/legacy/plugins/console_extensions/ @elastic/es-ui
/x-pack/plugins/console_extensions/ @elastic/es-ui
/x-pack/legacy/plugins/cross_cluster_replication/ @elastic/es-ui
/x-pack/legacy/plugins/index_lifecycle_management/ @elastic/es-ui
/x-pack/legacy/plugins/index_management/ @elastic/es-ui
Expand Down
4 changes: 2 additions & 2 deletions .i18nrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"paths": {
"common.ui": "src/legacy/ui",
"console": "src/legacy/core_plugins/console",
"console": "src/plugins/console",
"core": "src/core",
"dashboardEmbeddableContainer": "src/plugins/dashboard_embeddable_container",
"data": [
Expand Down Expand Up @@ -40,7 +40,7 @@
"visTypeMetric": "src/legacy/core_plugins/vis_type_metric",
"visTypeTable": "src/legacy/core_plugins/vis_type_table",
"visTypeTagCloud": "src/legacy/core_plugins/vis_type_tagcloud",
"visTypeTimeseries": "src/legacy/core_plugins/vis_type_timeseries",
"visTypeTimeseries": ["src/legacy/core_plugins/vis_type_timeseries", "src/plugins/vis_type_timeseries"],
"visTypeVega": "src/legacy/core_plugins/vis_type_vega",
"visTypeVislib": "src/legacy/core_plugins/vis_type_vislib",
"visualizations": [
Expand Down
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@ yarn kbn bootstrap

(You can also run `yarn kbn` to see the other available commands. For more info about this tool, see https://github.com/elastic/kibana/tree/master/packages/kbn-pm.)

When switching branches which use different versions of npm packages you may need to run;
```bash
yarn kbn clean
```

If you have failures during `yarn kbn bootstrap` you may have some corrupted packages in your yarn cache which you can clean with;
```bash
yarn cache clean
```

#### Increase node.js heap size

Kibana is a big project and for some commands it can happen that the process hits the default heap limit and crashes with an out-of-memory error. If you run into this problem, you can increase maximum heap size by setting the `--max_old_space_size` option on the command line. To set the limit for all commands, simply add the following line to your shell config: `export NODE_OPTIONS="--max_old_space_size=2048"`.
Expand Down
32 changes: 16 additions & 16 deletions docs/settings/monitoring-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ built-in `elastic` user has this role.

You can adjust how monitoring data is
collected from {kib} and displayed in {kib} by configuring settings in the
`kibana.yml` file. There are also `xpack.monitoring.elasticsearch.*` settings,
`kibana.yml` file. There are also `monitoring.ui.elasticsearch.*` settings,
which support the same values as <<settings,{kib} configuration settings>>.

To control how data is collected from your {es} nodes, you configure
Expand All @@ -31,20 +31,20 @@ For more information, see
[[monitoring-general-settings]]
==== General monitoring settings

`xpack.monitoring.enabled`::
`monitoring.enabled`::
Set to `true` (default) to enable the {monitor-features} in {kib}. Unlike the
`xpack.monitoring.ui.enabled` setting, when this setting is `false`, the
`monitoring.ui.enabled` setting, when this setting is `false`, the
monitoring back-end does not run and {kib} stats are not sent to the monitoring
cluster.

`xpack.monitoring.elasticsearch.hosts`::
`monitoring.ui.elasticsearch.hosts`::
Specifies the location of the {es} cluster where your monitoring data is stored.
By default, this is the same as `elasticsearch.hosts`. This setting enables
you to use a single {kib} instance to search and visualize data in your
production cluster as well as monitor data sent to a dedicated monitoring
cluster.

`xpack.monitoring.elasticsearch.username`::
`monitoring.ui.elasticsearch.username`::
Specifies the username used by {kib} monitoring to establish a persistent connection
in {kib} to the {es} monitoring cluster and to verify licensing status on the {es}
monitoring cluster.
Expand All @@ -55,7 +55,7 @@ both the {es} monitoring cluster and the {es} production cluster.

If not set, {kib} uses the value of the `elasticsearch.username` setting.

`xpack.monitoring.elasticsearch.password`::
`monitoring.ui.elasticsearch.password`::
Specifies the password used by {kib} monitoring to establish a persistent connection
in {kib} to the {es} monitoring cluster and to verify licensing status on the {es}
monitoring cluster.
Expand All @@ -66,7 +66,7 @@ both the {es} monitoring cluster and the {es} production cluster.

If not set, {kib} uses the value of the `elasticsearch.password` setting.

`xpack.monitoring.elasticsearch.pingTimeout`::
`monitoring.ui.elasticsearch.pingTimeout`::
Specifies the time in milliseconds to wait for {es} to respond to internal
health checks. By default, it matches the `elasticsearch.pingTimeout` setting,
which has a default value of `30000`.
Expand All @@ -77,11 +77,11 @@ which has a default value of `30000`.

These settings control how data is collected from {kib}.

`xpack.monitoring.kibana.collection.enabled`::
`monitoring.kibana.collection.enabled`::
Set to `true` (default) to enable data collection from the {kib} NodeJS server
for {kib} Dashboards to be featured in the Monitoring.

`xpack.monitoring.kibana.collection.interval`::
`monitoring.kibana.collection.interval`::
Specifies the number of milliseconds to wait in between data sampling on the
{kib} NodeJS server for the metrics that are displayed in the {kib} dashboards.
Defaults to `10000` (10 seconds).
Expand All @@ -96,24 +96,24 @@ However, the defaults work best in most circumstances. For more information
about configuring {kib}, see
{kibana-ref}/settings.html[Setting Kibana Server Properties].

`xpack.monitoring.elasticsearch.logFetchCount`::
`monitoring.ui.elasticsearch.logFetchCount`::
Specifies the number of log entries to display in the Monitoring UI. Defaults to
`10`. The maximum value is `50`.

`xpack.monitoring.max_bucket_size`::
`monitoring.ui.max_bucket_size`::
Specifies the number of term buckets to return out of the overall terms list when
performing terms aggregations to retrieve index and node metrics. For more
information about the `size` parameter, see
{ref}/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-size[Terms Aggregation].
Defaults to `10000`.

`xpack.monitoring.min_interval_seconds`::
`monitoring.ui.min_interval_seconds`::
Specifies the minimum number of seconds that a time bucket in a chart can
represent. Defaults to 10. If you modify the
`xpack.monitoring.collection.interval` in `elasticsearch.yml`, use the same
`monitoring.ui.collection.interval` in `elasticsearch.yml`, use the same
value in this setting.

`xpack.monitoring.ui.enabled`::
`monitoring.ui.enabled`::
Set to `false` to hide the Monitoring UI in {kib}. The monitoring back-end
continues to run as an agent for sending {kib} stats to the monitoring
cluster. Defaults to `true`.
Expand All @@ -127,15 +127,15 @@ better decisions about your container performance, rather than guessing based on
the overall machine performance. If you are not running your applications in a
container, then Cgroup statistics are not useful.

`xpack.monitoring.ui.container.elasticsearch.enabled`::
`monitoring.ui.container.elasticsearch.enabled`::

For {es} clusters that are running in containers, this setting changes the
*Node Listing* to display the CPU utilization based on the reported Cgroup
statistics. It also adds the calculated Cgroup CPU utilization to the
*Node Overview* page instead of the overall operating system's CPU
utilization. Defaults to `false`.

`xpack.monitoring.ui.container.logstash.enabled`::
`monitoring.ui.container.logstash.enabled`::

For {ls} nodes that are running in containers, this setting
changes the {ls} *Node Listing* to display the CPU utilization
Expand Down
20 changes: 10 additions & 10 deletions docs/user/security/authentication/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[role="xpack"]
[[kibana-authentication]]
=== Authentication in Kibana
=== Authentication in {kib}
++++
<titleabbrev>Authentication</titleabbrev>
++++
Expand All @@ -16,23 +16,23 @@
[[basic-authentication]]
==== Basic authentication

Basic authentication requires a username and password to successfully log in to {kib}. It is enabled by default and based on the Native security realm provided by {es}. The basic authentication provider uses a Kibana provided login form, and supports authentication using the `Authorization` request header's `Basic` scheme.
To successfully log in to {kib}, basic authentication requires a username and password. Basic authentication is enabled by default, and is based on the Native security realm or LDAP security realm that is provided by {es}. The basic authentication provider uses a {kib} provided login form, and supports authentication using the `Authorization` request header `Basic` scheme.

The session cookies that are issued by the basic authentication provider are stateless. Therefore, logging out of Kibana when using the basic authentication provider clears the session cookies from the browser but does not invalidate the session cookie for reuse.
The session cookies that are issued by the basic authentication provider are stateless. Therefore, logging out of {kib} when using the basic authentication provider clears the session cookies from the browser, but does not invalidate the session cookie for reuse.

For more information about basic authentication and built-in users, see
{ref}/setting-up-authentication.html[User authentication].

[[token-authentication]]
==== Token authentication

Token authentication allows users to login using the same Kibana provided login form as basic authentication. The token authentication provider is built on {es}'s token APIs. The bearer tokens returned by {es}'s {ref}/security-api-get-token.html[get token API] can be used directly with Kibana using the `Authorization` request header with the `Bearer` scheme.
Token authentication allows users to login using the same {kib} provided login form as basic authentication, and is based on the Native security realm or LDAP security realm that is provided by {es}. The token authentication provider is built on {es} token APIs. The bearer tokens returned by {es}'s {ref}/security-api-get-token.html[get token API] can be used directly with {kib} using the `Authorization` request header with the `Bearer` scheme.

The session cookies that are issued by the token authentication provider are stateful, and logging out of Kibana invalidates the session cookies for reuse.
The session cookies that are issued by the token authentication provider are stateful, and logging out of {kib} invalidates the session cookies for reuse.

Prior to configuring Kibana, ensure token support is enabled in Elasticsearch. See the {ref}/security-api-get-token.html[Elasticsearch token API] documentation for more information.
Prior to configuring {kib}, ensure token support is enabled in {es}. See the {ref}/security-api-get-token.html[{es} token API] documentation for more information.

To enable the token authentication provider in Kibana, set the following value in your `kibana.yml`:
To enable the token authentication provider in {kib}, set the following value in your `kibana.yml`:

[source,yaml]
--------------------------------------------------------------------------------
Expand Down Expand Up @@ -67,7 +67,7 @@ server.ssl.clientAuthentication: required
xpack.security.authc.providers: [pki]
--------------------------------------------------------------------------------

NOTE: Trusted CAs can also be specified in a PKCS #12 keystore bundled with your Kibana server certificate/key using
NOTE: Trusted CAs can also be specified in a PKCS #12 keystore bundled with your {kib} server certificate/key using
`server.ssl.keystore.path` or in a separate trust store using `server.ssl.truststore.path`.

PKI support in {kib} is designed to be the primary (or sole) authentication method for users of that {kib} instance. However, you can configure both PKI and Basic authentication for the same {kib} instance:
Expand Down Expand Up @@ -128,7 +128,7 @@ Basic authentication is supported _only_ if `basic` authentication provider is e

At the beginning of the SAML handshake, {kib} stores the initial URL in the session cookie, so it can redirect the user back to that URL after successful SAML authentication.
If the URL is long, the session cookie might exceed the maximum size supported by the browser--typically 4KB for all cookies per domain. When this happens, the session cookie is truncated,
or dropped completely, and you might experience sporadic failures during SAML authentication.
or dropped completely, and you might experience sporadic failures during SAML authentication.

To remedy this issue, you can decrease the maximum
size of the URL that {kib} is allowed to store during the SAML handshake. The default value is 2KB.
Expand Down Expand Up @@ -185,7 +185,7 @@ Users will be able to access the login page and use Basic authentication by navi
[float]
==== Single sign-on provider details

The following sections apply both to <<saml>> and <<oidc>>
The following sections apply both to <<saml>> and <<oidc>>

[float]
===== Access and refresh tokens
Expand Down
6 changes: 3 additions & 3 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
'Team:Operations',
'renovate',
'v8.0.0',
'v7.6.0',
'v7.7.0',
],
major: {
labels: [
'release_note:skip',
'Team:Operations',
'renovate',
'v8.0.0',
'v7.6.0',
'v7.7.0',
'renovate:major',
],
},
Expand Down Expand Up @@ -238,7 +238,7 @@
'Team:Operations',
'renovate',
'v8.0.0',
'v7.6.0',
'v7.7.0',
':ml',
],
},
Expand Down
50 changes: 50 additions & 0 deletions src/core/server/config/deprecation/core_deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,56 @@ export const coreDeprecationProvider: ConfigDeprecationProvider = ({
renameFromRoot('xpack.telemetry.config', 'telemetry.config'),
renameFromRoot('xpack.telemetry.banner', 'telemetry.banner'),
renameFromRoot('xpack.telemetry.url', 'telemetry.url'),
// Monitoring renames
// TODO: Remove these from here once the monitoring plugin is migrated to NP
renameFromRoot('xpack.monitoring.enabled', 'monitoring.enabled'),
renameFromRoot('xpack.monitoring.ui.enabled', 'monitoring.ui.enabled'),
renameFromRoot(
'xpack.monitoring.kibana.collection.enabled',
'monitoring.kibana.collection.enabled'
),
renameFromRoot('xpack.monitoring.max_bucket_size', 'monitoring.ui.max_bucket_size'),
renameFromRoot('xpack.monitoring.min_interval_seconds', 'monitoring.ui.min_interval_seconds'),
renameFromRoot(
'xpack.monitoring.show_license_expiration',
'monitoring.ui.show_license_expiration'
),
renameFromRoot(
'xpack.monitoring.ui.container.elasticsearch.enabled',
'monitoring.ui.container.elasticsearch.enabled'
),
renameFromRoot(
'xpack.monitoring.ui.container.logstash.enabled',
'monitoring.ui.container.logstash.enabled'
),
renameFromRoot(
'xpack.monitoring.tests.cloud_detector.enabled',
'monitoring.tests.cloud_detector.enabled'
),
renameFromRoot(
'xpack.monitoring.kibana.collection.interval',
'monitoring.kibana.collection.interval'
),
renameFromRoot('xpack.monitoring.elasticsearch.hosts', 'monitoring.ui.elasticsearch.hosts'),
renameFromRoot('xpack.monitoring.elasticsearch.username', 'monitoring.ui.elasticsearch.username'),
renameFromRoot('xpack.monitoring.elasticsearch.password', 'monitoring.ui.elasticsearch.password'),
renameFromRoot(
'xpack.monitoring.xpack_api_polling_frequency_millis',
'monitoring.xpack_api_polling_frequency_millis'
),
renameFromRoot(
'xpack.monitoring.cluster_alerts.email_notifications.enabled',
'monitoring.cluster_alerts.email_notifications.enabled'
),
renameFromRoot(
'xpack.monitoring.cluster_alerts.email_notifications.email_address',
'monitoring.cluster_alerts.email_notifications.email_address'
),
renameFromRoot('xpack.monitoring.ccs.enabled', 'monitoring.ui.ccs.enabled'),
renameFromRoot(
'xpack.monitoring.elasticsearch.logFetchCount',
'monitoring.ui.elasticsearch.logFetchCount'
),
configPathDeprecation,
dataPathDeprecation,
rewriteBasePathDeprecation,
Expand Down
13 changes: 12 additions & 1 deletion src/core/server/http/router/response_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import { ResponseObject as HapiResponseObject, ResponseToolkit as HapiResponseToolkit } from 'hapi';
import typeDetect from 'type-detect';
import Boom from 'boom';
import * as stream from 'stream';

import {
HttpResponsePayload,
Expand Down Expand Up @@ -112,8 +113,18 @@ export class HapiResponseAdapter {
return response;
}

private toError(kibanaResponse: KibanaResponse<ResponseError>) {
private toError(kibanaResponse: KibanaResponse<ResponseError | Buffer | stream.Readable>) {
const { payload } = kibanaResponse;

// Special case for when we are proxying requests and want to enable streaming back error responses opaquely.
if (Buffer.isBuffer(payload) || payload instanceof stream.Readable) {
const response = this.responseToolkit
.response(kibanaResponse.payload)
.code(kibanaResponse.status);
setHeaders(response, kibanaResponse.options.headers);
return response;
}

// we use for BWC with Boom payload for error responses - {error: string, message: string, statusCode: string}
const error = new Boom('', {
statusCode: kibanaResponse.status,
Expand Down
2 changes: 1 addition & 1 deletion src/dev/renovate/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { RENOVATE_PACKAGE_GROUPS } from './package_groups';
import { PACKAGE_GLOBS } from './package_globs';
import { wordRegExp, maybeFlatMap, maybeMap, getTypePackageName } from './utils';

const DEFAULT_LABELS = ['release_note:skip', 'Team:Operations', 'renovate', 'v8.0.0', 'v7.6.0'];
const DEFAULT_LABELS = ['release_note:skip', 'Team:Operations', 'renovate', 'v8.0.0', 'v7.7.0'];

export const RENOVATE_CONFIG = {
extends: ['config:base'],
Expand Down
Loading

0 comments on commit 4a50a5c

Please sign in to comment.