Skip to content

[8.18] [SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)#215346

Merged
kibanamachine merged 1 commit intoelastic:8.18from
kibanamachine:backport/8.18/pr-215151
Mar 20, 2025
Merged

[8.18] [SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)#215346
kibanamachine merged 1 commit intoelastic:8.18from
kibanamachine:backport/8.18/pr-215151

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.18:

Questions ?

Please refer to the Backport tool documentation

…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 kibanamachine added the backport This PR is a backport of another PR label Mar 20, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) March 20, 2025 14:47
@kibanamachine kibanamachine merged commit d10d408 into elastic:8.18 Mar 20, 2025
11 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

cc @machadoum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants