[v17] Prevent JWT-SVID timestamp claims being represented in scientific notation#61922
Merged
boxofrad merged 4 commits intobranch/v17from Dec 2, 2025
Merged
[v17] Prevent JWT-SVID timestamp claims being represented in scientific notation#61922boxofrad merged 4 commits intobranch/v17from
boxofrad merged 4 commits intobranch/v17from
Conversation
…ation Fixes a bug where setting `extra_claims` in the WorkloadIdentity resource causes the timestamp JWT-SVID claims (e.g. `exp` and `iat`) to be represented using scientific notation, which less lenient parsers will reject. Previously, we would round-trip the `jwt.Claims` through `json.Marshal` so that we could get them as a `map[string]any` to which we could add the user's claims. Unfortunately, this trick would unmarshal the `jwt.NumericDate` as a float64 which the marshaler will represent using scientific notation. Now, we use a `map[string]any` from the start rather than the `jwt.Claims` which preserves the correct types until we marshal the claims for real. changelog: Fixed a bug where JWT-SVID timestamp claims would be represented using scientific notation
Co-authored-by: Marek Smoliński <marek@goteleport.com>
strideynet
approved these changes
Dec 2, 2025
smallinsky
approved these changes
Dec 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #61886 to branch/v17
changelog: Fixed a bug where JWT-SVID timestamp claims would be represented using scientific notation