kibana/x-pack/solutions/security/packages/data-table/mock/mock_source.ts
Gerard Soldevila 6f0dd13c49
[8.18] SKA: Fix kebab-case issues in security-threat-hunting packages (#211349) (#211734)
# Backport

This will backport the following commits from `main` to `8.18`:
- [SKA: Fix kebab-case issues in security-threat-hunting packages
(#211349)](https://github.com/elastic/kibana/pull/211349)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-02-19T10:21:45Z","message":"SKA:
Fix kebab-case issues in security-threat-hunting packages
(#211349)\n\n## Summary\r\n\r\nThis PR aims at relocating some of the
Kibana modules (plugins and\r\npackages) into a new folder structure,
according to the _Sustainable\r\nKibana Architecture_
initiative.\r\n\r\n> [!IMPORTANT]\r\n> * We kindly ask you to:\r\n> *
Manually fix the errors in the error section below (if there
are\r\nany).\r\n> * Search for the `packages[\\/\\\\]` and
`plugins[\\/\\\\]` patterns in the\r\nsource code (Babel and Eslint
config files), and update them\r\nappropriately.\r\n> * Manually
review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\r\nany CI pipeline customizations continue to be correctly
applied after\r\nthe changed path names\r\n> * Review all of the updated
files, specially the `.ts` and `.js` files\r\nlisted in the sections
below, as some of them contain relative paths\r\nthat have been
updated.\r\n> * Think of potential impact of the move, including tooling
and\r\nconfiguration files that can be pointing to the relocated
modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to
source code\r\n\r\n> [!NOTE]\r\n> * This PR has been
auto-generated.\r\n> * Any manual contributions will be lost if the
'relocate' script is\r\nre-run.\r\n> * Try to obtain the missing reviews
/ approvals before applying manual\r\nfixes, and/or keep your changes in
a .patch / git stash.\r\n> * Please
use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack
channel for feedback.\r\n\r\nAre you trying to rebase this PR to solve
merge conflicts? Please follow\r\nthe steps
describe\r\n[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).\r\n\r\n####
3 packages(s) are going to be relocated:\r\n\r\n| Id | Target folder
|\r\n| -- | ------------- |\r\n| `@kbn/securitysolution-data-table`
|\r\n`x-pack/solutions/security/packages/data-table` |\r\n|
`@kbn/ecs-data-quality-dashboard`
|\r\n`x-pack/solutions/security/packages/ecs-data-quality-dashboard`
|\r\n| `@kbn/security-solution-side-nav`
|\r\n`x-pack/solutions/security/packages/side-nav` |\r\n\r\n\r\n<details
>\r\n<summary>Updated
references</summary>\r\n\r\n```\r\n./.i18nrc.json\r\n./package.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/platform/packages/private/kbn-repo-packages/package-map.json\r\n./tsconfig.base.json\r\n./tsconfig.base.type_check.json\r\n./tsconfig.refs.json\r\n./x-pack/solutions/security/packages/data-table/jest.config.js\r\n./x-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js\r\n./x-pack/solutions/security/packages/side-nav/jest.config.js\r\n./yarn.lock\r\n.github/CODEOWNERS\r\n```\r\n\r\n</details><details
>\r\n<summary>Updated relative
paths</summary>\r\n\r\n```\r\nx-pack/solutions/security/packages/data-table/jest.config.js:11\r\nx-pack/solutions/security/packages/data-table/tsconfig.json:2\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js:24\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:10\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:2\r\nx-pack/solutions/security/packages/side-nav/jest.config.js:10\r\nx-pack/solutions/security/packages/side-nav/tsconfig.json:2\r\n```\r\n\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"69a87194d17a8228d1643845c306a01201e921b7","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"SKA:
Fix kebab-case issues in security-threat-hunting
packages","number":211349,"url":"https://github.com/elastic/kibana/pull/211349","mergeCommit":{"message":"SKA:
Fix kebab-case issues in security-threat-hunting packages
(#211349)\n\n## Summary\r\n\r\nThis PR aims at relocating some of the
Kibana modules (plugins and\r\npackages) into a new folder structure,
according to the _Sustainable\r\nKibana Architecture_
initiative.\r\n\r\n> [!IMPORTANT]\r\n> * We kindly ask you to:\r\n> *
Manually fix the errors in the error section below (if there
are\r\nany).\r\n> * Search for the `packages[\\/\\\\]` and
`plugins[\\/\\\\]` patterns in the\r\nsource code (Babel and Eslint
config files), and update them\r\nappropriately.\r\n> * Manually
review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\r\nany CI pipeline customizations continue to be correctly
applied after\r\nthe changed path names\r\n> * Review all of the updated
files, specially the `.ts` and `.js` files\r\nlisted in the sections
below, as some of them contain relative paths\r\nthat have been
updated.\r\n> * Think of potential impact of the move, including tooling
and\r\nconfiguration files that can be pointing to the relocated
modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to
source code\r\n\r\n> [!NOTE]\r\n> * This PR has been
auto-generated.\r\n> * Any manual contributions will be lost if the
'relocate' script is\r\nre-run.\r\n> * Try to obtain the missing reviews
/ approvals before applying manual\r\nfixes, and/or keep your changes in
a .patch / git stash.\r\n> * Please
use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack
channel for feedback.\r\n\r\nAre you trying to rebase this PR to solve
merge conflicts? Please follow\r\nthe steps
describe\r\n[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).\r\n\r\n####
3 packages(s) are going to be relocated:\r\n\r\n| Id | Target folder
|\r\n| -- | ------------- |\r\n| `@kbn/securitysolution-data-table`
|\r\n`x-pack/solutions/security/packages/data-table` |\r\n|
`@kbn/ecs-data-quality-dashboard`
|\r\n`x-pack/solutions/security/packages/ecs-data-quality-dashboard`
|\r\n| `@kbn/security-solution-side-nav`
|\r\n`x-pack/solutions/security/packages/side-nav` |\r\n\r\n\r\n<details
>\r\n<summary>Updated
references</summary>\r\n\r\n```\r\n./.i18nrc.json\r\n./package.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/platform/packages/private/kbn-repo-packages/package-map.json\r\n./tsconfig.base.json\r\n./tsconfig.base.type_check.json\r\n./tsconfig.refs.json\r\n./x-pack/solutions/security/packages/data-table/jest.config.js\r\n./x-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js\r\n./x-pack/solutions/security/packages/side-nav/jest.config.js\r\n./yarn.lock\r\n.github/CODEOWNERS\r\n```\r\n\r\n</details><details
>\r\n<summary>Updated relative
paths</summary>\r\n\r\n```\r\nx-pack/solutions/security/packages/data-table/jest.config.js:11\r\nx-pack/solutions/security/packages/data-table/tsconfig.json:2\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js:24\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:10\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:2\r\nx-pack/solutions/security/packages/side-nav/jest.config.js:10\r\nx-pack/solutions/security/packages/side-nav/tsconfig.json:2\r\n```\r\n\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"69a87194d17a8228d1643845c306a01201e921b7"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/211722","number":211722,"state":"OPEN"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211349","number":211349,"mergeCommit":{"message":"SKA:
Fix kebab-case issues in security-threat-hunting packages
(#211349)\n\n## Summary\r\n\r\nThis PR aims at relocating some of the
Kibana modules (plugins and\r\npackages) into a new folder structure,
according to the _Sustainable\r\nKibana Architecture_
initiative.\r\n\r\n> [!IMPORTANT]\r\n> * We kindly ask you to:\r\n> *
Manually fix the errors in the error section below (if there
are\r\nany).\r\n> * Search for the `packages[\\/\\\\]` and
`plugins[\\/\\\\]` patterns in the\r\nsource code (Babel and Eslint
config files), and update them\r\nappropriately.\r\n> * Manually
review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\r\nany CI pipeline customizations continue to be correctly
applied after\r\nthe changed path names\r\n> * Review all of the updated
files, specially the `.ts` and `.js` files\r\nlisted in the sections
below, as some of them contain relative paths\r\nthat have been
updated.\r\n> * Think of potential impact of the move, including tooling
and\r\nconfiguration files that can be pointing to the relocated
modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to
source code\r\n\r\n> [!NOTE]\r\n> * This PR has been
auto-generated.\r\n> * Any manual contributions will be lost if the
'relocate' script is\r\nre-run.\r\n> * Try to obtain the missing reviews
/ approvals before applying manual\r\nfixes, and/or keep your changes in
a .patch / git stash.\r\n> * Please
use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack
channel for feedback.\r\n\r\nAre you trying to rebase this PR to solve
merge conflicts? Please follow\r\nthe steps
describe\r\n[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).\r\n\r\n####
3 packages(s) are going to be relocated:\r\n\r\n| Id | Target folder
|\r\n| -- | ------------- |\r\n| `@kbn/securitysolution-data-table`
|\r\n`x-pack/solutions/security/packages/data-table` |\r\n|
`@kbn/ecs-data-quality-dashboard`
|\r\n`x-pack/solutions/security/packages/ecs-data-quality-dashboard`
|\r\n| `@kbn/security-solution-side-nav`
|\r\n`x-pack/solutions/security/packages/side-nav` |\r\n\r\n\r\n<details
>\r\n<summary>Updated
references</summary>\r\n\r\n```\r\n./.i18nrc.json\r\n./package.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/platform/packages/private/kbn-repo-packages/package-map.json\r\n./tsconfig.base.json\r\n./tsconfig.base.type_check.json\r\n./tsconfig.refs.json\r\n./x-pack/solutions/security/packages/data-table/jest.config.js\r\n./x-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js\r\n./x-pack/solutions/security/packages/side-nav/jest.config.js\r\n./yarn.lock\r\n.github/CODEOWNERS\r\n```\r\n\r\n</details><details
>\r\n<summary>Updated relative
paths</summary>\r\n\r\n```\r\nx-pack/solutions/security/packages/data-table/jest.config.js:11\r\nx-pack/solutions/security/packages/data-table/tsconfig.json:2\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js:24\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:10\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:2\r\nx-pack/solutions/security/packages/side-nav/jest.config.js:10\r\nx-pack/solutions/security/packages/side-nav/tsconfig.json:2\r\n```\r\n\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"69a87194d17a8228d1643845c306a01201e921b7"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-02-19 13:45:07 +01:00

317 lines
7 KiB
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { BrowserFields } from '@kbn/timelines-plugin/common';
export const mockBrowserFields: BrowserFields = {
agent: {
fields: {
'agent.ephemeral_id': {
aggregatable: true,
name: 'agent.ephemeral_id',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'agent.hostname': {
aggregatable: true,
name: 'agent.hostname',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'agent.id': {
aggregatable: true,
name: 'agent.id',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'agent.name': {
aggregatable: true,
name: 'agent.name',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
},
},
auditd: {
fields: {
'auditd.data.a0': {
aggregatable: true,
name: 'auditd.data.a0',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'auditd.data.a1': {
aggregatable: true,
name: 'auditd.data.a1',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'auditd.data.a2': {
aggregatable: true,
name: 'auditd.data.a2',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
},
},
base: {
fields: {
'@timestamp': {
aggregatable: true,
name: '@timestamp',
searchable: true,
type: 'date',
esTypes: ['date'],
readFromDocValues: true,
},
_id: {
name: '_id',
type: 'string',
esTypes: [],
searchable: true,
aggregatable: false,
},
message: {
name: 'message',
type: 'string',
esTypes: ['text'],
searchable: true,
aggregatable: false,
},
},
},
client: {
fields: {
'client.address': {
aggregatable: true,
name: 'client.address',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'client.bytes': {
aggregatable: true,
name: 'client.bytes',
searchable: true,
type: 'number',
esTypes: ['long'],
},
'client.domain': {
aggregatable: true,
name: 'client.domain',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'client.geo.country_iso_code': {
aggregatable: true,
name: 'client.geo.country_iso_code',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
},
},
cloud: {
fields: {
'cloud.account.id': {
aggregatable: true,
name: 'cloud.account.id',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'cloud.availability_zone': {
aggregatable: true,
name: 'cloud.availability_zone',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
},
},
container: {
fields: {
'container.id': {
aggregatable: true,
name: 'container.id',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'container.image.name': {
aggregatable: true,
name: 'container.image.name',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'container.image.tag': {
aggregatable: true,
name: 'container.image.tag',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
},
},
destination: {
fields: {
'destination.address': {
aggregatable: true,
name: 'destination.address',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'destination.bytes': {
aggregatable: true,
name: 'destination.bytes',
searchable: true,
type: 'number',
esTypes: ['long'],
},
'destination.domain': {
aggregatable: true,
name: 'destination.domain',
searchable: true,
type: 'string',
esTypes: ['keyword'],
},
'destination.ip': {
aggregatable: true,
name: 'destination.ip',
searchable: true,
type: 'ip',
esTypes: ['ip'],
},
'destination.port': {
aggregatable: true,
name: 'destination.port',
searchable: true,
type: 'number',
esTypes: ['long'],
},
},
},
event: {
fields: {
'event.end': {
name: 'event.end',
searchable: true,
type: 'date',
esTypes: ['date'],
aggregatable: true,
},
'event.action': {
name: 'event.action',
type: 'string',
esTypes: ['keyword'],
searchable: true,
aggregatable: true,
},
'event.category': {
name: 'event.category',
type: 'string',
esTypes: ['keyword'],
searchable: true,
aggregatable: true,
},
'event.severity': {
name: 'event.severity',
type: 'number',
esTypes: ['long'],
searchable: true,
aggregatable: true,
},
},
},
host: {
fields: {
'host.name': {
name: 'host.name',
type: 'string',
esTypes: ['keyword'],
searchable: true,
aggregatable: true,
},
},
},
source: {
fields: {
'source.ip': {
aggregatable: true,
name: 'source.ip',
searchable: true,
type: 'ip',
esTypes: ['ip'],
},
'source.port': {
aggregatable: true,
name: 'source.port',
searchable: true,
type: 'number',
esTypes: ['long'],
},
},
},
user: {
fields: {
'user.name': {
name: 'user.name',
type: 'string',
esTypes: ['keyword'],
searchable: true,
aggregatable: true,
},
},
},
nestedField: {
fields: {
'nestedField.firstAttributes': {
aggregatable: false,
name: 'nestedField.firstAttributes',
searchable: true,
type: 'string',
subType: {
nested: {
path: 'nestedField',
},
},
},
'nestedField.secondAttributes': {
aggregatable: false,
name: 'nestedField.secondAttributes',
searchable: true,
type: 'string',
subType: {
nested: {
path: 'nestedField',
},
},
},
'nestedField.thirdAttributes': {
aggregatable: false,
name: 'nestedField.thirdAttributes',
searchable: true,
type: 'date',
subType: {
nested: {
path: 'nestedField',
},
},
},
},
},
};