[Entity Analytics] Graph filters - correlate entities with events using euid filters#261420
[Entity Analytics] Graph filters - correlate entities with events using euid filters#261420
Conversation
… entity fields inste (#260619) <!-- Macroscope (Fix It For Me) template starts here --> ### Macroscope: _Fix It For Me_ - This PR originated from [this comment](https://github.com/elastic/kibana/pull/260174/files#r3019970046) in #260174. - Since auto-merge is on, Macroscope will merge this PR after waiting for checks to pass. - If you'd rather not wait, you can always merge this yourself but **no further action from you is currently needed**. - You can also @mention Macroscope in this PR to request further changes. #### Activity Currently: <!-- Macroscope (Fix It For Me) current status starts here -->_Waiting on checks_<!-- Macroscope (Fix It For Me) current status ends here --> <details> <summary>Previously</summary> <!-- Macroscope (Fix It For Me) previous status starts here --> - Pushed ac558bf <!-- Macroscope (Fix It For Me) previous status ends here --> </details> ---- <!-- Macroscope (Fix It For Me) template ends here --> <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> <!-- Macroscope's pull request summary ends here --> Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
…lters when entityIds (#260638) <!-- Macroscope (Fix It For Me) template starts here --> ### Macroscope: _Fix It For Me_ - This PR originated from [this comment](https://github.com/elastic/kibana/pull/260174/files#r3020593548) in #260174. - Since auto-merge is on, Macroscope will merge this PR after waiting for checks to pass. - If you'd rather not wait, you can always merge this yourself but **no further action from you is currently needed**. - You can also @mention Macroscope in this PR to request further changes. #### Activity Currently: <!-- Macroscope (Fix It For Me) current status starts here -->Not merged: unstable<!-- Macroscope (Fix It For Me) current status ends here --> <details> <summary>Previously</summary> <!-- Macroscope (Fix It For Me) previous status starts here --> - Waiting on checks - Pushed 295b4f3 <!-- Macroscope (Fix It For Me) previous status ends here --> </details> ---- <!-- Macroscope (Fix It For Me) template ends here --> <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> <!-- Macroscope's pull request summary ends here --> Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
PhilippeOberti
left a comment
There was a problem hiding this comment.
I feel like some of the code is duplicated and could have been potentially extracted into a reusable hook, but this is minor and can be done in a follow up PR.
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
Async chunks
Public APIs missing exports
History
|
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/24363305732 |
…ng euid filters (elastic#261420) ## Summary Closes elastic#261357. After migrating Graph Visualization from Entity Store v1 to v2 (EUID format), filters in the graph stopped correctly correlating entities with events. The root cause: EUID node IDs (e.g. user:admin@example.com@okta) don't match raw ECS field values in documents (e.g. user.email = admin@example.com), which broke filter and pinning operations. This PR fixes the correlation by: - Making source fields dynamic and entity-type-aware: Instead of hardcoded field arrays, source fields are now derived at runtime from Entity Store definitions via euid.getEuidSourceFields(), grouped by entity type. The server embeds these fields into each graph node's sourceFields so the frontend can build correct raw-value filters. - Fixing the ES|QL sourceFields construction: sourceFields are now computed with CASE expressions keyed by entity type prefix, and the .target. namespace is stripped from keys before sending to the frontend. Also, the PR adapts pinning entities replacing the old approach (extracting pinned IDs from search filters) with a dedicated pinnedEuids state in the FilterStore. When a user toggles an entity filter, the entity's EUID is pinned/unpinned. ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alberto Blázquez <alberto.blazquez@elastic.co> Co-authored-by: Alberto Blázquez <albertoblaz@users.noreply.github.com> (cherry picked from commit 6a78b64)
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/24363305732 |
…ng euid filters (elastic#261420) ## Summary Closes elastic#261357. After migrating Graph Visualization from Entity Store v1 to v2 (EUID format), filters in the graph stopped correctly correlating entities with events. The root cause: EUID node IDs (e.g. user:admin@example.com@okta) don't match raw ECS field values in documents (e.g. user.email = admin@example.com), which broke filter and pinning operations. This PR fixes the correlation by: - Making source fields dynamic and entity-type-aware: Instead of hardcoded field arrays, source fields are now derived at runtime from Entity Store definitions via euid.getEuidSourceFields(), grouped by entity type. The server embeds these fields into each graph node's sourceFields so the frontend can build correct raw-value filters. - Fixing the ES|QL sourceFields construction: sourceFields are now computed with CASE expressions keyed by entity type prefix, and the .target. namespace is stripped from keys before sending to the frontend. Also, the PR adapts pinning entities replacing the old approach (extracting pinned IDs from search filters) with a dedicated pinnedEuids state in the FilterStore. When a user toggles an entity filter, the entity's EUID is pinned/unpinned. ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alberto Blázquez <alberto.blazquez@elastic.co> Co-authored-by: Alberto Blázquez <albertoblaz@users.noreply.github.com> (cherry picked from commit 6a78b64)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ng euid filters (elastic#261420) ## Summary Closes elastic#261357. After migrating Graph Visualization from Entity Store v1 to v2 (EUID format), filters in the graph stopped correctly correlating entities with events. The root cause: EUID node IDs (e.g. user:admin@example.com@okta) don't match raw ECS field values in documents (e.g. user.email = admin@example.com), which broke filter and pinning operations. This PR fixes the correlation by: - Making source fields dynamic and entity-type-aware: Instead of hardcoded field arrays, source fields are now derived at runtime from Entity Store definitions via euid.getEuidSourceFields(), grouped by entity type. The server embeds these fields into each graph node's sourceFields so the frontend can build correct raw-value filters. - Fixing the ES|QL sourceFields construction: sourceFields are now computed with CASE expressions keyed by entity type prefix, and the .target. namespace is stripped from keys before sending to the frontend. Also, the PR adapts pinning entities replacing the old approach (extracting pinned IDs from search filters) with a dedicated pinnedEuids state in the FilterStore. When a user toggles an entity filter, the entity's EUID is pinned/unpinned. ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alberto Blázquez <alberto.blazquez@elastic.co> Co-authored-by: Alberto Blázquez <albertoblaz@users.noreply.github.com>
…ts using euid filters (#261420) (#262950) # Backport This will backport the following commits from `main` to `9.4`: - [[Entity Analytics] Graph filters - correlate entities with events using euid filters (#261420)](#261420) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Kfir Peled","email":"61654899+kfirpeled@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-04-13T19:44:03Z","message":"[Entity Analytics] Graph filters - correlate entities with events using euid filters (#261420)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/261357.\n\nAfter migrating Graph Visualization from Entity Store v1 to v2 (EUID\nformat), filters in the graph stopped correctly correlating entities\nwith events. The root cause: EUID node IDs (e.g.\nuser:admin@example.com@okta) don't match raw ECS field values in\ndocuments (e.g. user.email = admin@example.com), which broke filter and\npinning operations.\n\nThis PR fixes the correlation by:\n\n- Making source fields dynamic and entity-type-aware: Instead of\nhardcoded field arrays, source fields are now derived at runtime from\nEntity Store definitions via euid.getEuidSourceFields(), grouped by\nentity type. The server embeds these fields into each graph node's\nsourceFields so the frontend can build correct raw-value filters.\n- Fixing the ES|QL sourceFields construction: sourceFields are now\ncomputed with CASE expressions keyed by entity type prefix, and the\n.target. namespace is stripped from keys before sending to the frontend.\n\nAlso, the PR adapts pinning entities replacing the old approach\n(extracting pinned IDs from search filters) with a dedicated pinnedEuids\nstate in the FilterStore. When a user toggles an entity filter, the\nentity's EUID is pinned/unpinned.\n\n### Checklist\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Alberto Blázquez <alberto.blazquez@elastic.co>\nCo-authored-by: Alberto Blázquez <albertoblaz@users.noreply.github.com>","sha":"6a78b641a3d00ad66258ad628b859d89a7a906ed","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:SIEM","release_note:skip","backport:version","v9.4.0","v9.5.0"],"title":"[Entity Analytics] Graph filters - correlate entities with events using euid filters","number":261420,"url":"https://github.com/elastic/kibana/pull/261420","mergeCommit":{"message":"[Entity Analytics] Graph filters - correlate entities with events using euid filters (#261420)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/261357.\n\nAfter migrating Graph Visualization from Entity Store v1 to v2 (EUID\nformat), filters in the graph stopped correctly correlating entities\nwith events. The root cause: EUID node IDs (e.g.\nuser:admin@example.com@okta) don't match raw ECS field values in\ndocuments (e.g. user.email = admin@example.com), which broke filter and\npinning operations.\n\nThis PR fixes the correlation by:\n\n- Making source fields dynamic and entity-type-aware: Instead of\nhardcoded field arrays, source fields are now derived at runtime from\nEntity Store definitions via euid.getEuidSourceFields(), grouped by\nentity type. The server embeds these fields into each graph node's\nsourceFields so the frontend can build correct raw-value filters.\n- Fixing the ES|QL sourceFields construction: sourceFields are now\ncomputed with CASE expressions keyed by entity type prefix, and the\n.target. namespace is stripped from keys before sending to the frontend.\n\nAlso, the PR adapts pinning entities replacing the old approach\n(extracting pinned IDs from search filters) with a dedicated pinnedEuids\nstate in the FilterStore. When a user toggles an entity filter, the\nentity's EUID is pinned/unpinned.\n\n### Checklist\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Alberto Blázquez <alberto.blazquez@elastic.co>\nCo-authored-by: Alberto Blázquez <albertoblaz@users.noreply.github.com>","sha":"6a78b641a3d00ad66258ad628b859d89a7a906ed"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/261420","number":261420,"mergeCommit":{"message":"[Entity Analytics] Graph filters - correlate entities with events using euid filters (#261420)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/261357.\n\nAfter migrating Graph Visualization from Entity Store v1 to v2 (EUID\nformat), filters in the graph stopped correctly correlating entities\nwith events. The root cause: EUID node IDs (e.g.\nuser:admin@example.com@okta) don't match raw ECS field values in\ndocuments (e.g. user.email = admin@example.com), which broke filter and\npinning operations.\n\nThis PR fixes the correlation by:\n\n- Making source fields dynamic and entity-type-aware: Instead of\nhardcoded field arrays, source fields are now derived at runtime from\nEntity Store definitions via euid.getEuidSourceFields(), grouped by\nentity type. The server embeds these fields into each graph node's\nsourceFields so the frontend can build correct raw-value filters.\n- Fixing the ES|QL sourceFields construction: sourceFields are now\ncomputed with CASE expressions keyed by entity type prefix, and the\n.target. namespace is stripped from keys before sending to the frontend.\n\nAlso, the PR adapts pinning entities replacing the old approach\n(extracting pinned IDs from search filters) with a dedicated pinnedEuids\nstate in the FilterStore. When a user toggles an entity filter, the\nentity's EUID is pinned/unpinned.\n\n### Checklist\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Alberto Blázquez <alberto.blazquez@elastic.co>\nCo-authored-by: Alberto Blázquez <albertoblaz@users.noreply.github.com>","sha":"6a78b641a3d00ad66258ad628b859d89a7a906ed"}}]}] BACKPORT--> Co-authored-by: Kfir Peled <61654899+kfirpeled@users.noreply.github.com> Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com> Co-authored-by: Alberto Blázquez <alberto.blazquez@elastic.co> Co-authored-by: Alberto Blázquez <albertoblaz@users.noreply.github.com>
Summary
Closes #261357.
After migrating Graph Visualization from Entity Store v1 to v2 (EUID format), filters in the graph stopped correctly correlating entities with events. The root cause: EUID node IDs (e.g. user:admin@example.com@okta) don't match raw ECS field values in documents (e.g. user.email = admin@example.com), which broke filter and pinning operations.
This PR fixes the correlation by:
Also, the PR adapts pinning entities replacing the old approach (extracting pinned IDs from search filters) with a dedicated pinnedEuids state in the FilterStore. When a user toggles an entity filter, the entity's EUID is pinned/unpinned.
Checklist
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.Identify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.