[Security Solution][SIEM Migrations] Add name field to rule migrations ui and data model#223860
Conversation
|
Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations) |
...public/siem_migrations/rules/components/data_input_flyout/steps/macros/macros_data_input.tsx
Outdated
Show resolved
Hide resolved
...s/components/data_input_flyout/steps/rules/sub_steps/migration_name/migration_name_input.tsx
Outdated
Show resolved
Hide resolved
...s/components/data_input_flyout/steps/rules/sub_steps/migration_name/migration_name_input.tsx
Outdated
Show resolved
Hide resolved
...migrations/rules/components/data_input_flyout/steps/rules/sub_steps/migration_name/index.tsx
Outdated
Show resolved
Hide resolved
..._solution/public/siem_migrations/rules/components/migration_status_panels/migration_name.tsx
Outdated
Show resolved
Hide resolved
...public/siem_migrations/rules/components/migration_status_panels/migration_progress_panel.tsx
Outdated
Show resolved
Hide resolved
...on/public/siem_migrations/rules/components/migration_status_panels/migration_ready_panel.tsx
Outdated
Show resolved
Hide resolved
x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/types.ts
Outdated
Show resolved
Hide resolved
...rity_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_migration_client.ts
Outdated
Show resolved
Hide resolved
...rity_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_migration_client.ts
Outdated
Show resolved
Hide resolved
...security_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_rules_client.ts
Outdated
Show resolved
Hide resolved
...security_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_rules_client.ts
Outdated
Show resolved
Hide resolved
.../solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/api/update.ts
Show resolved
Hide resolved
| params, | ||
| }: { | ||
| id: string; | ||
| params: Partial<StoredSiemMigration>; |
There was a problem hiding this comment.
| params: Partial<StoredSiemMigration>; | |
| params: UpdateRuleMigrationRequestBody |
.../solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/api/create.ts
Show resolved
Hide resolved
...migrations/rules/components/data_input_flyout/steps/rules/sub_steps/migration_name/index.tsx
Outdated
Show resolved
Hide resolved
| ); | ||
| } | ||
|
|
||
| const migrationsMaybeMissingName = existingMigrationsFromMigrationsIndex |
There was a problem hiding this comment.
I think name migrations should be separate from migrateRuleMigrationIndex and it should run after that.
This is because migrateRuleMigrationIndex creates migration index and its missing documents. Once that is done then migrationRuleMigrationName( or something like that) operation should run for all docs that do not have name.
There was a problem hiding this comment.
If we do it this way, name will not be populated where this migration has already run, because they will not be filtered based on the logic of line 139.
There was a problem hiding this comment.
This is outside of the if statement on 142, so it should still run I think.
…rations-name' into siem-migrations-name
..._solution/public/siem_migrations/rules/components/migration_status_panels/migration_name.tsx
Outdated
Show resolved
Hide resolved
...ck/solutions/security/plugins/security_solution/public/common/hooks/use_visibility/index.tsx
Outdated
Show resolved
Hide resolved
…rations-name' into siem-migrations-name
logeekal
left a comment
There was a problem hiding this comment.
Thank you both @semd and @kqualters-elastic
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/15785754798 |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
|
…s ui and data model (elastic#223860) ## Summary This pr adds the ability to set and edit the name field for automatic rule migrations, done in either the initial data upload workflow, or at any step thereafter in the migration list cards. Also adds logic to migrate existing migration metadata docs if they do not have a name, intended to match what the user saw previously, the string 'SIEM Migration \#{$indexNumber}' users saw before this change. Kibana logs when migrating a migration lacking a name:  Edit an existing migration name:   New sub step in rules upload form:  Migrated name:  (shown in dev tools because the migration does not have any rules associated, and so the card list does not include it) ### 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) - [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 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. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co> (cherry picked from commit 9af4a74)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…grations ui and data model (#223860) (#224754) # Backport This will backport the following commits from `main` to `8.19`: - [[Security Solution][SIEM Migrations] Add name field to rule migrations ui and data model (#223860)](#223860) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Kevin Qualters","email":"56408403+kqualters-elastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-20T18:51:24Z","message":"[Security Solution][SIEM Migrations] Add name field to rule migrations ui and data model (#223860)\n\n## Summary\nThis pr adds the ability to set and edit the name field for automatic\nrule migrations, done in either the initial data upload workflow, or at\nany step thereafter in the migration list cards. Also adds logic to\nmigrate existing migration metadata docs if they do not have a name,\nintended to match what the user saw previously, the string 'SIEM\nMigration \\#{$indexNumber}' users saw before this change.\n\nKibana logs when migrating a migration lacking a name:\n\n\nEdit an existing migration name:\n\n\n\n\nNew sub step in rules upload form:\n\n\nMigrated name:\n\n\n(shown in dev tools because the migration does not have any rules\nassociated, and so the card list does not include it)\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] 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- [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- [ ] 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\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>","sha":"9af4a749d0fa8bbb8fd9136e02627c8beb03f076","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:feature","Team:Threat Hunting:Investigations","backport:version","v9.1.0","v8.19.0"],"title":"[Security Solution][SIEM Migrations] Add name field to rule migrations ui and data model","number":223860,"url":"https://github.com/elastic/kibana/pull/223860","mergeCommit":{"message":"[Security Solution][SIEM Migrations] Add name field to rule migrations ui and data model (#223860)\n\n## Summary\nThis pr adds the ability to set and edit the name field for automatic\nrule migrations, done in either the initial data upload workflow, or at\nany step thereafter in the migration list cards. Also adds logic to\nmigrate existing migration metadata docs if they do not have a name,\nintended to match what the user saw previously, the string 'SIEM\nMigration \\#{$indexNumber}' users saw before this change.\n\nKibana logs when migrating a migration lacking a name:\n\n\nEdit an existing migration name:\n\n\n\n\nNew sub step in rules upload form:\n\n\nMigrated name:\n\n\n(shown in dev tools because the migration does not have any rules\nassociated, and so the card list does not include it)\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] 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- [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- [ ] 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\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>","sha":"9af4a749d0fa8bbb8fd9136e02627c8beb03f076"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223860","number":223860,"mergeCommit":{"message":"[Security Solution][SIEM Migrations] Add name field to rule migrations ui and data model (#223860)\n\n## Summary\nThis pr adds the ability to set and edit the name field for automatic\nrule migrations, done in either the initial data upload workflow, or at\nany step thereafter in the migration list cards. Also adds logic to\nmigrate existing migration metadata docs if they do not have a name,\nintended to match what the user saw previously, the string 'SIEM\nMigration \\#{$indexNumber}' users saw before this change.\n\nKibana logs when migrating a migration lacking a name:\n\n\nEdit an existing migration name:\n\n\n\n\nNew sub step in rules upload form:\n\n\nMigrated name:\n\n\n(shown in dev tools because the migration does not have any rules\nassociated, and so the card list does not include it)\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] 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- [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- [ ] 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\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>","sha":"9af4a749d0fa8bbb8fd9136e02627c8beb03f076"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Kevin Qualters <56408403+kqualters-elastic@users.noreply.github.com> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
…s ui and data model (elastic#223860) ## Summary This pr adds the ability to set and edit the name field for automatic rule migrations, done in either the initial data upload workflow, or at any step thereafter in the migration list cards. Also adds logic to migrate existing migration metadata docs if they do not have a name, intended to match what the user saw previously, the string 'SIEM Migration \#{$indexNumber}' users saw before this change. Kibana logs when migrating a migration lacking a name:  Edit an existing migration name:   New sub step in rules upload form:  Migrated name:  (shown in dev tools because the migration does not have any rules associated, and so the card list does not include it) ### 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) - [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 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. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
Summary
This pr adds the ability to set and edit the name field for automatic rule migrations, done in either the initial data upload workflow, or at any step thereafter in the migration list cards. Also adds logic to migrate existing migration metadata docs if they do not have a name, intended to match what the user saw previously, the string 'SIEM Migration #{$indexNumber}' users saw before this change.
Kibana logs when migrating a migration lacking a name:





Edit an existing migration name:
New sub step in rules upload form:
Migrated name:
(shown in dev tools because the migration does not have any rules associated, and so the card list does not include it)
Checklist
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.