-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Refactor Network KPI to use search strategy (#77410…
…) (#77518)
- Loading branch information
1 parent
e85765b
commit 6a8ac63
Showing
52 changed files
with
2,332 additions
and
474 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
16 changes: 16 additions & 0 deletions
16
...ugins/security_solution/common/search_strategy/security_solution/network/kpi/dns/index.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common'; | ||
import { Inspect, Maybe } from '../../../../common'; | ||
import { RequestBasicOptions } from '../../..'; | ||
|
||
export type NetworkKpiDnsRequestOptions = RequestBasicOptions; | ||
|
||
export interface NetworkKpiDnsStrategyResponse extends IEsSearchResponse { | ||
dnsQueries: number; | ||
inspect?: Maybe<Inspect>; | ||
} |
32 changes: 32 additions & 0 deletions
32
...k/plugins/security_solution/common/search_strategy/security_solution/network/kpi/index.ts
This file contains 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
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; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export * from './dns'; | ||
export * from './network_events'; | ||
export * from './tls_handshakes'; | ||
export * from './unique_flows'; | ||
export * from './unique_private_ips'; | ||
|
||
import { NetworkKpiDnsStrategyResponse } from './dns'; | ||
import { NetworkKpiNetworkEventsStrategyResponse } from './network_events'; | ||
import { NetworkKpiTlsHandshakesStrategyResponse } from './tls_handshakes'; | ||
import { NetworkKpiUniqueFlowsStrategyResponse } from './unique_flows'; | ||
import { NetworkKpiUniquePrivateIpsStrategyResponse } from './unique_private_ips'; | ||
|
||
export enum NetworkKpiQueries { | ||
dns = 'networkKpiDns', | ||
networkEvents = 'networkKpiNetworkEvents', | ||
tlsHandshakes = 'networkKpiTlsHandshakes', | ||
uniqueFlows = 'networkKpiUniqueFlows', | ||
uniquePrivateIps = 'networkKpiUniquePrivateIps', | ||
} | ||
|
||
export type NetworkKpiStrategyResponse = | ||
| Omit<NetworkKpiDnsStrategyResponse, 'rawResponse'> | ||
| Omit<NetworkKpiNetworkEventsStrategyResponse, 'rawResponse'> | ||
| Omit<NetworkKpiTlsHandshakesStrategyResponse, 'rawResponse'> | ||
| Omit<NetworkKpiUniqueFlowsStrategyResponse, 'rawResponse'> | ||
| Omit<NetworkKpiUniquePrivateIpsStrategyResponse, 'rawResponse'>; |
16 changes: 16 additions & 0 deletions
16
...ity_solution/common/search_strategy/security_solution/network/kpi/network_events/index.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common'; | ||
import { Inspect, Maybe } from '../../../../common'; | ||
import { RequestBasicOptions } from '../../..'; | ||
|
||
export type NetworkKpiNetworkEventsRequestOptions = RequestBasicOptions; | ||
|
||
export interface NetworkKpiNetworkEventsStrategyResponse extends IEsSearchResponse { | ||
networkEvents: number; | ||
inspect?: Maybe<Inspect>; | ||
} |
16 changes: 16 additions & 0 deletions
16
...ity_solution/common/search_strategy/security_solution/network/kpi/tls_handshakes/index.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common'; | ||
import { Inspect, Maybe } from '../../../../common'; | ||
import { RequestBasicOptions } from '../../..'; | ||
|
||
export type NetworkKpiTlsHandshakesRequestOptions = RequestBasicOptions; | ||
|
||
export interface NetworkKpiTlsHandshakesStrategyResponse extends IEsSearchResponse { | ||
tlsHandshakes: number; | ||
inspect?: Maybe<Inspect>; | ||
} |
16 changes: 16 additions & 0 deletions
16
...urity_solution/common/search_strategy/security_solution/network/kpi/unique_flows/index.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common'; | ||
import { Inspect, Maybe } from '../../../../common'; | ||
import { RequestBasicOptions } from '../../..'; | ||
|
||
export type NetworkKpiUniqueFlowsRequestOptions = RequestBasicOptions; | ||
|
||
export interface NetworkKpiUniqueFlowsStrategyResponse extends IEsSearchResponse { | ||
uniqueFlowId: number; | ||
inspect?: Maybe<Inspect>; | ||
} |
26 changes: 26 additions & 0 deletions
26
...solution/common/search_strategy/security_solution/network/kpi/unique_private_ips/index.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common'; | ||
import { Inspect, Maybe } from '../../../../common'; | ||
import { RequestBasicOptions } from '../../..'; | ||
|
||
export interface NetworkKpiHistogramData { | ||
x?: Maybe<number>; | ||
y?: Maybe<number>; | ||
} | ||
|
||
export type NetworkKpiUniquePrivateIpsRequestOptions = RequestBasicOptions; | ||
|
||
export interface NetworkKpiUniquePrivateIpsStrategyResponse extends IEsSearchResponse { | ||
uniqueSourcePrivateIps: number; | ||
uniqueSourcePrivateIpsHistogram: NetworkKpiHistogramData[] | null; | ||
uniqueDestinationPrivateIps: number; | ||
uniqueDestinationPrivateIpsHistogram: NetworkKpiHistogramData[] | null; | ||
inspect?: Maybe<Inspect>; | ||
} | ||
|
||
export type UniquePrivateAttributeQuery = 'source' | 'destination'; |
This file contains 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
This file contains 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
Oops, something went wrong.