You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Updating Secure Request Object to reject overflowing and malformed timestamps - #54907
This PR hardens the Secure Request Object client-policy executor against timestamp coercion and integer-overflow lifetime bypasses, addressing #54457 and #54905.
Changes:
Adds numeric and range validation for timestamp claims.
Uses overflow-safe lifetime and clock-skew calculations and rejects expiration before nbf.
Adds unit tests for valid lifetimes, malformed timestamps, and numeric boundaries.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The zero-lifetime test can intermittently fail with Request Expired if the clock crosses a second boundary; its equal timestamps should be slightly in the future within the allowed clock skew.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The zero-lifetime test remains timing-sensitive because GC pauses or CI scheduling delays can cross a second boundary and cause a spurious Request Expired failure.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Wall-clock delay can expire the request during the test
Waiting for the first 100 ms of a second does not prevent a GC pause or CI scheduling delay from crossing the next second before the executor checks exp, causing this test to fail with Request Expired. Keep the zero lifetime but shift current into the future within ALLOWED_CLOCK_SKEW, or freeze the clock, instead of polling wall time.
If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.
java.lang.RuntimeException: Could not create statement
at org.jboss.arquillian.junit.Arquillian.methodBlock(Arquillian.java:307)
at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:160)
at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:344)
at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:48)
...
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The zero-lifetime success test remains timing-sensitive because its request expires within the current second, so scheduler or GC pauses can cause false failures.
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
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.
relating to issue #54457
Closes #54905