Skip to content

Deprecate RandomSessionIdGenerator due to insufficient entropy#2759

Open
wali-reheman wants to merge 1 commit into
apache:mainfrom
wali-reheman:fix/upstream-deprecate-random-session-id-generator
Open

Deprecate RandomSessionIdGenerator due to insufficient entropy#2759
wali-reheman wants to merge 1 commit into
apache:mainfrom
wali-reheman:fix/upstream-deprecate-random-session-id-generator

Conversation

@wali-reheman
Copy link
Copy Markdown

Marks RandomSessionIdGenerator as @deprecated with a Javadoc pointing to JavaUuidSessionIdGenerator. The class only provides 64 bits of entropy via Long.toString(SecureRandom.nextLong()), below the 128-bit minimum required by OWASP ASVS and NIST SP 800-63B for session tokens.

Marks the class @deprecated with a Javadoc pointing to JavaUuidSessionIdGenerator.

Modern industry standards (OWASP ASVS, NIST SP 800-63B) require a minimum
of 128 bits of entropy for session tokens. RandomSessionIdGenerator only
provides 64 bits via Long.toString(SecureRandom.nextLong()).

Fixes apache#2758
@github-actions github-actions Bot added the java Pull requests that update Java code label Jun 6, 2026
@lprimak
Copy link
Copy Markdown
Contributor

lprimak commented Jun 7, 2026

Hi, Wali, thanks for your contribution.

We are not quite sure that the deprecation is the right way to go.
Please feel free to voice your opinion and discuss in the issue #2758

Also, can you please restore the PR template, the checklist is mandatory due to copyright issues.
Also, the @since should be 2.2.1 instead of 2.0
For now, let's put this PR on hold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge java Pull requests that update Java code pending-cla

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants