Skip to content

Commit

Permalink
Merge branch 'main' into fix_conf_flaky_test_2
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Oct 10, 2023
2 parents 177aa5c + e3d9f3d commit 3fa4ef2
Show file tree
Hide file tree
Showing 30 changed files with 1,532 additions and 538 deletions.
14 changes: 13 additions & 1 deletion docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,19 @@ Review important information about the {kib} 8.x releases.
[[release-notes-8.10.3]]
== {kib} 8.10.3

The 8.10.3 release includes the following bug fixes.
[float]
[[security-update-8.10.3]]
=== Security updates

* **Kibana heap buffer overflow vulnerability**
+
On Sept 11, 2023, Google Chrome announced CVE-2023-4863, described as “Heap buffer overflow in libwebp in Google Chrome prior to 116.0.5845.187 and libwebp 1.3.2 allowed a remote attacker to perform an out of bounds memory write via a crafted HTML page”. Kibana includes a bundled version of headless Chromium that is only used for Kibana’s reporting capabilities and which is affected by this vulnerability. An exploit for Kibana has not been identified, however as a resolution, the bundled version of Chromium is updated in this release.
+
The issue is resolved in 8.10.3.
+
For more information, see our related
https://discuss.elastic.co/t/kibana-8-10-3-7-17-14-security-update/344735[security
announcement].

[float]
[[enhancement-v8.10.3]]
Expand Down
4 changes: 4 additions & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
elasticsearch: `${SEARCH_UI_DOCS}tutorials/elasticsearch`,
},
serverlessClients: {
clientLib: `${SERVERLESS_ELASTICSEARCH_DOCS}clients`,
goApiReference: `${SERVERLESS_ELASTICSEARCH_DOCS}go-client-getting-started`,
goGettingStarted: `${SERVERLESS_ELASTICSEARCH_DOCS}go-client-getting-started`,
httpApis: `${SERVERLESS_ELASTICSEARCH_DOCS}http-apis`,
Expand All @@ -847,6 +848,9 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
gettingStartedIngest: `${SERVERLESS_ELASTICSEARCH_DOCS}get-started#ingest`,
gettingStartedSearch: `${SERVERLESS_ELASTICSEARCH_DOCS}get-started#search`,
},
serverlessSecurity: {
apiKeyPrivileges: `${SERVERLESS_DOCS}api-keys#restrict-privileges`,
},
synthetics: {
featureRoles: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/synthetics-feature-roles.html`,
},
Expand Down
4 changes: 4 additions & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ export interface DocLinks {
readonly elasticsearch: string;
};
readonly serverlessClients: {
readonly clientLib: string;
readonly goApiReference: string;
readonly goGettingStarted: string;
readonly httpApis: string;
Expand All @@ -604,6 +605,9 @@ export interface DocLinks {
readonly integrationsConnectorClient: string;
readonly integrationsLogstash: string;
};
readonly serverlessSecurity: {
readonly apiKeyPrivileges: string;
};
readonly synthetics: {
readonly featureRoles: string;
};
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-unified-data-table/src/components/data_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ export const UnifiedDataTable = ({
fieldFormats: services.fieldFormats,
maxEntries: maxDocFieldsDisplayed,
externalCustomRenderers,
isPlainRecord,
}),
[
dataView,
Expand All @@ -547,6 +548,7 @@ export const UnifiedDataTable = ({
maxDocFieldsDisplayed,
services.fieldFormats,
externalCustomRenderers,
isPlainRecord,
]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ const rowsSource: EsHitRecord[] = [
},
];

const rowsSourceWithEmptyValues: EsHitRecord[] = [
{
_id: '1',
_index: 'test',
_score: 1,
_source: { bytes: 100, extension: null },
highlight: {
extension: ['@kibana-highlighted-field.gz@/kibana-highlighted-field'],
},
},
];

const rowsFields: EsHitRecord[] = [
{
_id: '1',
Expand Down Expand Up @@ -344,6 +356,77 @@ describe('Unified data table cell rendering', function () {
`);
});

it('renders _source column correctly if on text based mode and have nulls', () => {
const DataTableCellValue = getRenderCellValueFn({
dataView: dataViewMock,
rows: rowsSourceWithEmptyValues.map(build),
useNewFieldsApi: false,
shouldShowFieldHandler: (fieldName) => ['extension', 'bytes'].includes(fieldName),
closePopover: jest.fn(),
fieldFormats: mockServices.fieldFormats as unknown as FieldFormatsStart,
maxEntries: 100,
isPlainRecord: true,
});
const component = shallow(
<DataTableCellValue
rowIndex={0}
colIndex={0}
columnId="_source"
isDetails={false}
isExpanded={false}
isExpandable={true}
setCellProps={jest.fn()}
/>
);
expect(component).toMatchInlineSnapshot(`
<EuiDescriptionList
className="unifiedDataTable__descriptionList unifiedDataTable__cellValue"
compressed={true}
type="inline"
>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
bytesDisplayName
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
className="unifiedDataTable__descriptionListDescription"
dangerouslySetInnerHTML={
Object {
"__html": 100,
}
}
/>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
_index
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
className="unifiedDataTable__descriptionListDescription"
dangerouslySetInnerHTML={
Object {
"__html": "test",
}
}
/>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
_score
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
className="unifiedDataTable__descriptionListDescription"
dangerouslySetInnerHTML={
Object {
"__html": 1,
}
}
/>
</EuiDescriptionList>
`);
});

it('renders fields-based column correctly', () => {
const DataTableCellValue = getRenderCellValueFn({
dataView: dataViewMock,
Expand Down
29 changes: 18 additions & 11 deletions packages/kbn-unified-data-table/src/utils/get_render_cell_value.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const getRenderCellValueFn = ({
fieldFormats,
maxEntries,
externalCustomRenderers,
isPlainRecord,
}: {
dataView: DataView;
rows: DataTableRecord[] | undefined;
Expand All @@ -55,6 +56,7 @@ export const getRenderCellValueFn = ({
string,
(props: EuiDataGridCellValueElementProps) => React.ReactNode
>;
isPlainRecord?: boolean;
}) => {
return ({
rowIndex,
Expand Down Expand Up @@ -144,17 +146,22 @@ export const getRenderCellValueFn = ({
compressed
className={classnames('unifiedDataTable__descriptionList', CELL_CLASS)}
>
{pairs.map(([fieldDisplayName, value]) => (
<Fragment key={fieldDisplayName}>
<EuiDescriptionListTitle className="unifiedDataTable__descriptionListTitle">
{fieldDisplayName}
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
className="unifiedDataTable__descriptionListDescription"
dangerouslySetInnerHTML={{ __html: value }}
/>
</Fragment>
))}
{pairs.map(([fieldDisplayName, value, fieldName]) => {
// temporary solution for text based mode. As there are a lot of unsupported fields we want to
// hide the empty one from the Document view
if (isPlainRecord && fieldName && row.flattened[fieldName] === null) return null;
return (
<Fragment key={fieldDisplayName}>
<EuiDescriptionListTitle className="unifiedDataTable__descriptionListTitle">
{fieldDisplayName}
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
className="unifiedDataTable__descriptionListDescription"
dangerouslySetInnerHTML={{ __html: value }}
/>
</Fragment>
);
})}
</EuiDescriptionList>
);
}
Expand Down
35 changes: 33 additions & 2 deletions test/functional/apps/visualize/group3/_annotation_listing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['visualize', 'annotationEditor']);
const listingTable = getService('listingTable');
const kibanaServer = getService('kibanaServer');
const testSubjects = getService('testSubjects');
const find = getService('find');
const retry = getService('retry');
const log = getService('log');
Expand All @@ -32,6 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

await PageObjects.visualize.gotoVisualizationLandingPage();
await PageObjects.visualize.selectAnnotationsTab();
await listingTable.waitUntilTableIsLoaded();
});

after(async function () {
Expand Down Expand Up @@ -156,7 +158,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
});

describe.skip('data view switching', () => {
describe('data view switching', () => {
it('recovers from missing data view', async () => {
await listingTable.clickItemLink('eventAnnotation', 'missing data view');

Expand All @@ -175,7 +177,36 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.annotationEditor.saveGroup();
});

it('recovers from missing field in data view', () => {});
it('recovers from missing field in data view', async () => {
const assertShowingMissingFieldError = async (yes: boolean) => {
const [failureExists, canvasExists] = await Promise.all([
testSubjects.exists('embeddable-lens-failure'),
find.existsByCssSelector('canvas', 1000),
]);
expect(failureExists).to.be(yes);
expect(canvasExists).to.be(!yes);
};

await listingTable.clickItemLink('eventAnnotation', 'Group with additional fields');

await assertShowingMissingFieldError(false);

await retry.try(async () => {
await PageObjects.annotationEditor.editGroupMetadata({
dataView: 'Data view without fields',
});

await assertShowingMissingFieldError(true);
});

await retry.try(async () => {
await PageObjects.annotationEditor.editGroupMetadata({
dataView: 'logs*',
});

await assertShowingMissingFieldError(false);
});
});
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,29 @@
"version": "WzIyNywxXQ=="
}

{
"attributes": {
"fieldAttrs": "{}",
"fieldFormatMap": "{}",
"fields": "[]",
"name": "Data view without fields",
"runtimeFieldMap": "{}",
"sourceFilters": "[]",
"timeFieldName": "timestamp",
"title": "kibana_sample_data_logs",
"typeMeta": "{}"
},
"coreMigrationVersion": "8.8.0",
"created_at": "2023-09-07T17:23:20.906Z",
"id": "data-view-without-fields",
"managed": false,
"references": [],
"type": "index-pattern",
"typeMigrationVersion": "8.0.0",
"updated_at": "2023-09-11T15:50:59.227Z",
"version": "WzIyNywxXQ=="
}

{
"attributes": {
"fieldAttrs": "{}",
Expand All @@ -44,6 +67,44 @@
"version": "WzIyNywxXQ=="
}

{
"attributes": {
"annotations": [
{
"extraFields": [
"@message.raw"
],
"icon": "triangle",
"id": "3d28ce7e-fc5e-409b-aea3-4d9e15010843",
"key": {
"type": "point_in_time"
},
"label": "Event",
"timeField": "@timestamp",
"type": "query"
}
],
"dataViewSpec": null,
"description": "",
"ignoreGlobalFilters": true,
"title": "Group with additional fields"
},
"coreMigrationVersion": "8.8.0",
"created_at": "2023-10-06T17:15:58.790Z",
"id": "12371e00-5174-11ee-a5c4-7dce2e3293a7",
"managed": false,
"references": [
{
"id": "90943e30-9a47-11e8-b64d-95841ca0b247",
"name": "event-annotation-group_dataView-ref-90943e30-9a47-11e8-b64d-95841ca0b247",
"type": "index-pattern"
}
],
"type": "event-annotation-group",
"updated_at": "2023-10-06T17:17:05.384Z",
"version": "WzE4MywxXQ=="
}

{
"attributes": {
"annotations": [
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const EPM_API_ROUTES = {
VERIFICATION_KEY_ID: `${EPM_API_ROOT}/verification_key_id`,
STATS_PATTERN: `${EPM_PACKAGES_MANY}/{pkgName}/stats`,
BULK_ASSETS_PATTERN: `${EPM_API_ROOT}/bulk_assets`,
INPUTS_PATTERN: `${EPM_API_ROOT}/templates/{pkgName}/{pkgVersion}/inputs`,

INFO_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED,
INSTALL_FROM_REGISTRY_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED,
Expand Down
Loading

0 comments on commit 3fa4ef2

Please sign in to comment.