[SecuritySolution] Security Entity Store Fix Data view refresh does not support the indexPattern parameter#215151
Merged
machadoum merged 1 commit intoelastic:mainfrom Mar 20, 2025
Merged
Conversation
Contributor
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
Contributor
|
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
Contributor
💚 Build Succeeded
Metrics [docs]
cc @machadoum |
Contributor
|
Thanks for this! I desk tested it and it works! 🚀 I can confirm, when I create entity store, with index pattern param: Then run refresh data views I can see the index pattern in example output |
CAWilson94
approved these changes
Mar 20, 2025
Contributor
|
Starting backport for target branches: 8.18, 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13972092216 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 20, 2025
…ttern parameter (elastic#215151) ## Summary When the data view refresh API or task was executed, it was overwriting the engine's additional `indexPattern`. This PR updates the code to support `indexPattern` and ensures the user has privileges for all indices. I extracted the merge function to add deduplicate logic. ### How to reproduce it? * Create an entity store using the indexPatterns param * Call refresh dataview API (`POST kbn:api/entity_store/engines/apply_dataview_indices`) * It will apply the dataview and ignore the indexPatterns param After the fix, we should be able to update the indexPatterns param, and the task that refreshes the index pattern should pick up the change properly. ### Checklist - [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 (cherry picked from commit 42183d6)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 20, 2025
…ttern parameter (elastic#215151) ## Summary When the data view refresh API or task was executed, it was overwriting the engine's additional `indexPattern`. This PR updates the code to support `indexPattern` and ensures the user has privileges for all indices. I extracted the merge function to add deduplicate logic. ### How to reproduce it? * Create an entity store using the indexPatterns param * Call refresh dataview API (`POST kbn:api/entity_store/engines/apply_dataview_indices`) * It will apply the dataview and ignore the indexPatterns param After the fix, we should be able to update the indexPatterns param, and the task that refreshes the index pattern should pick up the change properly. ### Checklist - [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 (cherry picked from commit 42183d6)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 20, 2025
…ttern parameter (elastic#215151) ## Summary When the data view refresh API or task was executed, it was overwriting the engine's additional `indexPattern`. This PR updates the code to support `indexPattern` and ensures the user has privileges for all indices. I extracted the merge function to add deduplicate logic. ### How to reproduce it? * Create an entity store using the indexPatterns param * Call refresh dataview API (`POST kbn:api/entity_store/engines/apply_dataview_indices`) * It will apply the dataview and ignore the indexPatterns param After the fix, we should be able to update the indexPatterns param, and the task that refreshes the index pattern should pick up the change properly. ### Checklist - [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 (cherry picked from commit 42183d6)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
This was referenced Mar 20, 2025
kibanamachine
added a commit
that referenced
this pull request
Mar 20, 2025
…ndexPattern parameter (#215151) (#215348) # Backport This will backport the following commits from `main` to `9.0`: - [[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)](#215151) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Pablo Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2025-03-20T14:41:54Z","message":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)\n\n## Summary\n\nWhen the data view refresh API or task was executed, it was overwriting\nthe engine's additional `indexPattern`.\n\nThis PR updates the code to support `indexPattern` and ensures the user\nhas privileges for all indices.\n\nI extracted the merge function to add deduplicate logic.\n\n### How to reproduce it?\n* Create an entity store using the indexPatterns param\n* Call refresh dataview API (`POST\nkbn:api/entity_store/engines/apply_dataview_indices`)\n* It will apply the dataview and ignore the indexPatterns param\n\nAfter the fix, we should be able to update the indexPatterns param, and\nthe task that refreshes the index pattern should pick up the change\nproperly.\n\n\n### Checklist\n\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","sha":"42183d6039c1bb71b42642747f88493fbe591c2e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","Team: SecuritySolution","Theme: entity_analytics","Feature:Entity Analytics","Team:Entity Analytics","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter","number":215151,"url":"https://github.com/elastic/kibana/pull/215151","mergeCommit":{"message":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)\n\n## Summary\n\nWhen the data view refresh API or task was executed, it was overwriting\nthe engine's additional `indexPattern`.\n\nThis PR updates the code to support `indexPattern` and ensures the user\nhas privileges for all indices.\n\nI extracted the merge function to add deduplicate logic.\n\n### How to reproduce it?\n* Create an entity store using the indexPatterns param\n* Call refresh dataview API (`POST\nkbn:api/entity_store/engines/apply_dataview_indices`)\n* It will apply the dataview and ignore the indexPatterns param\n\nAfter the fix, we should be able to update the indexPatterns param, and\nthe task that refreshes the index pattern should pick up the change\nproperly.\n\n\n### Checklist\n\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","sha":"42183d6039c1bb71b42642747f88493fbe591c2e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"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/215151","number":215151,"mergeCommit":{"message":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)\n\n## Summary\n\nWhen the data view refresh API or task was executed, it was overwriting\nthe engine's additional `indexPattern`.\n\nThis PR updates the code to support `indexPattern` and ensures the user\nhas privileges for all indices.\n\nI extracted the merge function to add deduplicate logic.\n\n### How to reproduce it?\n* Create an entity store using the indexPatterns param\n* Call refresh dataview API (`POST\nkbn:api/entity_store/engines/apply_dataview_indices`)\n* It will apply the dataview and ignore the indexPatterns param\n\nAfter the fix, we should be able to update the indexPatterns param, and\nthe task that refreshes the index pattern should pick up the change\nproperly.\n\n\n### Checklist\n\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","sha":"42183d6039c1bb71b42642747f88493fbe591c2e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Mar 20, 2025
…indexPattern parameter (#215151) (#215346) # Backport This will backport the following commits from `main` to `8.18`: - [[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)](#215151) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Pablo Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2025-03-20T14:41:54Z","message":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)\n\n## Summary\n\nWhen the data view refresh API or task was executed, it was overwriting\nthe engine's additional `indexPattern`.\n\nThis PR updates the code to support `indexPattern` and ensures the user\nhas privileges for all indices.\n\nI extracted the merge function to add deduplicate logic.\n\n### How to reproduce it?\n* Create an entity store using the indexPatterns param\n* Call refresh dataview API (`POST\nkbn:api/entity_store/engines/apply_dataview_indices`)\n* It will apply the dataview and ignore the indexPatterns param\n\nAfter the fix, we should be able to update the indexPatterns param, and\nthe task that refreshes the index pattern should pick up the change\nproperly.\n\n\n### Checklist\n\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","sha":"42183d6039c1bb71b42642747f88493fbe591c2e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","Team: SecuritySolution","Theme: entity_analytics","Feature:Entity Analytics","Team:Entity Analytics","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter","number":215151,"url":"https://github.com/elastic/kibana/pull/215151","mergeCommit":{"message":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)\n\n## Summary\n\nWhen the data view refresh API or task was executed, it was overwriting\nthe engine's additional `indexPattern`.\n\nThis PR updates the code to support `indexPattern` and ensures the user\nhas privileges for all indices.\n\nI extracted the merge function to add deduplicate logic.\n\n### How to reproduce it?\n* Create an entity store using the indexPatterns param\n* Call refresh dataview API (`POST\nkbn:api/entity_store/engines/apply_dataview_indices`)\n* It will apply the dataview and ignore the indexPatterns param\n\nAfter the fix, we should be able to update the indexPatterns param, and\nthe task that refreshes the index pattern should pick up the change\nproperly.\n\n\n### Checklist\n\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","sha":"42183d6039c1bb71b42642747f88493fbe591c2e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"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/215151","number":215151,"mergeCommit":{"message":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)\n\n## Summary\n\nWhen the data view refresh API or task was executed, it was overwriting\nthe engine's additional `indexPattern`.\n\nThis PR updates the code to support `indexPattern` and ensures the user\nhas privileges for all indices.\n\nI extracted the merge function to add deduplicate logic.\n\n### How to reproduce it?\n* Create an entity store using the indexPatterns param\n* Call refresh dataview API (`POST\nkbn:api/entity_store/engines/apply_dataview_indices`)\n* It will apply the dataview and ignore the indexPatterns param\n\nAfter the fix, we should be able to update the indexPatterns param, and\nthe task that refreshes the index pattern should pick up the change\nproperly.\n\n\n### Checklist\n\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","sha":"42183d6039c1bb71b42642747f88493fbe591c2e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Mar 20, 2025
…ndexPattern parameter (#215151) (#215347) # Backport This will backport the following commits from `main` to `8.x`: - [[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)](#215151) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Pablo Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2025-03-20T14:41:54Z","message":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)\n\n## Summary\n\nWhen the data view refresh API or task was executed, it was overwriting\nthe engine's additional `indexPattern`.\n\nThis PR updates the code to support `indexPattern` and ensures the user\nhas privileges for all indices.\n\nI extracted the merge function to add deduplicate logic.\n\n### How to reproduce it?\n* Create an entity store using the indexPatterns param\n* Call refresh dataview API (`POST\nkbn:api/entity_store/engines/apply_dataview_indices`)\n* It will apply the dataview and ignore the indexPatterns param\n\nAfter the fix, we should be able to update the indexPatterns param, and\nthe task that refreshes the index pattern should pick up the change\nproperly.\n\n\n### Checklist\n\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","sha":"42183d6039c1bb71b42642747f88493fbe591c2e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","Team: SecuritySolution","Theme: entity_analytics","Feature:Entity Analytics","Team:Entity Analytics","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter","number":215151,"url":"https://github.com/elastic/kibana/pull/215151","mergeCommit":{"message":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)\n\n## Summary\n\nWhen the data view refresh API or task was executed, it was overwriting\nthe engine's additional `indexPattern`.\n\nThis PR updates the code to support `indexPattern` and ensures the user\nhas privileges for all indices.\n\nI extracted the merge function to add deduplicate logic.\n\n### How to reproduce it?\n* Create an entity store using the indexPatterns param\n* Call refresh dataview API (`POST\nkbn:api/entity_store/engines/apply_dataview_indices`)\n* It will apply the dataview and ignore the indexPatterns param\n\nAfter the fix, we should be able to update the indexPatterns param, and\nthe task that refreshes the index pattern should pick up the change\nproperly.\n\n\n### Checklist\n\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","sha":"42183d6039c1bb71b42642747f88493fbe591c2e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"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/215151","number":215151,"mergeCommit":{"message":"[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)\n\n## Summary\n\nWhen the data view refresh API or task was executed, it was overwriting\nthe engine's additional `indexPattern`.\n\nThis PR updates the code to support `indexPattern` and ensures the user\nhas privileges for all indices.\n\nI extracted the merge function to add deduplicate logic.\n\n### How to reproduce it?\n* Create an entity store using the indexPatterns param\n* Call refresh dataview API (`POST\nkbn:api/entity_store/engines/apply_dataview_indices`)\n* It will apply the dataview and ignore the indexPatterns param\n\nAfter the fix, we should be able to update the indexPatterns param, and\nthe task that refreshes the index pattern should pick up the change\nproperly.\n\n\n### Checklist\n\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","sha":"42183d6039c1bb71b42642747f88493fbe591c2e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
clintandrewhall
pushed a commit
to clintandrewhall/kibana
that referenced
this pull request
Mar 20, 2025
…ttern parameter (elastic#215151) ## Summary When the data view refresh API or task was executed, it was overwriting the engine's additional `indexPattern`. This PR updates the code to support `indexPattern` and ensures the user has privileges for all indices. I extracted the merge function to add deduplicate logic. ### How to reproduce it? * Create an entity store using the indexPatterns param * Call refresh dataview API (`POST kbn:api/entity_store/engines/apply_dataview_indices`) * It will apply the dataview and ignore the indexPatterns param After the fix, we should be able to update the indexPatterns param, and the task that refreshes the index pattern should pick up the change properly. ### Checklist - [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
JoseLuisGJ
pushed a commit
to JoseLuisGJ/kibana
that referenced
this pull request
Mar 24, 2025
…ttern parameter (elastic#215151) ## Summary When the data view refresh API or task was executed, it was overwriting the engine's additional `indexPattern`. This PR updates the code to support `indexPattern` and ensures the user has privileges for all indices. I extracted the merge function to add deduplicate logic. ### How to reproduce it? * Create an entity store using the indexPatterns param * Call refresh dataview API (`POST kbn:api/entity_store/engines/apply_dataview_indices`) * It will apply the dataview and ignore the indexPatterns param After the fix, we should be able to update the indexPatterns param, and the task that refreshes the index pattern should pick up the change properly. ### Checklist - [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
cqliu1
pushed a commit
to cqliu1/kibana
that referenced
this pull request
Mar 31, 2025
…ttern parameter (elastic#215151) ## Summary When the data view refresh API or task was executed, it was overwriting the engine's additional `indexPattern`. This PR updates the code to support `indexPattern` and ensures the user has privileges for all indices. I extracted the merge function to add deduplicate logic. ### How to reproduce it? * Create an entity store using the indexPatterns param * Call refresh dataview API (`POST kbn:api/entity_store/engines/apply_dataview_indices`) * It will apply the dataview and ignore the indexPatterns param After the fix, we should be able to update the indexPatterns param, and the task that refreshes the index pattern should pick up the change properly. ### Checklist - [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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the data view refresh API or task was executed, it was overwriting the engine's additional
indexPattern.This PR updates the code to support
indexPatternand ensures the user has privileges for all indices.I extracted the merge function to add deduplicate logic.
How to reproduce it?
POST kbn:api/entity_store/engines/apply_dataview_indices)After the fix, we should be able to update the indexPatterns param, and the task that refreshes the index pattern should pick up the change properly.
Checklist