Skip to content

Commit

Permalink
[SecuritySolution] Onboard hosts and users risk score module (#140377)
Browse files Browse the repository at this point in the history
* add create indices route

* onBoardingHostRiskScore flow

* restart transforms api

* add more apis

* add apis

* add upgrade,delete,enable button

* revert change

* update apis and add unit tests

* add unit tests

* update users pivot scripts

* update buttons

* move files

* integrate with UI

* add endpoints for indices

* rm create indices route from index management

* rm unused constants

* clean up

* add unit tests for api

* use enum RiskScoreEntity

* clean up

* fix unit test

* review

* create stored scripts

* create and delete dashboard

* fix unit tests

* add unit tests

* share api options

* rm enable via dev tools button

* styling

* add unit tests

* add doc link in toast

* fix unit tests

* move bulkCreatePrebuiltSavedObjects

* fix types

* revert change

* rename base path

* fix unit tests

* add tracking

* fix unit tests

* fix unit tests

* add unit tests

* add unit tests

* space awared ingest pipeline

* create space awared objects

* update unit tests

* rename files

* update unit tests

* rename files

* delete space awared saved objects

* update snapshot

* update snapshot

* unit tests

* space awared scripts

* fix unit test

* integrate upgrade button

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* add installation panel to hosts and users page

* remove restart button

* add badges and use es doc

* add no data detected prompt

* update no data prompt

* fix unit tests

* technical preview badge in alerts flyout

* fix cypress tests

* add cypress tests

* rename testing data

* rename params

* update risk score module tests

* update unit tests for enable and upgrade buttons

* Update x-pack/plugins/security_solution/public/common/components/risk_score/risk_score_onboarding/translations.ts

Co-authored-by: Steph Milovic <[email protected]>

* Update x-pack/plugins/security_solution/public/common/components/risk_score/risk_score_onboarding/translations.ts

Co-authored-by: Steph Milovic <[email protected]>

* update utils tests

* fix types

* do not show loading state for upgrade and install panel

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Steph Milovic <[email protected]>
  • Loading branch information
3 people authored Sep 20, 2022
1 parent a388dca commit 698c965
Show file tree
Hide file tree
Showing 135 changed files with 8,465 additions and 2,169 deletions.
25 changes: 19 additions & 6 deletions x-pack/plugins/security_solution/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,21 @@ export const DETECTION_ENGINE_RULES_BULK_CREATE =
export const DETECTION_ENGINE_RULES_BULK_UPDATE =
`${DETECTION_ENGINE_RULES_URL}/_bulk_update` as const;

export const INTERNAL_RISK_SCORE_URL = '/internal/risk_score' as const;
export const DEV_TOOL_PREBUILT_CONTENT =
`/internal/prebuilt_content/dev_tool/{console_id}` as const;
`${INTERNAL_RISK_SCORE_URL}/prebuilt_content/dev_tool/{console_id}` as const;
export const devToolPrebuiltContentUrl = (spaceId: string, consoleId: string) =>
`/s/${spaceId}/internal/prebuilt_content/dev_tool/${consoleId}` as const;
export const PREBUILT_SAVED_OBJECTS_BULK_CREATE =
'/internal/prebuilt_content/saved_objects/_bulk_create/{template_name}';
`/s/${spaceId}${INTERNAL_RISK_SCORE_URL}/prebuilt_content/dev_tool/${consoleId}` as const;
export const PREBUILT_SAVED_OBJECTS_BULK_CREATE = `${INTERNAL_RISK_SCORE_URL}/prebuilt_content/saved_objects/_bulk_create/{template_name}`;
export const prebuiltSavedObjectsBulkCreateUrl = (templateName: string) =>
`/internal/prebuilt_content/saved_objects/_bulk_create/${templateName}` as const;
`${INTERNAL_RISK_SCORE_URL}/prebuilt_content/saved_objects/_bulk_create/${templateName}` as const;
export const PREBUILT_SAVED_OBJECTS_BULK_DELETE = `${INTERNAL_RISK_SCORE_URL}/prebuilt_content/saved_objects/_bulk_delete/{template_name}`;
export const prebuiltSavedObjectsBulkDeleteUrl = (templateName: string) =>
`${INTERNAL_RISK_SCORE_URL}/prebuilt_content/saved_objects/_bulk_delete/${templateName}` as const;
export const RISK_SCORE_CREATE_INDEX = `${INTERNAL_RISK_SCORE_URL}/indices/create`;
export const RISK_SCORE_DELETE_INDICES = `${INTERNAL_RISK_SCORE_URL}/indices/delete`;
export const RISK_SCORE_CREATE_STORED_SCRIPT = `${INTERNAL_RISK_SCORE_URL}/stored_scripts/create`;
export const RISK_SCORE_DELETE_STORED_SCRIPT = `${INTERNAL_RISK_SCORE_URL}/stored_scripts/delete`;

/**
* Internal detection engine routes
Expand Down Expand Up @@ -460,5 +467,11 @@ export enum BulkActionsDryRunErrCode {
MACHINE_LEARNING_INDEX_PATTERN = 'MACHINE_LEARNING_INDEX_PATTERN',
}

export const RISKY_HOSTS_DOC_LINK =
export const RISKY_HOSTS_EXTERNAL_DOC_LINK =
'https://www.github.com/elastic/detection-rules/blob/main/docs/experimental-machine-learning/host-risk-score.md';
export const RISKY_USERS_EXTERNAL_DOC_LINK =
'https://www.github.com/elastic/detection-rules/blob/main/docs/experimental-machine-learning/user-risk-score.md';
export const RISKY_HOSTS_DOC_LINK =
'https://www.elastic.co/guide/en/security/current/host-risk-score.html';
export const RISKY_USERS_DOC_LINK =
'https://www.elastic.co/guide/en/security/current/user-risk-score.html';
Loading

0 comments on commit 698c965

Please sign in to comment.