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

[7.x] Add Host Risk metadata data to alerts flyout (#113274) #114238

Merged
merged 1 commit into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/plugins/security_solution/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export const ELASTIC_NAME = 'estc';

export const METADATA_TRANSFORM_STATS_URL = `/api/transform/transforms/${METADATA_TRANSFORMS_PATTERN}/_stats`;

export const RISKY_HOSTS_INDEX = 'ml_host_risk_score_latest';
export const HOST_RISK_SCORES_INDEX = 'ml_host_risk_score_latest';

export const TRANSFORM_STATES = {
ABORTING: 'aborting',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export * from './common';
export * from './details';
export * from './first_last_seen';
export * from './kpi';
export * from './risky_hosts';
export * from './risk_score';
export * from './overview';
export * from './uncommon_processes';

Expand All @@ -23,6 +23,6 @@ export enum HostsQueries {
hosts = 'hosts',
hostsEntities = 'hostsEntities',
overview = 'overviewHost',
riskyHosts = 'riskyHosts',
hostsRiskScore = 'hostsRiskScore',
uncommonProcesses = 'uncommonProcesses',
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FactoryQueryTypes } from '../..';
import {
IEsSearchRequest,
IEsSearchResponse,
} from '../../../../../../../../src/plugins/data/common';
import { Inspect, Maybe, TimerangeInput } from '../../../common';

export interface HostsRiskScoreRequestOptions extends IEsSearchRequest {
defaultIndex: string[];
factoryQueryType?: FactoryQueryTypes;
hostName?: string;
timerange?: TimerangeInput;
}

export interface HostsRiskScoreStrategyResponse extends IEsSearchResponse {
inspect?: Maybe<Inspect>;
}

export interface HostsRiskScore {
host: {
name: string;
};
risk_score: number;
risk: string;
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import {
HostsKpiUniqueIpsStrategyResponse,
HostsKpiUniqueIpsRequestOptions,
HostFirstLastSeenRequestOptions,
HostsRiskyHostsStrategyResponse,
HostsRiskyHostsRequestOptions,
HostsRiskScoreStrategyResponse,
HostsRiskScoreRequestOptions,
} from './hosts';
import {
NetworkQueries,
Expand Down Expand Up @@ -126,8 +126,8 @@ export type StrategyResponseType<T extends FactoryQueryTypes> = T extends HostsQ
? HostDetailsStrategyResponse
: T extends UebaQueries.riskScore
? RiskScoreStrategyResponse
: T extends HostsQueries.riskyHosts
? HostsRiskyHostsStrategyResponse
: T extends HostsQueries.hostsRiskScore
? HostsRiskScoreStrategyResponse
: T extends UebaQueries.hostRules
? HostRulesStrategyResponse
: T extends UebaQueries.userRules
Expand Down Expand Up @@ -182,8 +182,8 @@ export type StrategyResponseType<T extends FactoryQueryTypes> = T extends HostsQ

export type StrategyRequestType<T extends FactoryQueryTypes> = T extends HostsQueries.hosts
? HostsRequestOptions
: T extends HostsQueries.riskyHosts
? HostsRiskyHostsRequestOptions
: T extends HostsQueries.hostsRiskScore
? HostsRiskScoreRequestOptions
: T extends HostsQueries.details
? HostDetailsRequestOptions
: T extends HostsQueries.overview
Expand Down
Loading