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
Fix NullPointerException in RotableSecret #100779
Conversation
This commit fixes two things: 1) RotatableSecret#matches could throw a NullPointerException when the current secret is null but the prior secret is not. 2) RotatableSecret#checkExpired would not expire a prior secret when checking the same millisecond the prior secret was due to expire. Both of these would cause intermittent test failures, the first based on randomization
Hi @gwbrown, I've created a changelog YAML for you. |
Pinging @elastic/es-security (Team:Security) |
docs/changelog/100779.yaml
Outdated
@@ -0,0 +1,6 @@ | |||
pr: 100779 | |||
summary: Fix bugs causing `RotatableSecretTests#testBasicRotation` to fail |
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.
nit: update summary to 'Fix NullPointerException in RotableSecret'
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, thanks for fixing this !
@elasticmachine run elasticsearch-ci/part-1 |
💚 Backport successful
|
This commit fixes two things: 1) RotatableSecret#matches could throw a NullPointerException when the current secret is null but the prior secret is not. 2) RotatableSecret#checkExpired would not expire a prior secret when checking the same millisecond the prior secret was due to expire. Both of these would cause intermittent test failures, the first based on randomization, the second based on timing.
This commit fixes two things: 1) RotatableSecret#matches could throw a NullPointerException when the current secret is null but the prior secret is not. 2) RotatableSecret#checkExpired would not expire a prior secret when checking the same millisecond the prior secret was due to expire. Both of these would cause intermittent test failures, the first based on randomization, the second based on timing.
This commit fixes two things:
RotatableSecret#matches
could throw aNullPointerException
when the current secret is null but the prior secret is not.RotatableSecret#checkExpired
would not expire a prior secret when checking the same millisecond the prior secret was due to expire.Both of these would cause intermittent test failures, the first based on randomization and the second based on timing.
Fixes #99759