Skip to content

Commit

Permalink
Define base encoding in x509.serial_number
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.

Related to elastic/sdh-beats#5089.
Reasoning in: elastic/sdh-beats#5089 (comment)
  • Loading branch information
haesbaert committed Sep 17, 2024
1 parent 861011d commit c786d0f
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 61 deletions.
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. YADA YADA
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 @@ -3337,7 +3337,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 @@ -9979,7 +9979,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 @@ -10536,7 +10536,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 @@ -11600,7 +11600,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 @@ -12168,7 +12168,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 @@ -12584,7 +12584,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 @@ -12866,7 +12866,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 @@ -5508,8 +5508,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 @@ -16155,8 +16154,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 @@ -17082,8 +17080,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 @@ -18891,8 +18888,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 @@ -19834,8 +19830,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 @@ -20525,8 +20520,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 @@ -21002,8 +20996,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 @@ -6555,7 +6555,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 @@ -18857,7 +18857,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 @@ -19788,7 +19788,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 @@ -21599,7 +21599,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 @@ -22546,7 +22546,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 @@ -23301,7 +23301,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 @@ -23781,7 +23781,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 @@ -25699,7 +25699,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 @@ -3287,7 +3287,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 @@ -9929,7 +9929,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 @@ -10486,7 +10486,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 @@ -11550,7 +11550,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 @@ -12118,7 +12118,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 @@ -12534,7 +12534,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 @@ -12816,7 +12816,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 @@ -5439,8 +5439,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 @@ -16086,8 +16085,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 @@ -17013,8 +17011,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 @@ -18822,8 +18819,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 @@ -19765,8 +19761,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 @@ -20456,8 +20451,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 @@ -20933,8 +20927,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 c786d0f

Please sign in to comment.