Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into detection-eng…
Browse files Browse the repository at this point in the history
…ine-view-timeline
  • Loading branch information
XavierM committed Jan 14, 2020
2 parents 83b06d3 + 8c0440f commit 91ff133
Show file tree
Hide file tree
Showing 126 changed files with 25,462 additions and 20,716 deletions.
40 changes: 25 additions & 15 deletions docs/user/security/reporting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,33 @@ the {reporting} endpoints to authorized users. This requires that you:

. Enable {security} on your {es} cluster. For more information,
see {ref}/security-getting-started.html[Getting Started with Security].
. Configure an SSL certificate for Kibana. For more information, see
<<using-kibana-with-security>>.
. Configure {watcher} to trust the Kibana server's certificate by adding it to
the {watcher} truststore on each node:
.. Import the {kib} server certificate into the {watcher} truststore using
Java Keytool:
. Configure TLS/SSL encryption for the {kib} server. For more information, see
<<configuring-tls>>.
. Specify the {kib} server's CA certificate chain in `elasticsearch.yml`:
+
[source,shell]
---------------------------------------------------------
keytool -importcert -keystore watcher-truststore.jks -file server.crt
---------------------------------------------------------
+
NOTE: If the truststore doesn't already exist, it is created.
--
If you are using your own CA to sign the {kib} server certificate, then you need
to specify the CA certificate chain in {es} to properly establish trust in TLS
connections between {watcher} and {kib}. If your CA certificate chain is
contained in a PKCS #12 trust store, specify it like so:

[source,yaml]
--------------------------------------------------------------------------------
xpack.http.ssl.truststore.path: "/path/to/your/truststore.p12"
xpack.http.ssl.truststore.type: "PKCS12"
xpack.http.ssl.truststore.password: "optional decryption password"
--------------------------------------------------------------------------------

Otherwise, if your CA certificate chain is in PEM format, specify it like so:

[source,yaml]
--------------------------------------------------------------------------------
xpack.http.ssl.certificate_authorities: ["/path/to/your/cacert1.pem", "/path/to/your/cacert2.pem"]
--------------------------------------------------------------------------------

For more information, see {ref}/notification-settings.html#ssl-notification-settings[the {watcher} HTTP TLS/SSL Settings].
--

.. Make sure the `xpack.http.ssl.truststore.path` setting in
`elasticsearch.yml` specifies the location of the {watcher}
truststore.
. Add one or more users who have the permissions
necessary to use {kib} and {reporting}. For more information, see
<<secure-reporting>>.
Expand Down
15 changes: 11 additions & 4 deletions test/functional/apps/dashboard/dashboard_clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import expect from '@kbn/expect';

export default function({ getService, getPageObjects }) {
const retry = getService('retry');
const listingTable = getService('listingTable');
const PageObjects = getPageObjects(['dashboard', 'header', 'common']);

describe('dashboard clone', function describeIndexTests() {
Expand All @@ -40,10 +41,12 @@ export default function({ getService, getPageObjects }) {

await PageObjects.dashboard.clickClone();
await PageObjects.dashboard.confirmClone();

const countOfDashboards = await PageObjects.dashboard.getDashboardCountWithName(
await PageObjects.dashboard.gotoDashboardLandingPage();
const countOfDashboards = await listingTable.searchAndGetItemsCount(
'dashboard',
clonedDashboardName
);

expect(countOfDashboards).to.equal(1);
});

Expand All @@ -70,8 +73,10 @@ export default function({ getService, getPageObjects }) {

it("and doesn't save", async () => {
await PageObjects.dashboard.cancelClone();
await PageObjects.dashboard.gotoDashboardLandingPage();

const countOfDashboards = await PageObjects.dashboard.getDashboardCountWithName(
const countOfDashboards = await listingTable.searchAndGetItemsCount(
'dashboard',
dashboardName
);
expect(countOfDashboards).to.equal(1);
Expand All @@ -85,8 +90,10 @@ export default function({ getService, getPageObjects }) {
await PageObjects.dashboard.expectDuplicateTitleWarningDisplayed({ displayed: true });
await PageObjects.dashboard.confirmClone();
await PageObjects.dashboard.waitForRenderComplete();
await PageObjects.dashboard.gotoDashboardLandingPage();

const countOfDashboards = await PageObjects.dashboard.getDashboardCountWithName(
const countOfDashboards = await listingTable.searchAndGetItemsCount(
'dashboard',
dashboardName + ' Copy'
);
expect(countOfDashboards).to.equal(2);
Expand Down
6 changes: 3 additions & 3 deletions test/functional/apps/dashboard/dashboard_filter_bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function({ getService, getPageObjects }) {
const pieChart = getService('pieChart');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'visualize']);
const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'visualize', 'timePicker']);

describe('dashboard filter bar', () => {
before(async () => {
Expand Down Expand Up @@ -91,7 +91,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.ensureFieldEditorModalIsClosed();
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.setTimepickerInDataRange();
await PageObjects.timePicker.setDefaultDataRange();
});

it('are not selected by default', async function() {
Expand Down Expand Up @@ -136,7 +136,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.ensureFieldEditorModalIsClosed();
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.setTimepickerInDataRange();
await PageObjects.timePicker.setDefaultDataRange();
});

it('are added when a cell magnifying glass is clicked', async function() {
Expand Down
6 changes: 3 additions & 3 deletions test/functional/apps/dashboard/dashboard_filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function({ getService, getPageObjects }) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const dashboardPanelActions = getService('dashboardPanelActions');
const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'visualize']);
const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'visualize', 'timePicker']);

describe('dashboard filtering', function() {
this.tags('smoke');
Expand All @@ -52,7 +52,7 @@ export default function({ getService, getPageObjects }) {
describe('adding a filter that excludes all data', () => {
before(async () => {
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.setTimepickerInDataRange();
await PageObjects.timePicker.setDefaultDataRange();
await dashboardAddPanel.addEveryVisualization('"Filter Bytes Test"');
await dashboardAddPanel.addEverySavedSearch('"Filter Bytes Test"');

Expand Down Expand Up @@ -234,7 +234,7 @@ export default function({ getService, getPageObjects }) {

it('visualization saved with a query filters data', async () => {
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.setTimepickerInDataRange();
await PageObjects.timePicker.setDefaultDataRange();

await dashboardAddPanel.addVisualization('Rendering-Test:-animal-sounds-pie');
await PageObjects.header.waitUntilLoadingHasFinished();
Expand Down
54 changes: 30 additions & 24 deletions test/functional/apps/dashboard/dashboard_listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['dashboard', 'header', 'common']);
const browser = getService('browser');
const listingTable = getService('listingTable');

describe('dashboard listing page', function describeIndexTests() {
const dashboardName = 'Dashboard Listing Test';
Expand All @@ -41,7 +42,8 @@ export default function({ getService, getPageObjects }) {
await PageObjects.dashboard.saveDashboard(dashboardName);

await PageObjects.dashboard.gotoDashboardLandingPage();
const countOfDashboards = await PageObjects.dashboard.getDashboardCountWithName(
const countOfDashboards = await listingTable.searchAndGetItemsCount(
'dashboard',
dashboardName
);
expect(countOfDashboards).to.equal(1);
Expand All @@ -53,7 +55,8 @@ export default function({ getService, getPageObjects }) {
});

it('is not shown when there are no dashboards shown during a search', async function() {
const countOfDashboards = await PageObjects.dashboard.getDashboardCountWithName(
const countOfDashboards = await listingTable.searchAndGetItemsCount(
'dashboard',
'gobeldeguck'
);
expect(countOfDashboards).to.equal(0);
Expand All @@ -65,29 +68,31 @@ export default function({ getService, getPageObjects }) {

describe('delete', function() {
it('default confirm action is cancel', async function() {
await PageObjects.dashboard.searchForDashboardWithName(dashboardName);
await PageObjects.dashboard.checkDashboardListingSelectAllCheckbox();
await PageObjects.dashboard.clickDeleteSelectedDashboards();
await listingTable.searchForItemWithName(dashboardName);
await listingTable.checkListingSelectAllCheckbox();
await listingTable.clickDeleteSelected();

await PageObjects.common.expectConfirmModalOpenState(true);

await PageObjects.common.pressEnterKey();

await PageObjects.common.expectConfirmModalOpenState(false);

const countOfDashboards = await PageObjects.dashboard.getDashboardCountWithName(
const countOfDashboards = await listingTable.searchAndGetItemsCount(
'dashboard',
dashboardName
);
expect(countOfDashboards).to.equal(1);
});

it('succeeds on confirmation press', async function() {
await PageObjects.dashboard.checkDashboardListingSelectAllCheckbox();
await PageObjects.dashboard.clickDeleteSelectedDashboards();
await listingTable.checkListingSelectAllCheckbox();
await listingTable.clickDeleteSelected();

await PageObjects.common.clickConfirmOnModal();

const countOfDashboards = await PageObjects.dashboard.getDashboardCountWithName(
const countOfDashboards = await listingTable.searchAndGetItemsCount(
'dashboard',
dashboardName
);
expect(countOfDashboards).to.equal(0);
Expand All @@ -96,44 +101,45 @@ export default function({ getService, getPageObjects }) {

describe('search', function() {
before(async () => {
await PageObjects.dashboard.clearSearchValue();
await listingTable.clearSearchFilter();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.saveDashboard('Two Words');
await PageObjects.dashboard.gotoDashboardLandingPage();
});

it('matches on the first word', async function() {
await PageObjects.dashboard.searchForDashboardWithName('Two');
const countOfDashboards = await PageObjects.dashboard.getCountOfDashboardsInListingTable();
await listingTable.searchForItemWithName('Two');
const countOfDashboards = await listingTable.getItemsCount('dashboard');
expect(countOfDashboards).to.equal(1);
});

it('matches the second word', async function() {
await PageObjects.dashboard.searchForDashboardWithName('Words');
const countOfDashboards = await PageObjects.dashboard.getCountOfDashboardsInListingTable();
await listingTable.searchForItemWithName('Words');
const countOfDashboards = await listingTable.getItemsCount('dashboard');
expect(countOfDashboards).to.equal(1);
});

it('matches the second word prefix', async function() {
await PageObjects.dashboard.searchForDashboardWithName('Wor');
const countOfDashboards = await PageObjects.dashboard.getCountOfDashboardsInListingTable();
await listingTable.searchForItemWithName('Wor');
const countOfDashboards = await listingTable.getItemsCount('dashboard');
expect(countOfDashboards).to.equal(1);
});

it('does not match mid word', async function() {
await PageObjects.dashboard.searchForDashboardWithName('ords');
const countOfDashboards = await PageObjects.dashboard.getCountOfDashboardsInListingTable();
await listingTable.searchForItemWithName('ords');
const countOfDashboards = await listingTable.getItemsCount('dashboard');
expect(countOfDashboards).to.equal(0);
});

it('is case insensitive', async function() {
await PageObjects.dashboard.searchForDashboardWithName('two words');
const countOfDashboards = await PageObjects.dashboard.getCountOfDashboardsInListingTable();
await listingTable.searchForItemWithName('two words');
const countOfDashboards = await listingTable.getItemsCount('dashboard');
expect(countOfDashboards).to.equal(1);
});

it('is using AND operator', async function() {
await PageObjects.dashboard.searchForDashboardWithName('three words');
const countOfDashboards = await PageObjects.dashboard.getCountOfDashboardsInListingTable();
await listingTable.searchForItemWithName('three words');
const countOfDashboards = await listingTable.getItemsCount('dashboard');
expect(countOfDashboards).to.equal(0);
});
});
Expand Down Expand Up @@ -176,7 +182,7 @@ export default function({ getService, getPageObjects }) {
});

it('preloads search filter bar when there is no match', async function() {
const searchFilter = await PageObjects.dashboard.getSearchFilterValue();
const searchFilter = await listingTable.getSearchFilterValue();
expect(searchFilter).to.equal('"nodashboardsnamedme"');
});

Expand All @@ -196,7 +202,7 @@ export default function({ getService, getPageObjects }) {
});

it('preloads search filter bar when there is more than one match', async function() {
const searchFilter = await PageObjects.dashboard.getSearchFilterValue();
const searchFilter = await listingTable.getSearchFilterValue();
expect(searchFilter).to.equal('"two words"');
});

Expand Down
17 changes: 12 additions & 5 deletions test/functional/apps/dashboard/dashboard_save.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@

import expect from '@kbn/expect';

export default function({ getPageObjects }) {
export default function({ getPageObjects, getService }) {
const PageObjects = getPageObjects(['dashboard', 'header']);
const listingTable = getService('listingTable');

describe('dashboard save', function describeIndexTests() {
this.tags('smoke');
Expand All @@ -47,8 +48,10 @@ export default function({ getPageObjects }) {

it('does not save on reject confirmation', async function() {
await PageObjects.dashboard.cancelSave();
await PageObjects.dashboard.gotoDashboardLandingPage();

const countOfDashboards = await PageObjects.dashboard.getDashboardCountWithName(
const countOfDashboards = await listingTable.searchAndGetItemsCount(
'dashboard',
dashboardName
);
expect(countOfDashboards).to.equal(1);
Expand All @@ -68,15 +71,17 @@ export default function({ getPageObjects }) {
// wait till it finishes reloading or it might reload the url after simulating the
// dashboard landing page click.
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.dashboard.gotoDashboardLandingPage();

const countOfDashboards = await PageObjects.dashboard.getDashboardCountWithName(
const countOfDashboards = await listingTable.searchAndGetItemsCount(
'dashboard',
dashboardName
);
expect(countOfDashboards).to.equal(2);
});

it('Does not warn when you save an existing dashboard with the title it already has, and that title is a duplicate', async function() {
await PageObjects.dashboard.selectDashboard(dashboardName);
await listingTable.clickItemLink('dashboard', dashboardName);
await PageObjects.header.awaitGlobalLoadingIndicatorHidden();
await PageObjects.dashboard.switchToEditMode();
await PageObjects.dashboard.saveDashboard(dashboardName);
Expand Down Expand Up @@ -121,8 +126,10 @@ export default function({ getPageObjects }) {
// wait till it finishes reloading or it might reload the url after simulating the
// dashboard landing page click.
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.dashboard.gotoDashboardLandingPage();

const countOfDashboards = await PageObjects.dashboard.getDashboardCountWithName(
const countOfDashboards = await listingTable.searchAndGetItemsCount(
'dashboard',
dashboardNameEnterKey
);
expect(countOfDashboards).to.equal(1);
Expand Down
6 changes: 3 additions & 3 deletions test/functional/apps/dashboard/dashboard_snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import expect from '@kbn/expect';

export default function({ getService, getPageObjects, updateBaselines }) {
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'common']);
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'common', 'timePicker']);
const screenshot = getService('screenshots');
const browser = getService('browser');
const esArchiver = getService('esArchiver');
Expand Down Expand Up @@ -48,7 +48,7 @@ export default function({ getService, getPageObjects, updateBaselines }) {
it('compare TSVB snapshot', async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.setTimepickerInLogstashDataRange();
await PageObjects.timePicker.setLogstashDataRange();
await dashboardAddPanel.addVisualization('Rendering Test: tsvb-ts');
await PageObjects.common.closeToast();

Expand All @@ -71,7 +71,7 @@ export default function({ getService, getPageObjects, updateBaselines }) {
it('compare area chart snapshot', async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.setTimepickerInLogstashDataRange();
await PageObjects.timePicker.setLogstashDataRange();
await dashboardAddPanel.addVisualization('Rendering Test: area with not filter');
await PageObjects.common.closeToast();

Expand Down
Loading

0 comments on commit 91ff133

Please sign in to comment.