Skip to content

Commit

Permalink
Merge branch '7.9' into backport/7.9/pr-70071
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Jul 27, 2020
2 parents 352d952 + b4515cc commit ed2f93b
Show file tree
Hide file tree
Showing 55 changed files with 1,128 additions and 909 deletions.
17 changes: 15 additions & 2 deletions docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,23 @@ This section summarizes the changes in each release.
[[release-notes-7.8.1]]
== {kib} 7.8.1

coming::[7.8.1]

See also <<breaking-changes-7.8,breaking changes in 7.8>>.

[float]
[[security-update-7.8.1]]
=== Security updates
* In {kib} 7.8.1 and earlier, there is a denial of service (DoS) flaw in Timelion. Attackers can construct a URL that when viewed
by a {kib} user, the {kib} process consumes large amounts of CPU and becomes unresponsive,
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7016[CVE-2020-7016].
+
You must upgrade to 7.8.1. If you are unable to upgrade, set `timelion.enabled` to `false` in your kibana.yml file to disable Timelion.

* In all {kib} versions, region map visualizations contain a stored XSS flaw. Attackers that can edit or create region map visualizations can obtain sensitive information
or perform destructive actions on behalf of {kib} users who view the region map visualization,
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7017[CVE-2020-7017].
+
You must upgrade to 7.8.1. If you are unable to upgrade, set `xpack.maps.enabled`, `region_map.enabled`, and `tile_map.enabled` to `false` in kibana.yml to disable map visualizations.

[float]
[[bug-v7.8.1]]
=== Bug fixes
Expand Down
30 changes: 20 additions & 10 deletions src/dev/build/tasks/os_packages/package_scripts/post_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ set -e

export KBN_PATH_CONF=${KBN_PATH_CONF:-<%= configDir %>}

set_chmod() {
chmod -f 660 ${KBN_PATH_CONF}/kibana.yml || true
chmod -f 2750 <%= dataDir %> || true
chmod -f 2750 ${KBN_PATH_CONF} || true
}

set_chown() {
chown -R <%= user %>:<%= group %> <%= dataDir %>
chown -R root:<%= group %> ${KBN_PATH_CONF}
}

set_access() {
set_chmod
set_chown
}

case $1 in
# Debian
configure)
Expand All @@ -14,6 +30,8 @@ case $1 in
adduser --quiet --system --no-create-home --disabled-password \
--ingroup "<%= group %>" --shell /bin/false "<%= user %>"
fi

set_access
;;
abort-deconfigure|abort-upgrade|abort-remove)
;;
Expand All @@ -28,20 +46,12 @@ case $1 in
useradd -r -g "<%= group %>" -M -s /sbin/nologin \
-c "kibana service user" "<%= user %>"
fi

set_access
;;

*)
echo "post install script called with unknown argument \`$1'" >&2
exit 1
;;
esac

chown -R <%= user %>:<%= group %> <%= dataDir %>
chown -R <%= user %>:<%= group %> <%= optimizeDir %>
chmod 2750 <%= dataDir %>
chmod -R 2755 <%= dataDir %>/*

chown :<%= group %> ${KBN_PATH_CONF}
chown :<%= group %> ${KBN_PATH_CONF}/kibana.yml
chmod 2750 ${KBN_PATH_CONF}
chmod 660 ${KBN_PATH_CONF}/kibana.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function ValueAxisOptions({

<LabelOptions
axisLabels={axis.labels}
axisFilterCheckboxName={`yAxisFilterLabelsCheckbox${axis.id}`}
axisFilterCheckboxName={`yAxisFilterLabelsCheckbox-${axis.id}`}
setAxisLabel={setAxisLabel}
/>
</>
Expand Down
5 changes: 3 additions & 2 deletions test/functional/apps/dashboard/dashboard_filter_bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ export default function ({ getService, getPageObjects }) {
const browser = getService('browser');
const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'visualize', 'timePicker']);

// FLAKY: https://github.com/elastic/kibana/issues/71987
describe.skip('dashboard filter bar', () => {
describe('dashboard filter bar', () => {
before(async () => {
await esArchiver.load('dashboard/current/kibana');
await kibanaServer.uiSettings.replace({
Expand Down Expand Up @@ -69,6 +68,7 @@ export default function ({ getService, getPageObjects }) {
it('uses default index pattern on an empty dashboard', async () => {
await testSubjects.click('addFilter');
await dashboardExpect.fieldSuggestions(['bytes']);
await filterBar.ensureFieldEditorModalIsClosed();
});

it('shows index pattern of vis when one is added', async () => {
Expand All @@ -77,6 +77,7 @@ export default function ({ getService, getPageObjects }) {
await filterBar.ensureFieldEditorModalIsClosed();
await testSubjects.click('addFilter');
await dashboardExpect.fieldSuggestions(['animal']);
await filterBar.ensureFieldEditorModalIsClosed();
});

it('works when a vis with no index pattern is added', async () => {
Expand Down
4 changes: 1 addition & 3 deletions test/functional/apps/dashboard/dashboard_snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ export default function ({ getService, getPageObjects, updateBaselines }) {
const dashboardPanelActions = getService('dashboardPanelActions');
const dashboardAddPanel = getService('dashboardAddPanel');

// SKIPPED as it is failing in ES PROMOTION: https://github.com/elastic/kibana/issues/68595
// FLAKY: https://github.com/elastic/kibana/issues/52854
describe.skip('dashboard snapshots', function describeIndexTests() {
describe('dashboard snapshots', function describeIndexTests() {
before(async function () {
await esArchiver.load('dashboard/current/kibana');
await kibanaServer.uiSettings.replace({
Expand Down
62 changes: 15 additions & 47 deletions test/functional/apps/visualize/_area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export default function ({ getService, getPageObjects }) {
});
});

describe.skip('switch between Y axis scale types', () => {
describe('switch between Y axis scale types', () => {
before(initAreaChart);
const axisId = 'ValueAxis-1';

Expand All @@ -308,57 +308,25 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
await PageObjects.visEditor.clickGo();
const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
'5',
'7',
'10',
'20',
'30',
'50',
'70',
'100',
'200',
'300',
'500',
'700',
'1,000',
'2,000',
'3,000',
'5,000',
'7,000',
];
expect(labels).to.eql(expectedLabels);
const labels = await PageObjects.visChart.getYAxisLabelsAsNumbers();
const minLabel = 2;
const maxLabel = 5000;
const numberOfLabels = 10;
expect(labels.length).to.be.greaterThan(numberOfLabels);
expect(labels[0]).to.eql(minLabel);
expect(labels[labels.length - 1]).to.be.greaterThan(maxLabel);
});

it('should show filtered ticks on selecting log scale', async () => {
await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
await PageObjects.visEditor.clickGo();
const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
'5',
'7',
'10',
'20',
'30',
'50',
'70',
'100',
'200',
'300',
'500',
'700',
'1,000',
'2,000',
'3,000',
'5,000',
'7,000',
];
expect(labels).to.eql(expectedLabels);
const labels = await PageObjects.visChart.getYAxisLabelsAsNumbers();
const minLabel = 2;
const maxLabel = 5000;
const numberOfLabels = 10;
expect(labels.length).to.be.greaterThan(numberOfLabels);
expect(labels[0]).to.eql(minLabel);
expect(labels[labels.length - 1]).to.be.greaterThan(maxLabel);
});

it('should show ticks on selecting square root scale', async () => {
Expand Down
62 changes: 15 additions & 47 deletions test/functional/apps/visualize/_line_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.visChart.waitForVisualization();
});

describe.skip('switch between Y axis scale types', () => {
describe('switch between Y axis scale types', () => {
before(initLineChart);
const axisId = 'ValueAxis-1';

Expand All @@ -191,57 +191,25 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
await PageObjects.visEditor.clickGo();
const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
'5',
'7',
'10',
'20',
'30',
'50',
'70',
'100',
'200',
'300',
'500',
'700',
'1,000',
'2,000',
'3,000',
'5,000',
'7,000',
];
expect(labels).to.eql(expectedLabels);
const labels = await PageObjects.visChart.getYAxisLabelsAsNumbers();
const minLabel = 2;
const maxLabel = 5000;
const numberOfLabels = 10;
expect(labels.length).to.be.greaterThan(numberOfLabels);
expect(labels[0]).to.eql(minLabel);
expect(labels[labels.length - 1]).to.be.greaterThan(maxLabel);
});

it('should show filtered ticks on selecting log scale', async () => {
await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
await PageObjects.visEditor.clickGo();
const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
'5',
'7',
'10',
'20',
'30',
'50',
'70',
'100',
'200',
'300',
'500',
'700',
'1,000',
'2,000',
'3,000',
'5,000',
'7,000',
];
expect(labels).to.eql(expectedLabels);
const labels = await PageObjects.visChart.getYAxisLabelsAsNumbers();
const minLabel = 2;
const maxLabel = 5000;
const numberOfLabels = 10;
expect(labels.length).to.be.greaterThan(numberOfLabels);
expect(labels[0]).to.eql(minLabel);
expect(labels[labels.length - 1]).to.be.greaterThan(maxLabel);
});

it('should show ticks on selecting square root scale', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['timePicker', 'visualize', 'visChart', 'vegaChart']);
// eslint-disable-next-line import/no-default-export
export default function ({ getPageObjects, getService }: FtrProviderContext) {
const PageObjects = getPageObjects([
'timePicker',
'visualize',
'visChart',
'visEditor',
'vegaChart',
]);
const filterBar = getService('filterBar');
const inspector = getService('inspector');
const log = getService('log');

describe('vega chart in visualize app', () => {
Expand All @@ -31,25 +38,24 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.visualize.navigateToNewVisualization();
log.debug('clickVega');
await PageObjects.visualize.clickVega();
await PageObjects.visChart.waitForVisualizationRenderingStabilized();
});

describe('vega chart', () => {
describe('initial render', () => {
it('should not have inspector enabled', async function () {
await inspector.expectIsNotEnabled();
});

it.skip('should have some initial vega spec text', async function () {
it('should have some initial vega spec text', async function () {
const vegaSpec = await PageObjects.vegaChart.getSpec();
expect(vegaSpec).to.contain('{').and.to.contain('data');
expect(vegaSpec).to.contain('{');
expect(vegaSpec).to.contain('data');
expect(vegaSpec.length).to.be.above(500);
});

it('should have view and control containers', async function () {
const view = await PageObjects.vegaChart.getViewContainer();
expect(view).to.be.ok();
const size = await view.getSize();
expect(size).to.have.property('width').and.to.have.property('height');
expect(size).to.have.property('width');
expect(size).to.have.property('height');
expect(size.width).to.be.above(0);
expect(size.height).to.be.above(0);

Expand All @@ -68,10 +74,18 @@ export default function ({ getService, getPageObjects }) {
await filterBar.removeAllFilters();
});

it.skip('should render different data in response to filter change', async function () {
await PageObjects.vegaChart.expectVisToMatchScreenshot('vega_chart');
it('should render different data in response to filter change', async function () {
await PageObjects.vegaChart.typeInSpec('"config": { "kibana": {"renderer": "svg"} },');
await PageObjects.visEditor.clickGo();
await PageObjects.visChart.waitForVisualizationRenderingStabilized();
const fullDataLabels = await PageObjects.vegaChart.getYAxisLabels();
expect(fullDataLabels[0]).to.eql('0');
expect(fullDataLabels[fullDataLabels.length - 1]).to.eql('1,600');
await filterBar.addFilter('@tags.raw', 'is', 'error');
await PageObjects.vegaChart.expectVisToMatchScreenshot('vega_chart_filtered');
await PageObjects.visChart.waitForVisualizationRenderingStabilized();
const filteredDataLabels = await PageObjects.vegaChart.getYAxisLabels();
expect(filteredDataLabels[0]).to.eql('0');
expect(filteredDataLabels[filteredDataLabels.length - 1]).to.eql('90');
});
});
});
Expand Down
Loading

0 comments on commit ed2f93b

Please sign in to comment.