Skip to content
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 misuse DateTimeOffset and UTC in KeyManagement #87

Merged
merged 1 commit into from
Jan 20, 2021

Conversation

brockallen
Copy link
Member

@brockallen brockallen commented Jan 20, 2021

During key management initialization there is an edge case that could cause an unhanded exception with the message "Failed to create and then load new keys.". This could be seen during requests to the discovery and keys endpoint.

The conditions that would trigger this edge case were when no keys had yet been created, a low rotation interval configured (common when testing), and if the local time zone was after UTC. With typical production settings for the rotation interval, this initialization error would not occur and the normal key management processing would execute properly.

The bug was caused due to an incorrect use of non-UTC DateTimeOffset API, and the fix is to use the correct UTC version of the API.

@brockallen brockallen added this to the 5.0.1 milestone Jan 20, 2021
@brockallen brockallen added the bug Something isn't working label Jan 20, 2021
@leastprivilege leastprivilege merged commit edc52bd into main Jan 20, 2021
@leastprivilege leastprivilege deleted the brock/key_mgmr_utc_fixes branch January 20, 2021 19:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants