Repository navigation
Preserve JVM default timezone when generating tenant tokens - #1003
Open
suryakant-source wants to merge 2 commits into
Open
suryakant-source wants to merge 2 commits into
suryakant-source wants to merge 2 commits into
Conversation
Signed-off-by: Suryakant Sahoo <230859682+suryakant-source@users.noreply.github.com>
Signed-off-by: Suryakant Sahoo <230859682+suryakant-source@users.noreply.github.com>
Contributor
This branch has not been deployed
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.
Fixes #1002
Remove the global
TimeZone.setDefaultcall fromgenerateTenantToken. Expiration validation compares Date instants and JWT expiration is stored as epoch seconds, so generating a token does not need to change the host application's timezone.Add two server-free regression tests that restore the original timezone in finally blocks:
Validation with JDK 17:
./gradlew test --tests '*TenantTokenTimezoneTest' -x jacocoTestCoverageVerification spotlessCheckpasses. Coverage verification is excluded for this focused run because it checks whole-project coverage../gradlew testruns 115 tests: 112 pass, with the same three SettingsHandlerTest connection failures observed before the fix (no local Meilisearch server). No server-backed integration run was performed.AI assistance was used to prepare the fix and regression tests. The changes were reviewed and the checks above were run locally.
Summary by CodeRabbit