Files
floci/src/main/java/io/github
Feyikemi Ogunsanya 3ce5041c71 fix(cognito): reject invalid refresh tokens in InitiateAuth REFRESH_TOKEN_AUTH (#2132)
* fix(cognito): reject invalid refresh tokens in InitiateAuth REFRESH_TOKEN_AUTH

InitiateAuth with AuthFlow=REFRESH_TOKEN_AUTH silently fell back to
minting fresh tokens for a fake "unknown" user whenever the supplied
REFRESH_TOKEN failed to parse or didn't resolve to a real user,
instead of failing like GetTokensFromRefreshToken already does.

Fixes #2113

* test(cognito): add regression tests for invalid refresh token rejection

Cover InitiateAuth REFRESH_TOKEN_AUTH with a garbage token and with a
well-formed token encoding a nonexistent user; both must fail with
NotAuthorizedException rather than returning an AuthenticationResult.

* test(cognito): add regression test for non-numeric refresh token issued-at

Covers a well-formed refresh token whose issued-at field is not a
number; must fail with 400 NotAuthorizedException rather than the
500 NumberFormatException that surfaced before the parse was guarded.

* fix(ec2): make network interface pagination tests order-independent

describeNetworkInterfacesWithMaxResultsNoNextToken and
describeNetworkInterfacesMultipagePagination assumed a fixed/low ENI
count, but other tests in this class are not isolated and can leave
ENIs behind depending on JUnit's tie-breaking order among tests
sharing @Order(92). Use MaxResults=1000 for the single-page case and
measure the actual ENI baseline before asserting page counts for the
multipage case.
2026-08-10 19:01:47 -05:00
..