Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rules migration] Add Integrations column (#11387) #204639

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

e40pud
Copy link
Contributor

@e40pud e40pud commented Dec 17, 2024

Summary

Internal link to the feature details

These changes add a functionality which enables related integrations functionality for migration rules:

  • related integration are shown in the migration rules table
  • user can navigate to the integration page to see instructions about installation process

Other tasks and fixes

  • Default sorting in the table (by Stats => by Author => by Severity => by Updated)

Note

This feature needs siemMigrationsEnabled experimental flag enabled to work.

Screen recording

Screenshot 2024-12-17 at 19 26 47

@e40pud e40pud added release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Dec 17, 2024
@e40pud e40pud requested a review from semd December 17, 2024 18:27
@e40pud e40pud self-assigned this Dec 17, 2024
@e40pud e40pud requested review from a team as code owners December 17, 2024 18:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

username: string,
esClient: ElasticsearchClient,
logger: Logger,
private packageService?: PackageService
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@semd I added a packageService?: PackageService here into RuleMigrationsDataIntegrationsClient. If I understood correctly, @P1llus will also need access to it at some point.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's the best approach to drill a hole through the ruleMigration classes whenever we need a new client/service from the context. But we can keep it this way until we implement a more generic way to get them.

@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod bot requested a review from a team as a code owner December 19, 2024 14:33
@semd semd removed the request for review from a team December 19, 2024 16:24
@@ -396,6 +396,26 @@ paths:
additionalProperties:
$ref: '../../rule_migration.schema.yaml#/components/schemas/PrebuiltRuleVersion'

/internal/siem_migrations/rules/{migration_id}/integrations:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have the {migration_id} in the path? I am confused

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be /internal/siem_migrations/rules/integrations

@@ -43,7 +44,7 @@ export interface PrebuiltRulesResults {
* @param rulesIds The list of IDs to filter requested prebuilt rules. If not specified, all available prebuilt rules will be returned.
* @returns
*/
export const getPrebuiltRules = async (
export const getPrebuiltRulesByIds = async (
Copy link
Contributor

@semd semd Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this rename, ruleIds is an optional parameter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will switch it back 👍

@@ -31,7 +31,7 @@ export class SiemMigrationsService {
}

createRulesClient(params: SiemRuleMigrationsCreateClientParams): SiemRuleMigrationsClient {
return this.rules.createClient(params);
return this.rules.createClient({ ...params });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is leftover from my previous approach, where I. was passing packageService here.. will clean it up

Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 6477 6479 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 21.4MB 21.4MB +2.3KB

History

cc @e40pud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants