Skip to content

Commit 18aae8e

Browse files
[Security Solution] [Detections] remove references to serializer / deserializer parameter (#250111)
## Summary Removes unused serializer and deserializer parameter from lists plugin. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
1 parent e314aaf commit 18aae8e

File tree

70 files changed

+167
-973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+167
-973
lines changed

oas_docs/output/kibana.serverless.yaml

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -53434,26 +53434,20 @@ paths:
5343453434
keyword_custom_format:
5343553435
value:
5343653436
description: This parses the first found ipv4 only
53437-
deserializer: '{{value}}'
5343853437
id: keyword_custom_format_list
5343953438
name: Simple list with a keyword using a custom format
53440-
serializer: (?<value>((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))
5344153439
type: keyword
5344253440
schema:
5344353441
type: object
5344453442
properties:
5344553443
description:
5344653444
$ref: '#/components/schemas/Security_Lists_API_ListDescription'
53447-
deserializer:
53448-
$ref: '#/components/schemas/Security_Lists_API_ListDeserializer'
5344953445
id:
5345053446
$ref: '#/components/schemas/Security_Lists_API_ListId'
5345153447
meta:
5345253448
$ref: '#/components/schemas/Security_Lists_API_ListMetadata'
5345353449
name:
5345453450
$ref: '#/components/schemas/Security_Lists_API_ListName'
53455-
serializer:
53456-
$ref: '#/components/schemas/Security_Lists_API_ListSerializer'
5345753451
type:
5345853452
$ref: '#/components/schemas/Security_Lists_API_ListType'
5345953453
version:
@@ -53523,11 +53517,9 @@ paths:
5352353517
created_at: '2025-01-09T18:25:39.604Z'
5352453518
created_by: elastic
5352553519
description: This parses the first found ipv4 only
53526-
deserializer: '{{value}}'
5352753520
id: keyword_custom_format_list
5352853521
immutable: false
5352953522
name: Simple list with a keyword using a custom format
53530-
serializer: (?<value>((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))
5353153523
tie_breaker_id: 8247ae63-b780-47b8-9a89-948b643e9ec2
5353253524
type: keyword
5353353525
updated_at: '2025-01-09T18:25:39.604Z'
@@ -55094,29 +55086,6 @@ paths:
5509455086
required: false
5509555087
schema:
5509655088
$ref: '#/components/schemas/Security_Lists_API_ListType'
55097-
- description: |
55098-
Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups:
55099-
55100-
- `(?<value>.+)` - Single value item types, such as ip, long, date, keyword, and text.
55101-
- `(?<gte>.+)-(?<lte>.+)|(?<value>.+)` - Range value item types, such as `date_range`, `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.
55102-
in: query
55103-
name: serializer
55104-
required: false
55105-
schema:
55106-
example: (?<value>((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))
55107-
type: string
55108-
- description: |
55109-
Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions:
55110-
55111-
- `{{{value}}}` - Single value item types, such as `ip`, `long`, `date`, `keyword`, and `text`.
55112-
- `{{{gte}}}-{{{lte}}}` - Range value item types, such as `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.
55113-
- `{{{gte}}},{{{lte}}}` - Date range values.
55114-
in: query
55115-
name: deserializer
55116-
required: false
55117-
schema:
55118-
example: '{{value}}'
55119-
type: string
5512055089
- description: Determines when changes made by the request are made visible to search.
5512155090
in: query
5512255091
name: refresh
@@ -110618,8 +110587,6 @@ components:
110618110587
type: string
110619110588
description:
110620110589
$ref: '#/components/schemas/Security_Lists_API_ListDescription'
110621-
deserializer:
110622-
$ref: '#/components/schemas/Security_Lists_API_ListDeserializer'
110623110590
id:
110624110591
$ref: '#/components/schemas/Security_Lists_API_ListId'
110625110592
immutable:
@@ -110628,8 +110595,6 @@ components:
110628110595
$ref: '#/components/schemas/Security_Lists_API_ListMetadata'
110629110596
name:
110630110597
$ref: '#/components/schemas/Security_Lists_API_ListName'
110631-
serializer:
110632-
$ref: '#/components/schemas/Security_Lists_API_ListSerializer'
110633110598
tie_breaker_id:
110634110599
description: Field used in search to ensure all containers are sorted and returned correctly.
110635110600
example: f5508188-b1e9-4e6e-9662-d039a7d89899
@@ -110664,15 +110629,6 @@ components:
110664110629
format: nonempty
110665110630
minLength: 1
110666110631
type: string
110667-
Security_Lists_API_ListDeserializer:
110668-
description: |
110669-
Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions:
110670-
110671-
- `{{{value}}}` - Single value item types, such as `ip`, `long`, `date`, `keyword`, and `text`.
110672-
- `{{{gte}}}-{{{lte}}}` - Range value item types, such as `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.
110673-
- `{{{gte}}},{{{lte}}}` - Date range values.
110674-
example: '{{value}}'
110675-
type: string
110676110632
Security_Lists_API_ListId:
110677110633
description: Value list's identifier.
110678110634
example: 21b01cfb-058d-44b9-838c-282be16c91cd
@@ -110697,16 +110653,12 @@ components:
110697110653
description: Autogenerated value - user that created object.
110698110654
example: elastic
110699110655
type: string
110700-
deserializer:
110701-
$ref: '#/components/schemas/Security_Lists_API_ListDeserializer'
110702110656
id:
110703110657
$ref: '#/components/schemas/Security_Lists_API_ListItemId'
110704110658
list_id:
110705110659
$ref: '#/components/schemas/Security_Lists_API_ListId'
110706110660
meta:
110707110661
$ref: '#/components/schemas/Security_Lists_API_ListItemMetadata'
110708-
serializer:
110709-
$ref: '#/components/schemas/Security_Lists_API_ListSerializer'
110710110662
tie_breaker_id:
110711110663
description: Field used in search to ensure all containers are sorted and returned correctly.
110712110664
example: f5508188-b1e9-4e6e-9662-d039a7d89899
@@ -110813,14 +110765,6 @@ components:
110813110765
- cluster
110814110766
- index
110815110767
- application
110816-
Security_Lists_API_ListSerializer:
110817-
description: |
110818-
Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups:
110819-
110820-
- `(?<value>.+)` - Single value item types, such as ip, long, date, keyword, and text.
110821-
- `(?<gte>.+)-(?<lte>.+)|(?<value>.+)` - Range value item types, such as `date_range`, `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.
110822-
example: (?<value>((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))
110823-
type: string
110824110768
Security_Lists_API_ListType:
110825110769
description: |
110826110770
Specifies the Elasticsearch data type of excludes the list container holds. Some common examples:

oas_docs/output/kibana.yaml

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -56387,26 +56387,20 @@ paths:
5638756387
keyword_custom_format:
5638856388
value:
5638956389
description: This parses the first found ipv4 only
56390-
deserializer: '{{value}}'
5639156390
id: keyword_custom_format_list
5639256391
name: Simple list with a keyword using a custom format
56393-
serializer: (?<value>((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))
5639456392
type: keyword
5639556393
schema:
5639656394
type: object
5639756395
properties:
5639856396
description:
5639956397
$ref: '#/components/schemas/Security_Lists_API_ListDescription'
56400-
deserializer:
56401-
$ref: '#/components/schemas/Security_Lists_API_ListDeserializer'
5640256398
id:
5640356399
$ref: '#/components/schemas/Security_Lists_API_ListId'
5640456400
meta:
5640556401
$ref: '#/components/schemas/Security_Lists_API_ListMetadata'
5640656402
name:
5640756403
$ref: '#/components/schemas/Security_Lists_API_ListName'
56408-
serializer:
56409-
$ref: '#/components/schemas/Security_Lists_API_ListSerializer'
5641056404
type:
5641156405
$ref: '#/components/schemas/Security_Lists_API_ListType'
5641256406
version:
@@ -56476,11 +56470,9 @@ paths:
5647656470
created_at: '2025-01-09T18:25:39.604Z'
5647756471
created_by: elastic
5647856472
description: This parses the first found ipv4 only
56479-
deserializer: '{{value}}'
5648056473
id: keyword_custom_format_list
5648156474
immutable: false
5648256475
name: Simple list with a keyword using a custom format
56483-
serializer: (?<value>((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))
5648456476
tie_breaker_id: 8247ae63-b780-47b8-9a89-948b643e9ec2
5648556477
type: keyword
5648656478
updated_at: '2025-01-09T18:25:39.604Z'
@@ -58047,29 +58039,6 @@ paths:
5804758039
required: false
5804858040
schema:
5804958041
$ref: '#/components/schemas/Security_Lists_API_ListType'
58050-
- description: |
58051-
Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups:
58052-
58053-
- `(?<value>.+)` - Single value item types, such as ip, long, date, keyword, and text.
58054-
- `(?<gte>.+)-(?<lte>.+)|(?<value>.+)` - Range value item types, such as `date_range`, `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.
58055-
in: query
58056-
name: serializer
58057-
required: false
58058-
schema:
58059-
example: (?<value>((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))
58060-
type: string
58061-
- description: |
58062-
Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions:
58063-
58064-
- `{{{value}}}` - Single value item types, such as `ip`, `long`, `date`, `keyword`, and `text`.
58065-
- `{{{gte}}}-{{{lte}}}` - Range value item types, such as `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.
58066-
- `{{{gte}}},{{{lte}}}` - Date range values.
58067-
in: query
58068-
name: deserializer
58069-
required: false
58070-
schema:
58071-
example: '{{value}}'
58072-
type: string
5807358042
- description: Determines when changes made by the request are made visible to search.
5807458043
in: query
5807558044
name: refresh
@@ -121385,8 +121354,6 @@ components:
121385121354
type: string
121386121355
description:
121387121356
$ref: '#/components/schemas/Security_Lists_API_ListDescription'
121388-
deserializer:
121389-
$ref: '#/components/schemas/Security_Lists_API_ListDeserializer'
121390121357
id:
121391121358
$ref: '#/components/schemas/Security_Lists_API_ListId'
121392121359
immutable:
@@ -121395,8 +121362,6 @@ components:
121395121362
$ref: '#/components/schemas/Security_Lists_API_ListMetadata'
121396121363
name:
121397121364
$ref: '#/components/schemas/Security_Lists_API_ListName'
121398-
serializer:
121399-
$ref: '#/components/schemas/Security_Lists_API_ListSerializer'
121400121365
tie_breaker_id:
121401121366
description: Field used in search to ensure all containers are sorted and returned correctly.
121402121367
example: f5508188-b1e9-4e6e-9662-d039a7d89899
@@ -121431,15 +121396,6 @@ components:
121431121396
format: nonempty
121432121397
minLength: 1
121433121398
type: string
121434-
Security_Lists_API_ListDeserializer:
121435-
description: |
121436-
Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions:
121437-
121438-
- `{{{value}}}` - Single value item types, such as `ip`, `long`, `date`, `keyword`, and `text`.
121439-
- `{{{gte}}}-{{{lte}}}` - Range value item types, such as `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.
121440-
- `{{{gte}}},{{{lte}}}` - Date range values.
121441-
example: '{{value}}'
121442-
type: string
121443121399
Security_Lists_API_ListId:
121444121400
description: Value list's identifier.
121445121401
example: 21b01cfb-058d-44b9-838c-282be16c91cd
@@ -121464,16 +121420,12 @@ components:
121464121420
description: Autogenerated value - user that created object.
121465121421
example: elastic
121466121422
type: string
121467-
deserializer:
121468-
$ref: '#/components/schemas/Security_Lists_API_ListDeserializer'
121469121423
id:
121470121424
$ref: '#/components/schemas/Security_Lists_API_ListItemId'
121471121425
list_id:
121472121426
$ref: '#/components/schemas/Security_Lists_API_ListId'
121473121427
meta:
121474121428
$ref: '#/components/schemas/Security_Lists_API_ListItemMetadata'
121475-
serializer:
121476-
$ref: '#/components/schemas/Security_Lists_API_ListSerializer'
121477121429
tie_breaker_id:
121478121430
description: Field used in search to ensure all containers are sorted and returned correctly.
121479121431
example: f5508188-b1e9-4e6e-9662-d039a7d89899
@@ -121580,14 +121532,6 @@ components:
121580121532
- cluster
121581121533
- index
121582121534
- application
121583-
Security_Lists_API_ListSerializer:
121584-
description: |
121585-
Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups:
121586-
121587-
- `(?<value>.+)` - Single value item types, such as ip, long, date, keyword, and text.
121588-
- `(?<gte>.+)-(?<lte>.+)|(?<value>.+)` - Range value item types, such as `date_range`, `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`.
121589-
example: (?<value>((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))
121590-
type: string
121591121535
Security_Lists_API_ListType:
121592121536
description: |
121593121537
Specifies the Elasticsearch data type of excludes the list container holds. Some common examples:

x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/list_schema/index.mock.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,10 @@ export const getListResponseMock = (): ListSchema => ({
4646
created_at: DATE_NOW,
4747
created_by: USER,
4848
description: DESCRIPTION,
49-
deserializer: undefined,
5049
id: LIST_ID,
5150
immutable: IMMUTABLE,
5251
meta: META,
5352
name: NAME,
54-
serializer: undefined,
5553
tie_breaker_id: TIE_BREAKER,
5654
type: TYPE,
5755
updated_at: DATE_NOW,

x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.mock.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ export const getListItemResponseMock = (): ListItemSchema => ({
2323
'@timestamp': DATE_NOW,
2424
created_at: DATE_NOW,
2525
created_by: USER,
26-
deserializer: undefined,
2726
id: LIST_ITEM_ID,
2827
list_id: LIST_ID,
2928
meta: META,
30-
serializer: undefined,
3129
tie_breaker_id: TIE_BREAKER,
3230
type: TYPE,
3331
updated_at: DATE_NOW,

x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.test.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,6 @@ describe('list_item_schema', () => {
6161
expect(message.schema).toEqual(payload);
6262
});
6363

64-
test('it should accept an undefined for "serializer"', () => {
65-
const payload = getListItemResponseMock();
66-
delete payload.serializer;
67-
const decoded = listItemSchema.decode(payload);
68-
const checked = exactCheck(payload, decoded);
69-
const message = pipe(checked, foldLeftRight);
70-
71-
expect(getPaths(left(message.errors))).toEqual([]);
72-
expect(message.schema).toEqual(payload);
73-
});
74-
75-
test('it should accept an undefined for "deserializer"', () => {
76-
const payload = getListItemResponseMock();
77-
delete payload.deserializer;
78-
const decoded = listItemSchema.decode(payload);
79-
const checked = exactCheck(payload, decoded);
80-
const message = pipe(checked, foldLeftRight);
81-
82-
expect(getPaths(left(message.errors))).toEqual([]);
83-
expect(message.schema).toEqual(payload);
84-
});
85-
8664
test('it should NOT accept an undefined for "created_at"', () => {
8765
const payload = getListItemResponseMock();
8866
// @ts-expect-error

x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
import * as t from 'io-ts';
99

1010
import { _versionOrUndefined } from '../../common/underscore_version';
11-
import { deserializerOrUndefined } from '../../common/deserializer';
1211
import { metaOrUndefined } from '../../common/meta';
1312
import { timestampOrUndefined } from '../../common/timestamp';
14-
import { serializerOrUndefined } from '../../common/serializer';
1513
import { created_at } from '../../common/created_at';
1614
import { created_by } from '../../common/created_by';
1715
import { id } from '../../common/id';
@@ -28,11 +26,9 @@ export const listItemSchema = t.exact(
2826
'@timestamp': timestampOrUndefined,
2927
created_at,
3028
created_by,
31-
deserializer: deserializerOrUndefined,
3229
id,
3330
list_id,
3431
meta: metaOrUndefined,
35-
serializer: serializerOrUndefined,
3632
tie_breaker_id,
3733
type,
3834
updated_at,

x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.mock.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ export const getListResponseMock = (): ListSchema => ({
2626
created_at: DATE_NOW,
2727
created_by: USER,
2828
description: DESCRIPTION,
29-
deserializer: undefined,
3029
id: LIST_ID,
3130
immutable: IMMUTABLE,
3231
meta: META,
3332
name: NAME,
34-
serializer: undefined,
3533
tie_breaker_id: TIE_BREAKER,
3634
type: TYPE,
3735
updated_at: DATE_NOW,

x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.test.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,6 @@ describe('list_schema', () => {
4747
expect(message.schema).toEqual(payload);
4848
});
4949

50-
test('it should accept an undefined for "serializer"', () => {
51-
const payload = getListResponseMock();
52-
delete payload.serializer;
53-
const decoded = listSchema.decode(payload);
54-
const checked = exactCheck(payload, decoded);
55-
const message = pipe(checked, foldLeftRight);
56-
57-
expect(getPaths(left(message.errors))).toEqual([]);
58-
expect(message.schema).toEqual(payload);
59-
});
60-
61-
test('it should accept an undefined for "deserializer"', () => {
62-
const payload = getListResponseMock();
63-
delete payload.deserializer;
64-
const decoded = listSchema.decode(payload);
65-
const checked = exactCheck(payload, decoded);
66-
const message = pipe(checked, foldLeftRight);
67-
68-
expect(getPaths(left(message.errors))).toEqual([]);
69-
expect(message.schema).toEqual(payload);
70-
});
71-
7250
test('it should NOT accept an undefined for "created_at"', () => {
7351
const payload = getListResponseMock();
7452
// @ts-expect-error

0 commit comments

Comments
 (0)