Skip to content

Commit

Permalink
Define base encoding in x509.serial_number (#2383)
Browse files Browse the repository at this point in the history
Narrow the definition of x509.serial_number to be encoded in hexadecimal,
otherwise we end up with integrations choosing their own encoding, as noted
below, Zeek uses base 16 while the rest of beats is using base 10.
  • Loading branch information
haesbaert authored and mjwolf committed Oct 15, 2024
1 parent e7fcda3 commit 5d161ab
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 61 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Thanks, you're awesome :-) -->

#### Improvements

* Define base encoding of `x509.serial_number`. #2383

#### Deprecated

### Tooling and Artifact Changes
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, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
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.

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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down
21 changes: 7 additions & 14 deletions experimental/generated/ecs/ecs_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5510,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -16160,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -17087,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -18897,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -19840,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -20531,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -21008,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should 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,
if this value is alphanumeric, it should be formatted without colons and uppercase
this should be encoded in base 16 and formatted without colons and uppercase
characters.
example: 55FBB9C7DEBF09809D12CCAA
default_field: false
Expand Down
21 changes: 7 additions & 14 deletions generated/ecs/ecs_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5441,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -16091,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -17018,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -18828,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -19771,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -20462,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 @@ -20939,8 +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,
if this value is alphanumeric, it should be formatted without colons and uppercase
characters.
this should 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 5d161ab

Please sign in to comment.