-
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
[Heartbeat] Handle TLS certs missing notBefore/notAfter #9566
[Heartbeat] Handle TLS certs missing notBefore/notAfter #9566
Conversation
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 but we should add a CHANGELOG entry.
|
||
return conn, nil | ||
}), nil | ||
} | ||
} | ||
|
||
func addCertMetdata(event common.MapStr, chains [][]*x509.Certificate) { | ||
// The behavior here might seem strange. We *always* set a notBefore, but only optionally set a notAfter. |
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.
Thanks for all the details here in case someone wants to change this in the future.
73421eb
to
5e2d922
Compare
@ruflin thanks for the review. Changelog pushed. Am I good to merge? |
CHANGELOG.asciidoc
Outdated
@@ -68,6 +68,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha1...master[Check the HEAD d | |||
|
|||
*Heartbeat* | |||
|
|||
- Fixed rare issue where TLS connections to endpoints with x509 certificates missing either notBefore or notAfter would cause the check to fail with a stacktrace. |
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.
- Fixed rare issue where TLS connections to endpoints with x509 certificates missing either notBefore or notAfter would cause the check to fail with a stacktrace. | |
- Fixed rare issue where TLS connections to endpoints with x509 certificates missing either notBefore or notAfter would cause the check to fail with a stacktrace. {issue}9556[9556] {pull}9566[9566] |
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.
Added one small minor suggestion to the changelog. Good to be merged afterwards.
Could you give me write permissions to your repo so I could push such small changes directly?
8e5ce5c
to
cb6bf93
Compare
@ruflin I just pushed the change myself. Your edit adds extra whitespace which it should not. |
jenkins, retest this please |
Some certs in the wild don't set these standard fields and can cause an NPE Fixes elastic#9556
cb6bf93
to
a14916b
Compare
* [Heartbeat] Handle TLS certs missing notBefore/notAfter Some certs in the wild don't set these standard fields and can cause an NPE Fixes elastic#9556 * Add changelog entry
…ore/notAfter (#9759) * Add heartbeat test for TLS client cert auth (#8984) (#9676) * Add heartbeat test for TLS client cert auth We were missing a test for this specific case. I wrote this hoping to confirm #8979, but actually wound up disproving it. That said, this is still a good test to have, so we should merge it. * [Heartbeat] Handle TLS certs missing notBefore/notAfter (#9566) Some certs in the wild don't set these standard fields and can cause an NPE Fixes #9556
* [Heartbeat] Handle TLS certs missing notBefore/notAfter Some certs in the wild don't set these standard fields and can cause an NPE Fixes elastic#9556 * Add changelog entry (cherry picked from commit 337113e)
… notBefore/notAfter (elastic#9759) * Add heartbeat test for TLS client cert auth (elastic#8984) (elastic#9676) * Add heartbeat test for TLS client cert auth We were missing a test for this specific case. I wrote this hoping to confirm elastic#8979, but actually wound up disproving it. That said, this is still a good test to have, so we should merge it. * [Heartbeat] Handle TLS certs missing notBefore/notAfter (elastic#9566) Some certs in the wild don't set these standard fields and can cause an NPE Fixes elastic#9556
Some certs in the wild don't set these standard fields and can cause an NPE. I left a long comment in the code, this is sort of a bizarre situation.
Fixes #9556