Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# Backport This will backport the following commits from `main` to `8.x`: - [[SecuritySolution] Service Entity Store (#202344)](#202344) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Pablo Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2024-12-09T17:12:51Z","message":"[SecuritySolution] Service Entity Store (#202344)\n\n## Summary\n\n\n### Service Definition:\n\nhttps://github.com//pull/202344/files#diff-42c7dd345e0500c97f85824904a70a11162827ea8f8df6982082a9047ca04ff1\n\n\n### Acceptance Criteria\n- [x] Upon installation of the entity store, the Service entity\ndefinition should be created by default\n- [x] The Service definition will be installed in the exact same way as\nthe User and Host definitions\n- [x] The unique identifier for service entities will be `service.name`\n- [x] The fields captured for service entities should match the field\nmapping spreadsheet (see Implementation Notes below)\n\n\n### Stored Entity\n```json\n{\n \"@timestamp\": \"2024-12-02T10:43:13.856Z\",\n \"event\": {\n \"ingested\": \"2024-12-02T10:51:28.987428Z\"\n },\n \"entity\": {\n \"name\": \"test123 name\",\n \"id\": \"test123 name\",\n \"source\": \"logs-blito\",\n \"type\": \"service\"\n },\n \"service\": {\n \"node\": {\n \"roles\": [\n \"test123 node roles\"\n ],\n \"name\": [\n \"test123 node name\"\n ]\n },\n \"environment\": [\n \"test123 environment\"\n ],\n \"address\": [\n \"test123 address\"\n ],\n \"name\": \"test123 name\",\n \"id\": [\n \"test123 id\"\n ],\n \"state\": [\n \"test123 state\"\n ],\n \"ephemeral_id\": [\n \"test123 ephemeral_id\"\n ],\n \"type\": [\n \"test123 type\"\n ],\n \"version\": [\n \"test123 version\"\n ]\n }\n}\n```\n\n### How to test it?\n\n* Start Kibana\n<details>\n <summary>Create mappings</summary>\n \n```\nPUT /logs-test\n{\n \"mappings\": {\n \"properties\": { \n \"service.name\": {\n \"type\": \"keyword\"\n },\n \"service.address\": {\n \"type\": \"keyword\"\n },\n \"service.environment\": {\n \"type\": \"keyword\"\n },\n \"service.ephemeral_id\": {\n \"type\": \"keyword\"\n },\n \"service.id\": {\n \"type\": \"keyword\"\n },\n \"service.node.name\": {\n \"type\": \"keyword\"\n },\n \"service.node.roles\": {\n \"type\": \"keyword\"\n },\n \"service.state\": {\n \"type\": \"keyword\"\n },\n \"service.type\": {\n \"type\": \"keyword\"\n },\n \"service.version\": {\n \"type\": \"keyword\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n}\n```` \n</details>\n\n\n<details>\n <summary>Create document</summary>\n \n```\nPUT /logs-test\nPOST logs-test/_doc\n{\n \"service\": {\n \"name\": \"test123 name\",\n \"address\": \"test123 address\",\n \"environment\": \"test123 environment\",\n \"ephemeral_id\": \"test123 ephemeral_id\",\n \"id\": \"test123 id\",\n \"node.roles\": \"test123 node roles\",\n \"node.name\": \"test123 node name\", \n \"state\": \"test123 state\",\n \"type\": \"test123 type\",\n \"version\": \"test123 version\"\n },\n \"@timestamp\": \"2024-12-02T10:43:13.856Z\"\n}\n\n```` \n</details>\n\n* Init the entity store\n* Wait...\n* Query the service index `GET\n.entities.v1.latest.security_service_default/_search`\n\n\n### Open Questions\n* Can we merge this PR without first updating all other features that\nwill use service entities?\n* If we merge it, the service engine will be installed together with\nother entities, but it won't provide any functionality\n* Do we need an experimental flag?\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"fdedae07b854280b37f142b652892f1b5ee44018","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["v9.0.0","Team: SecuritySolution","release_note:feature","Theme: entity_analytics","Feature:Entity Analytics","Team:Entity Analytics","backport:version","v8.18.0"],"number":202344,"url":"https://github.com/elastic/kibana/pull/202344","mergeCommit":{"message":"[SecuritySolution] Service Entity Store (#202344)\n\n## Summary\n\n\n### Service Definition:\n\nhttps://github.com//pull/202344/files#diff-42c7dd345e0500c97f85824904a70a11162827ea8f8df6982082a9047ca04ff1\n\n\n### Acceptance Criteria\n- [x] Upon installation of the entity store, the Service entity\ndefinition should be created by default\n- [x] The Service definition will be installed in the exact same way as\nthe User and Host definitions\n- [x] The unique identifier for service entities will be `service.name`\n- [x] The fields captured for service entities should match the field\nmapping spreadsheet (see Implementation Notes below)\n\n\n### Stored Entity\n```json\n{\n \"@timestamp\": \"2024-12-02T10:43:13.856Z\",\n \"event\": {\n \"ingested\": \"2024-12-02T10:51:28.987428Z\"\n },\n \"entity\": {\n \"name\": \"test123 name\",\n \"id\": \"test123 name\",\n \"source\": \"logs-blito\",\n \"type\": \"service\"\n },\n \"service\": {\n \"node\": {\n \"roles\": [\n \"test123 node roles\"\n ],\n \"name\": [\n \"test123 node name\"\n ]\n },\n \"environment\": [\n \"test123 environment\"\n ],\n \"address\": [\n \"test123 address\"\n ],\n \"name\": \"test123 name\",\n \"id\": [\n \"test123 id\"\n ],\n \"state\": [\n \"test123 state\"\n ],\n \"ephemeral_id\": [\n \"test123 ephemeral_id\"\n ],\n \"type\": [\n \"test123 type\"\n ],\n \"version\": [\n \"test123 version\"\n ]\n }\n}\n```\n\n### How to test it?\n\n* Start Kibana\n<details>\n <summary>Create mappings</summary>\n \n```\nPUT /logs-test\n{\n \"mappings\": {\n \"properties\": { \n \"service.name\": {\n \"type\": \"keyword\"\n },\n \"service.address\": {\n \"type\": \"keyword\"\n },\n \"service.environment\": {\n \"type\": \"keyword\"\n },\n \"service.ephemeral_id\": {\n \"type\": \"keyword\"\n },\n \"service.id\": {\n \"type\": \"keyword\"\n },\n \"service.node.name\": {\n \"type\": \"keyword\"\n },\n \"service.node.roles\": {\n \"type\": \"keyword\"\n },\n \"service.state\": {\n \"type\": \"keyword\"\n },\n \"service.type\": {\n \"type\": \"keyword\"\n },\n \"service.version\": {\n \"type\": \"keyword\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n}\n```` \n</details>\n\n\n<details>\n <summary>Create document</summary>\n \n```\nPUT /logs-test\nPOST logs-test/_doc\n{\n \"service\": {\n \"name\": \"test123 name\",\n \"address\": \"test123 address\",\n \"environment\": \"test123 environment\",\n \"ephemeral_id\": \"test123 ephemeral_id\",\n \"id\": \"test123 id\",\n \"node.roles\": \"test123 node roles\",\n \"node.name\": \"test123 node name\", \n \"state\": \"test123 state\",\n \"type\": \"test123 type\",\n \"version\": \"test123 version\"\n },\n \"@timestamp\": \"2024-12-02T10:43:13.856Z\"\n}\n\n```` \n</details>\n\n* Init the entity store\n* Wait...\n* Query the service index `GET\n.entities.v1.latest.security_service_default/_search`\n\n\n### Open Questions\n* Can we merge this PR without first updating all other features that\nwill use service entities?\n* If we merge it, the service engine will be installed together with\nother entities, but it won't provide any functionality\n* Do we need an experimental flag?\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"fdedae07b854280b37f142b652892f1b5ee44018"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202344","number":202344,"mergeCommit":{"message":"[SecuritySolution] Service Entity Store (#202344)\n\n## Summary\n\n\n### Service Definition:\n\nhttps://github.com//pull/202344/files#diff-42c7dd345e0500c97f85824904a70a11162827ea8f8df6982082a9047ca04ff1\n\n\n### Acceptance Criteria\n- [x] Upon installation of the entity store, the Service entity\ndefinition should be created by default\n- [x] The Service definition will be installed in the exact same way as\nthe User and Host definitions\n- [x] The unique identifier for service entities will be `service.name`\n- [x] The fields captured for service entities should match the field\nmapping spreadsheet (see Implementation Notes below)\n\n\n### Stored Entity\n```json\n{\n \"@timestamp\": \"2024-12-02T10:43:13.856Z\",\n \"event\": {\n \"ingested\": \"2024-12-02T10:51:28.987428Z\"\n },\n \"entity\": {\n \"name\": \"test123 name\",\n \"id\": \"test123 name\",\n \"source\": \"logs-blito\",\n \"type\": \"service\"\n },\n \"service\": {\n \"node\": {\n \"roles\": [\n \"test123 node roles\"\n ],\n \"name\": [\n \"test123 node name\"\n ]\n },\n \"environment\": [\n \"test123 environment\"\n ],\n \"address\": [\n \"test123 address\"\n ],\n \"name\": \"test123 name\",\n \"id\": [\n \"test123 id\"\n ],\n \"state\": [\n \"test123 state\"\n ],\n \"ephemeral_id\": [\n \"test123 ephemeral_id\"\n ],\n \"type\": [\n \"test123 type\"\n ],\n \"version\": [\n \"test123 version\"\n ]\n }\n}\n```\n\n### How to test it?\n\n* Start Kibana\n<details>\n <summary>Create mappings</summary>\n \n```\nPUT /logs-test\n{\n \"mappings\": {\n \"properties\": { \n \"service.name\": {\n \"type\": \"keyword\"\n },\n \"service.address\": {\n \"type\": \"keyword\"\n },\n \"service.environment\": {\n \"type\": \"keyword\"\n },\n \"service.ephemeral_id\": {\n \"type\": \"keyword\"\n },\n \"service.id\": {\n \"type\": \"keyword\"\n },\n \"service.node.name\": {\n \"type\": \"keyword\"\n },\n \"service.node.roles\": {\n \"type\": \"keyword\"\n },\n \"service.state\": {\n \"type\": \"keyword\"\n },\n \"service.type\": {\n \"type\": \"keyword\"\n },\n \"service.version\": {\n \"type\": \"keyword\"\n },\n \"@timestamp\": {\n \"type\": \"date\"\n }\n }\n }\n}\n```` \n</details>\n\n\n<details>\n <summary>Create document</summary>\n \n```\nPUT /logs-test\nPOST logs-test/_doc\n{\n \"service\": {\n \"name\": \"test123 name\",\n \"address\": \"test123 address\",\n \"environment\": \"test123 environment\",\n \"ephemeral_id\": \"test123 ephemeral_id\",\n \"id\": \"test123 id\",\n \"node.roles\": \"test123 node roles\",\n \"node.name\": \"test123 node name\", \n \"state\": \"test123 state\",\n \"type\": \"test123 type\",\n \"version\": \"test123 version\"\n },\n \"@timestamp\": \"2024-12-02T10:43:13.856Z\"\n}\n\n```` \n</details>\n\n* Init the entity store\n* Wait...\n* Query the service index `GET\n.entities.v1.latest.security_service_default/_search`\n\n\n### Open Questions\n* Can we merge this PR without first updating all other features that\nwill use service entities?\n* If we merge it, the service engine will be installed together with\nother entities, but it won't provide any functionality\n* Do we need an experimental flag?\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"fdedae07b854280b37f142b652892f1b5ee44018"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
- Loading branch information