-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 HTTP to use Search Strategy (#76243
- Loading branch information
1 parent
6686cff
commit febeb47
Showing
11 changed files
with
532 additions
and
201 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
58 changes: 58 additions & 0 deletions
58
.../plugins/security_solution/common/search_strategy/security_solution/network/http/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,58 @@ | ||
/* | ||
* 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 { | ||
Maybe, | ||
CursorType, | ||
Inspect, | ||
RequestOptionsPaginated, | ||
PageInfoPaginated, | ||
GenericBuckets, | ||
} from '../..'; | ||
|
||
export interface NetworkHttpRequestOptions extends RequestOptionsPaginated { | ||
ip?: string; | ||
defaultIndex: string[]; | ||
} | ||
|
||
export interface NetworkHttpStrategyResponse extends IEsSearchResponse { | ||
edges: NetworkHttpEdges[]; | ||
totalCount: number; | ||
pageInfo: PageInfoPaginated; | ||
inspect?: Maybe<Inspect>; | ||
} | ||
|
||
export interface NetworkHttpEdges { | ||
node: NetworkHttpItem; | ||
cursor: CursorType; | ||
} | ||
|
||
export interface NetworkHttpItem { | ||
_id?: Maybe<string>; | ||
domains: string[]; | ||
lastHost?: Maybe<string>; | ||
lastSourceIp?: Maybe<string>; | ||
methods: string[]; | ||
path?: Maybe<string>; | ||
requestCount?: Maybe<number>; | ||
statuses: string[]; | ||
} | ||
|
||
export interface NetworkHttpBuckets { | ||
key: string; | ||
doc_count: number; | ||
domains: { | ||
buckets: GenericBuckets[]; | ||
}; | ||
methods: { | ||
buckets: GenericBuckets[]; | ||
}; | ||
source: object; | ||
status: { | ||
buckets: GenericBuckets[]; | ||
}; | ||
} |
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 |
---|---|---|
|
@@ -5,7 +5,9 @@ | |
*/ | ||
|
||
export * from './tls'; | ||
export * from './http'; | ||
|
||
export enum NetworkQueries { | ||
http = 'http', | ||
tls = 'tls', | ||
} |
Oops, something went wrong.