Skip to content

Commit 83b8f03

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fix/kibana-100800-generator-changes
2 parents 58fa724 + a4f6d43 commit 83b8f03

188 files changed

Lines changed: 11092 additions & 4418 deletions

File tree

Some content is hidden

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

.ci/package-testing/Jenkinsfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/groovy
2+
library 'kibana-pipeline-library'
3+
kibanaLibrary.load()
4+
kibanaPipeline(timeoutMinutes: 300) {
5+
slackNotifications.onFailure {
6+
ciStats.trackBuild {
7+
workers.ci(ramDisk: false, name: "package-build", size: 'l', runErrorReporter: false) {
8+
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
9+
kibanaPipeline.bash("test/scripts/jenkins_xpack_package_build.sh", "Package builds")
10+
}
11+
}
12+
def packageTypes = ['deb', 'docker', 'rpm']
13+
def workers = [:]
14+
packageTypes.each { type ->
15+
workers["package-${type}"] = {
16+
testPackage(type)
17+
}
18+
}
19+
parallel(workers)
20+
}
21+
}
22+
}
23+
def testPackage(packageType) {
24+
workers.ci(ramDisk: false, name: "package-${packageType}", size: 's', runErrorReporter: false) {
25+
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
26+
kibanaPipeline.bash("test/scripts/jenkins_xpack_package_${packageType}.sh", "Execute package testing for ${packageType}")
27+
}
28+
}
29+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ npm-debug.log*
6060
.ci/runbld
6161
.ci/bash_standard_lib.sh
6262
.gradle
63+
.vagrant
6364

6465
## @cypress/snapshot from apm plugin
6566
snapshots.js
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[[development-package-tests]]
2+
== Package Testing
3+
4+
Packaging tests use Vagrant virtual machines as hosts and Ansible for
5+
provisioning and assertions. Kibana distributions are copied from the
6+
target folder into each VM and installed, along with required
7+
dependencies.
8+
9+
=== Setup
10+
11+
* https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html[Ansible]
12+
+
13+
```
14+
# Ubuntu
15+
sudo apt-get install python3-pip libarchive-tools
16+
pip3 install --user ansible
17+
18+
# Darwin
19+
brew install python3
20+
pip3 install --user ansible
21+
```
22+
* https://www.vagrantup.com/downloads[Vagrant]
23+
* https://www.virtualbox.org/wiki/Downloads[Virtualbox]
24+
25+
=== Machines
26+
27+
[cols=",,",options="header",]
28+
|===
29+
|Hostname |IP |Description
30+
|deb |192.168.50.5 |Installation of Kibana’s deb package
31+
|rpm |192.168.50.6 |Installation of Kibana’s rpm package
32+
|docker |192.168.50.7 |Installation of Kibana’s docker image
33+
|===
34+
35+
=== Running
36+
37+
```
38+
# Build distributions
39+
node scripts/build --all-platforms --debug --no-oss
40+
41+
cd test/package
42+
43+
# Setup virtual machine and networking
44+
vagrant up <hostname> --no-provision
45+
46+
# Install Kibana and run OS level tests
47+
# This step can be repeated when adding new tests, it ensures machine state - installations won't run twice
48+
vagrant provision <hostname>
49+
50+
# Running functional tests
51+
node scripts/es snapshot \
52+
-E network.bind_host=127.0.0.1,192.168.50.1 \
53+
-E discovery.type=single-node \
54+
--license=trial
55+
TEST_KIBANA_URL=http://elastic:changeme@<ip>:5601 \
56+
TEST_ES_URL=http://elastic:changeme@192.168.50.1:9200 \
57+
node scripts/functional_test_runner.js --include-tag=smoke
58+
```
59+
60+
=== Cleanup
61+
62+
....
63+
vagrant destroy <hostname>
64+
....

docs/developer/contributing/development-tests.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,16 @@ to learn more about using the node scripts we provide for building
7474
* <<development-functional-tests>>
7575
* <<development-unit-tests>>
7676
* <<development-accessibility-tests>>
77+
* <<development-package-tests>>
7778

7879
include::development-functional-tests.asciidoc[leveloffset=+1]
7980

8081
include::development-unit-tests.asciidoc[leveloffset=+1]
8182

8283
include::development-accessibility-tests.asciidoc[leveloffset=+1]
8384

85+
include::development-package-tests.asciidoc[leveloffset=+1]
86+
8487
[discrete]
8588
=== Cross-browser compatibility
8689

docs/settings/alert-action-settings.asciidoc

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ You can configure the following settings in the `kibana.yml` file.
4141
[cols="2*<"]
4242
|===
4343
| `xpack.actions.enabled`
44-
| Feature toggle that enables Actions in {kib}. Defaults to `true`.
44+
| Feature toggle that enables Actions in {kib}. Default: `true`.
4545

4646
| `xpack.actions.allowedHosts` {ess-icon}
4747
| A list of hostnames that {kib} is allowed to connect to when built-in actions are triggered. It defaults to `[*]`, allowing any host, but keep in mind the potential for SSRF attacks when hosts are not explicitly added to the allowed hosts. An empty list `[]` can be used to block built-in actions from making any external connections. +
@@ -50,7 +50,7 @@ You can configure the following settings in the `kibana.yml` file.
5050

5151
| `xpack.actions.customHostSettings` {ess-icon}
5252
| A list of custom host settings to override existing global settings.
53-
Defaults to an empty list. +
53+
Default: an empty list. +
5454
+
5555
Each entry in the list must have a `url` property, to associate a connection
5656
type (mail or https), hostname and port with the remaining options in the
@@ -70,6 +70,7 @@ You can configure the following settings in the `kibana.yml` file.
7070
xpack.actions.customHostSettings:
7171
- url: smtp://mail.example.com:465
7272
tls:
73+
verificationMode: 'full'
7374
certificateAuthoritiesFiles: [ 'one.crt' ]
7475
certificateAuthoritiesData: |
7576
-----BEGIN CERTIFICATE-----
@@ -79,7 +80,9 @@ xpack.actions.customHostSettings:
7980
requireTLS: true
8081
- url: https://webhook.example.com
8182
tls:
83+
// legacy
8284
rejectUnauthorized: false
85+
verificationMode: 'none'
8386
--
8487

8588
[cols="2*<"]
@@ -115,10 +118,16 @@ xpack.actions.customHostSettings:
115118

116119
| `xpack.actions.customHostSettings[n]`
117120
`.tls.rejectUnauthorized` {ess-icon}
118-
| A boolean value indicating whether to bypass server certificate validation.
121+
| Deprecated. Use <<action-config-custom-host-verification-mode,`xpack.actions.customHostSettings.tls.verificationMode`>> instead. A boolean value indicating whether to bypass server certificate validation.
119122
Overrides the general `xpack.actions.rejectUnauthorized` configuration
120123
for requests made for this hostname/port.
121124

125+
|[[action-config-custom-host-verification-mode]] `xpack.actions.customHostSettings[n]`
126+
`.tls.verificationMode`
127+
| Controls the verification of the server certificate that {hosted-ems} receives when making an outbound SSL/TLS connection to the host server. Valid values are `full`, `certificate`, and `none`.
128+
Use `full` to perform hostname verification, `certificate` to skip hostname verification, and `none` to skip verification. Default: `full`. <<elasticsearch-ssl-verificationMode,Equivalent {kib} setting>>. Overrides the general `xpack.actions.tls.verificationMode` configuration
129+
for requests made for this hostname/port.
130+
122131
| `xpack.actions.customHostSettings[n]`
123132
`.tls.certificateAuthoritiesFiles`
124133
| A file name or list of file names of PEM-encoded certificate files to use
@@ -137,10 +146,10 @@ xpack.actions.customHostSettings:
137146

138147
| `xpack.actions`
139148
`.preconfiguredAlertHistoryEsIndex` {ess-icon}
140-
| Enables a preconfigured alert history {es} <<index-action-type, Index>> connector. Defaults to `false`.
149+
| Enables a preconfigured alert history {es} <<index-action-type, Index>> connector. Default: `false`.
141150

142151
| `xpack.actions.preconfigured`
143-
| Specifies preconfigured connector IDs and configs. Defaults to {}.
152+
| Specifies preconfigured connector IDs and configs. Default: {}.
144153

145154
| `xpack.actions.proxyUrl` {ess-icon}
146155
| Specifies the proxy URL to use, if using a proxy for actions. By default, no proxy is used.
@@ -152,27 +161,44 @@ xpack.actions.customHostSettings:
152161
| Specifies hostnames which should only use the proxy, if using a proxy for actions. The value is an array of hostnames as strings. By default, no hosts will use the proxy, but if an action's hostname is in this list, the proxy will be used. The settings `xpack.actions.proxyBypassHosts` and `xpack.actions.proxyOnlyHosts` cannot be used at the same time.
153162

154163
| `xpack.actions.proxyHeaders` {ess-icon}
155-
| Specifies HTTP headers for the proxy, if using a proxy for actions. Defaults to {}.
164+
| Specifies HTTP headers for the proxy, if using a proxy for actions. Default: {}.
156165

157166
a|`xpack.actions.`
158167
`proxyRejectUnauthorizedCertificates` {ess-icon}
159-
| Set to `false` to bypass certificate validation for the proxy, if using a proxy for actions. Defaults to `true`.
168+
| Deprecated. Use <<action-config-proxy-verification-mode,`xpack.actions.tls.proxyVerificationMode`>> instead. Set to `false` to bypass certificate validation for the proxy, if using a proxy for actions. Default: `true`.
169+
170+
|[[action-config-proxy-verification-mode]]
171+
`xpack.actions[n]`
172+
`.tls.proxyVerificationMode` {ess-icon}
173+
| Controls the verification for the proxy server certificate that {hosted-ems} receives when making an outbound SSL/TLS connection to the proxy server. Valid values are `full`, `certificate`, and `none`.
174+
Use `full` to perform hostname verification, `certificate` to skip hostname verification, and `none` to skip verification. Default: `full`. <<elasticsearch-ssl-verificationMode,Equivalent {kib} setting>>.
160175

161176
| `xpack.actions.rejectUnauthorized` {ess-icon}
162-
| Set to `false` to bypass certificate validation for actions. Defaults to `true`. +
177+
| Deprecated. Use <<action-config-verification-mode,`xpack.actions.tls.verificationMode`>> instead. Set to `false` to bypass certificate validation for actions. Default: `true`. +
163178
+
164179
As an alternative to setting `xpack.actions.rejectUnauthorized`, you can use the setting
165180
`xpack.actions.customHostSettings` to set TLS options for specific servers.
166181

182+
|[[action-config-verification-mode]]
183+
`xpack.actions[n]`
184+
`.tls.verificationMode` {ess-icon}
185+
| Controls the verification for the server certificate that {hosted-ems} receives when making an outbound SSL/TLS connection for actions. Valid values are `full`, `certificate`, and `none`.
186+
Use `full` to perform hostname verification, `certificate` to skip hostname verification, and `none` to skip verification. Default: `full`. <<elasticsearch-ssl-verificationMode,Equivalent {kib} setting>>. +
187+
+
188+
As an alternative to setting `xpack.actions.tls.verificationMode`, you can use the setting
189+
`xpack.actions.customHostSettings` to set TLS options for specific servers.
190+
191+
192+
167193
| `xpack.actions.maxResponseContentLength` {ess-icon}
168-
| Specifies the max number of bytes of the http response for requests to external resources. Defaults to 1000000 (1MB).
194+
| Specifies the max number of bytes of the http response for requests to external resources. Default: 1000000 (1MB).
169195

170196
| `xpack.actions.responseTimeout` {ess-icon}
171197
| Specifies the time allowed for requests to external resources. Requests that take longer are aborted. The time is formatted as: +
172198
+
173199
`<count>[ms,s,m,h,d,w,M,Y]` +
174200
+
175-
For example, `20m`, `24h`, `7d`, `1w`. Defaults to `60s`.
201+
For example, `20m`, `24h`, `7d`, `1w`. Default: `60s`.
176202

177203

178204
|===

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
"@mapbox/mapbox-gl-draw": "1.3.0",
162162
"@mapbox/mapbox-gl-rtl-text": "0.2.3",
163163
"@mapbox/vector-tile": "1.3.1",
164+
"@reduxjs/toolkit": "^1.5.1",
164165
"@scant/router": "^0.1.1",
165166
"@slack/webhook": "^5.0.4",
166167
"@turf/along": "6.0.1",
@@ -173,6 +174,7 @@
173174
"@turf/distance": "6.0.1",
174175
"@turf/helpers": "6.0.1",
175176
"@turf/length": "^6.0.2",
177+
"@types/redux-logger": "^3.0.8",
176178
"JSONStream": "1.3.5",
177179
"abort-controller": "^3.0.0",
178180
"abortcontroller-polyfill": "^1.4.0",
@@ -365,6 +367,7 @@
365367
"redux": "^4.0.5",
366368
"redux-actions": "^2.6.5",
367369
"redux-devtools-extension": "^2.13.8",
370+
"redux-logger": "^3.0.6",
368371
"redux-observable": "^1.2.0",
369372
"redux-saga": "^1.1.3",
370373
"redux-thunk": "^2.3.0",

src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ kibana_vars=(
175175
xpack.actions.rejectUnauthorized
176176
xpack.actions.maxResponseContentLength
177177
xpack.actions.responseTimeout
178+
xpack.actions.tls.verificationMode
179+
xpack.actions.tls.proxyVerificationMode
178180
xpack.alerts.healthCheck.interval
179181
xpack.alerts.invalidateApiKeysTask.interval
180182
xpack.alerts.invalidateApiKeysTask.removalDelay

src/dev/precommit_hook/casing_check_config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const IGNORE_FILE_GLOBS = [
4040
'vars/*',
4141
'.ci/pipeline-library/**/*',
4242
'packages/kbn-test/jest-preset.js',
43+
'test/package/Vagrantfile',
4344

4445
// filename must match language code which requires capital letters
4546
'**/translations/*.json',

test/functional/page_objects/time_picker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export function TimePickerProvider({ getService, getPageObjects }: FtrProviderCo
3030
const testSubjects = getService('testSubjects');
3131
const { header } = getPageObjects(['header']);
3232
const kibanaServer = getService('kibanaServer');
33-
const MenuToggle = getService('MenuToggle');
33+
const menuToggle = getService('menuToggle');
3434

35-
const quickSelectTimeMenuToggle = new MenuToggle({
35+
const quickSelectTimeMenuToggle = menuToggle.create({
3636
name: 'QuickSelectTime Menu',
3737
menuTestSubject: 'superDatePickerQuickMenu',
3838
toggleButtonTestSubject: 'superDatePickerToggleQuickMenuButton',

test/functional/services/embedding.ts

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,20 @@
66
* Side Public License, v 1.
77
*/
88

9-
import { FtrProviderContext } from '../ftr_provider_context';
9+
import { FtrService } from '../ftr_provider_context';
1010

11-
export function EmbeddingProvider({ getService, getPageObjects }: FtrProviderContext) {
12-
const browser = getService('browser');
13-
const log = getService('log');
14-
const PageObjects = getPageObjects(['header']);
11+
export class EmbeddingService extends FtrService {
12+
private readonly browser = this.ctx.getService('browser');
13+
private readonly log = this.ctx.getService('log');
14+
private readonly PageObjects = this.ctx.getPageObjects(['header']);
1515

16-
class Embedding {
17-
/**
18-
* Opens current page in embeded mode
19-
*/
20-
public async openInEmbeddedMode(): Promise<void> {
21-
const currentUrl = await browser.getCurrentUrl();
22-
log.debug(`Opening in embedded mode: ${currentUrl}`);
23-
await browser.get(`${currentUrl}&embed=true`);
24-
await PageObjects.header.waitUntilLoadingHasFinished();
25-
}
16+
/**
17+
* Opens current page in embeded mode
18+
*/
19+
public async openInEmbeddedMode(): Promise<void> {
20+
const currentUrl = await this.browser.getCurrentUrl();
21+
this.log.debug(`Opening in embedded mode: ${currentUrl}`);
22+
await this.browser.get(`${currentUrl}&embed=true`);
23+
await this.PageObjects.header.waitUntilLoadingHasFinished();
2624
}
27-
28-
return new Embedding();
2925
}

0 commit comments

Comments
 (0)