Skip to content

Commit

Permalink
Restrict x509.serial_number to base 16 for 9.x (#2398)
Browse files Browse the repository at this point in the history
We made 8.x a `should` for the same field in
4fa0abd.

As discussed in #2383 (comment)
we are making this a `must` for 9.x.

Co-authored-by: Michael Wolf <[email protected]>
  • Loading branch information
haesbaert and mjwolf authored Nov 22, 2024
1 parent cb1a2c1 commit 4fd9584
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 46 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Thanks, you're awesome :-) -->
#### Improvements

* Define base encoding of `x509.serial_number`. #2383
* Restrict the encoding of `x509.serial_number` to base 16. #2398

#### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion docs/fields/field-details.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13803,7 +13803,7 @@ example: `2048`
[[field-x509-serial-number]]
<<field-x509-serial-number, x509.serial_number>>

a| Unique serial number issued by the certificate authority. For consistency, this should be encoded in base 16 and formatted without colons and uppercase characters.
a| Unique serial number issued by the certificate authority. For consistency, this must be encoded in base 16 and formatted without colons and uppercase characters.

type: keyword

Expand Down
14 changes: 7 additions & 7 deletions experimental/generated/beats/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3339,7 +3339,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -9984,7 +9984,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -10541,7 +10541,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -11606,7 +11606,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -12174,7 +12174,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -12590,7 +12590,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -12872,7 +12872,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down
14 changes: 7 additions & 7 deletions experimental/generated/ecs/ecs_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5510,7 +5510,7 @@ file.x509.public_key_size:
file.x509.serial_number:
dashed_name: file-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: file.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -16159,7 +16159,7 @@ threat.enrichments.indicator.file.x509.public_key_size:
threat.enrichments.indicator.file.x509.serial_number:
dashed_name: threat-enrichments-indicator-file-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.enrichments.indicator.file.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -17085,7 +17085,7 @@ threat.enrichments.indicator.x509.public_key_size:
threat.enrichments.indicator.x509.serial_number:
dashed_name: threat-enrichments-indicator-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.enrichments.indicator.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -18894,7 +18894,7 @@ threat.indicator.file.x509.public_key_size:
threat.indicator.file.x509.serial_number:
dashed_name: threat-indicator-file-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.indicator.file.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -19836,7 +19836,7 @@ threat.indicator.x509.public_key_size:
threat.indicator.x509.serial_number:
dashed_name: threat-indicator-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.indicator.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -20526,7 +20526,7 @@ tls.client.x509.public_key_size:
tls.client.x509.serial_number:
dashed_name: tls-client-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: tls.client.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -21002,7 +21002,7 @@ tls.server.x509.public_key_size:
tls.server.x509.serial_number:
dashed_name: tls-server-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: tls.server.x509.serial_number
ignore_above: 1024
Expand Down
16 changes: 8 additions & 8 deletions experimental/generated/ecs/ecs_nested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6558,7 +6558,7 @@ file:
file.x509.serial_number:
dashed_name: file-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: file.x509.serial_number
Expand Down Expand Up @@ -18863,7 +18863,7 @@ threat:
threat.enrichments.indicator.file.x509.serial_number:
dashed_name: threat-enrichments-indicator-file-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.enrichments.indicator.file.x509.serial_number
Expand Down Expand Up @@ -19794,7 +19794,7 @@ threat:
threat.enrichments.indicator.x509.serial_number:
dashed_name: threat-enrichments-indicator-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.enrichments.indicator.x509.serial_number
Expand Down Expand Up @@ -21606,7 +21606,7 @@ threat:
threat.indicator.file.x509.serial_number:
dashed_name: threat-indicator-file-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.indicator.file.x509.serial_number
Expand Down Expand Up @@ -22553,7 +22553,7 @@ threat:
threat.indicator.x509.serial_number:
dashed_name: threat-indicator-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.indicator.x509.serial_number
Expand Down Expand Up @@ -23308,7 +23308,7 @@ tls:
tls.client.x509.serial_number:
dashed_name: tls-client-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: tls.client.x509.serial_number
Expand Down Expand Up @@ -23788,7 +23788,7 @@ tls:
tls.server.x509.serial_number:
dashed_name: tls-server-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: tls.server.x509.serial_number
Expand Down Expand Up @@ -25706,7 +25706,7 @@ x509:
x509.serial_number:
dashed_name: x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: x509.serial_number
Expand Down
14 changes: 7 additions & 7 deletions generated/beats/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3289,7 +3289,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -9934,7 +9934,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -10491,7 +10491,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -11556,7 +11556,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -12124,7 +12124,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -12540,7 +12540,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down Expand Up @@ -12822,7 +12822,7 @@
type: keyword
ignore_above: 1024
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase
this must be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down
14 changes: 7 additions & 7 deletions generated/ecs/ecs_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5441,7 +5441,7 @@ file.x509.public_key_size:
file.x509.serial_number:
dashed_name: file-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: file.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -16090,7 +16090,7 @@ threat.enrichments.indicator.file.x509.public_key_size:
threat.enrichments.indicator.file.x509.serial_number:
dashed_name: threat-enrichments-indicator-file-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.enrichments.indicator.file.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -17016,7 +17016,7 @@ threat.enrichments.indicator.x509.public_key_size:
threat.enrichments.indicator.x509.serial_number:
dashed_name: threat-enrichments-indicator-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.enrichments.indicator.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -18825,7 +18825,7 @@ threat.indicator.file.x509.public_key_size:
threat.indicator.file.x509.serial_number:
dashed_name: threat-indicator-file-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.indicator.file.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -19767,7 +19767,7 @@ threat.indicator.x509.public_key_size:
threat.indicator.x509.serial_number:
dashed_name: threat-indicator-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: threat.indicator.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -20457,7 +20457,7 @@ tls.client.x509.public_key_size:
tls.client.x509.serial_number:
dashed_name: tls-client-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: tls.client.x509.serial_number
ignore_above: 1024
Expand Down Expand Up @@ -20933,7 +20933,7 @@ tls.server.x509.public_key_size:
tls.server.x509.serial_number:
dashed_name: tls-server-x509-serial-number
description: Unique serial number issued by the certificate authority. For consistency,
this should be encoded in base 16 and formatted without colons and uppercase characters.
this must be encoded in base 16 and formatted without colons and uppercase characters.
example: 55FBB9C7DEBF09809D12CCAA
flat_name: tls.server.x509.serial_number
ignore_above: 1024
Expand Down
Loading

0 comments on commit 4fd9584

Please sign in to comment.