Skip to content

RANGER-5836: Ranger Admin authentication failure due to wrong cookie expiration - #1307

Merged
pradeepagrawal8184 merged 3 commits into
apache:masterfrom
akash-gupta2813:akgupta/RANGER-5836
Nov 2, 2026
Merged

pradeepagrawal8184 merged 3 commits into
apache:masterfrom
akash-gupta2813:akgupta/RANGER-5836

Conversation

@akash-gupta2813

@akash-gupta2813 akash-gupta2813 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

The change updates RangerKrbFilter.createAuthCookie() to format the cookie Expires date with Locale.US, instead of relying on the JVM default locale. This prevents JDK 9+/CLDR locales such as en_GB from generating invalid HTTP cookie dates like Sept instead of Sep.

ASF Jira : https://issues.apache.org/jira/browse/RANGER-5836

How was this patch tested?

Added a new unit test for this particular change and also validated manually in a Kerberized Ranger setup in local docker with en_GB and September expiry: after the fix, hadoop.auth uses Sep and Java parses the cookie as valid.

@ChinmayHegde24 ChinmayHegde24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now, Thanks.

@pradeepagrawal8184
pradeepagrawal8184 merged commit c5be812 into apache:master Nov 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants