[SecuritySolution] Create PrivMon index import flow#224822
Merged
machadoum merged 12 commits intoelastic:mainfrom Jun 24, 2025
Merged
[SecuritySolution] Create PrivMon index import flow#224822machadoum merged 12 commits intoelastic:mainfrom
machadoum merged 12 commits intoelastic:mainfrom
Conversation
fc97791 to
2e66488
Compare
c271a47 to
d7080df
Compare
Contributor
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
machadoum
commented
Jun 23, 2025
| index: [query ? `*${query}*` : '*', ...PRE_EXCLUDE_INDICES], | ||
| types: ['keyword'], | ||
| fields: ['user.name'], // search for indices with field 'user.name' of type 'keyword' | ||
| fields: ['user.name.keyword'], // search for indices with field 'user.name.keyword' of type 'keyword' |
Member
Author
There was a problem hiding this comment.
The engine requires user.name.keyword to work.
...urity/plugins/security_solution/common/api/entity_analytics/monitoring/create_indidex.gen.ts
Show resolved
Hide resolved
..._solution/public/entity_analytics/pages/entity_analytics_privileged_user_monitoring_page.tsx
Outdated
Show resolved
Hide resolved
tiansivive
approved these changes
Jun 23, 2025
Contributor
tiansivive
left a comment
There was a problem hiding this comment.
didnt pay much attention to code but desk tested and look good!
Many thanks Pablo!
🚀
florent-leborgne
approved these changes
Jun 24, 2025
Contributor
florent-leborgne
left a comment
There was a problem hiding this comment.
output docs files LGTM!
leemthompo
approved these changes
Jun 24, 2025
Contributor
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
cc @machadoum |
akowalska622
pushed a commit
to akowalska622/kibana
that referenced
this pull request
Jun 25, 2025
Depends on elastic#221610 This PR adds the import index workflow to privileged user monitoring and API changes required to support it. ### API Enhancements * **New API for privilege monitoring index creation**: Added a new API endpoint (`PUT /api/entity_analytics/monitoring/privileges/indices`) to create indices for privilege monitoring with support for `standard` and `lookup` modes. This includes the implementation of request and response schemas (`create_indidex.gen.ts`, `create_indidex.schema.yaml`). [[1]](diffhunk://#diff-68329bb90dea945f343e1637990d5d05bc159e0aa2511ef1e45d37ed1a6cda51R1-R41) [[2]](diffhunk://#diff-e979499654a27b3c1930d63c5b1002113c1c3f53f84ce27a4d75a5c492717a96R1-R42) * **Updated privilege monitoring health response**: Modified the health response schema to include a `status` field and an optional `error` object for detailed error handling (`privilege_monitoring/health.gen.ts`, `privilege_monitoring/health.schema.yaml`). [[1]](diffhunk://#diff-00f39a3e65a336eaddf7d3203d1370d910f5ecd2062b6cc21d9c06922c12884eR19-R28) [[2]](diffhunk://#diff-83afa72b7a1fc48f3cc063e9fb855190d3525228bc0488fb8b871e112b90e961L22-R33) ### Frontend Integration * **Introduce the create index modal that opens when the create index button is clicked. * **Onboarding modal improvements**: Updated the `AddDataSourcePanel` component to handle index creation more robustly by passing callbacks to the modal (`add_data_source.tsx`). * **Error handling in UI**: Enhanced the `PrivilegedUserMonitoring` component to display error callouts when privilege monitoring data fails to load (`privileged_user_monitoring/index.tsx`). [[1]](diffhunk://#diff-273ad32c97dcf15c6c6054fd7c5516d587132674578d25986b235cd174c75789R22-R26) [[2]](diffhunk://#diff-273ad32c97dcf15c6c6054fd7c5516d587132674578d25986b235cd174c75789R38-R51) ### How to test it? * Go to the priv mon page with an empty cluster * Click on the data source by the index button * Search for available indices, it should return indices with `user.name.keyword` fields * Click 'create index' and create a new index * Choose the created index and click 'Add privileged users' * You should be redirected to the dashboard (The API is currently not working) ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] 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) - [ ] 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) ### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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.
Depends on #221610
This PR adds the import index workflow to privileged user monitoring and API changes required to support it.
API Enhancements
PUT /api/entity_analytics/monitoring/privileges/indices) to create indices for privilege monitoring with support forstandardandlookupmodes. This includes the implementation of request and response schemas (create_indidex.gen.ts,create_indidex.schema.yaml). [1] [2]statusfield and an optionalerrorobject for detailed error handling (privilege_monitoring/health.gen.ts,privilege_monitoring/health.schema.yaml). [1] [2]Frontend Integration
AddDataSourcePanelcomponent to handle index creation more robustly by passing callbacks to the modal (add_data_source.tsx).PrivilegedUserMonitoringcomponent to display error callouts when privilege monitoring data fails to load (privileged_user_monitoring/index.tsx). [1] [2]How to test it?
user.name.keywordfieldsChecklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesIdentify 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.