-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to base 16 for TLS serial number in packetbeat in line with ECS changes #41542
base: main
Are you sure you want to change the base?
Conversation
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI agrees
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the PR description's proposed commit message to reference the related ECS change, as this provides essential context for understanding the behavior modification.
Has the ECS change been released? In my opinion, it is not advisable for Packetbeat to "get ahead" of the schema. First, we should create a release that incorporates the spec change. Additionally, the ECS version reported by Packetbeat (src ref) should be updated to indicate which version it is following, even if it deviates from the other Beats.
We also need to add a changelog entry for this change.
@andrewkroh so the ECS PR is here: elastic/ecs#2383 But it doesn't look like there's been an actual release of this yet though. Should we wait for the next minor? Is there a release process for ECS we need to trigger? Looks like the last one was a year ago. |
@@ -312,7 +312,7 @@ func TestOCSPStatus(t *testing.T) { | |||
"not_after": time.Date(2035, 3, 4, 9, 0, 0, 0, time.UTC), | |||
"public_key_algorithm": "RSA", | |||
"public_key_size": 4096, | |||
"serial_number": "1492448539999078269498416841973088004758827", | |||
"serial_number": "1121E97D5D37348C572C555A3A59B7B65D2B", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that all of the fields under tls.detailed.*
are not part of ECS. I cannot find any definition of this field within elastic/beats that needs updated, but it is defined at https://github.com/elastic/integrations/blob/7d7358618583e3d34e83e645d8bb7c83eda58253/packages/network_traffic/data_stream/tls/fields/protocol.yml#L210-L212 so that side will also need an update.
I recommend updating that definition at the same time in which you update the ECS version12 for the network_traffic integration (after we have an ECS release).
Footnotes
-
https://github.com/elastic/integrations/blob/7d7358618583e3d34e83e645d8bb7c83eda58253/packages/network_traffic/_dev/build/build.yml ↩
-
https://github.com/search?q=repo%3Aelastic%2Fintegrations+path%3A%2F%5Epackages%5C%2Fnetwork_traffic%5C%2Fdata_stream%5C%2F.*default%5C.yml%2F+%2Fecs%5C.version%2F&type=code ↩
According to https://github.com/elastic/ecs/blob/main/CONTRIBUTING.md#ecs-releases-during-the-donation-to-opentelemetry, it will need to be aligned to a stack minor. As for planning to get an actually release made, can you reach out to the |
Please update the example in your proposed commit message to reflect that the serial_number values are now uppercase. |
This pull request is now in conflicts. Could you fix it? 🙏
|
Proposed commit message
This switches the
serial_number
field in packetbeat's TLS reporting to use base 16 values instead of base 10:I don't think this is a breaking change? Also note the lack of a
0x
indicator. Not sure if we care.ECS PR here: elastic/ecs#2383
Also note that this maintains the liter bypass for
dsa
, which is deprecated. Do we still need it?Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
This will alter the reported
serial_number
for TLS certs from base 10 to base 16.