Skip to content

generate standalone http session keys from a secure random source - #1320

Open
kali834x wants to merge 1 commit into
apache:masterfrom
kali834x:standalone-session-key-random
Open

kali834x wants to merge 1 commit into
apache:masterfrom
kali834x:standalone-session-key-random

Conversation

@kali834x

Copy link
Copy Markdown
Contributor

sessionmanager.getSessionContext now creates transport session keys with UIDGenerator.generateURNString, the SecureRandom-backed UUID the soap session path in ConfigurationContext already uses for its service group context id, instead of generateUID. generateUID is a per-thread constant (start time and thread id) followed by a per-thread counter XORed with one per-JVM value, and on the standalone server (SimpleHTTPServer / AxisHttpService) that key is all a caller presents, in an axis_session or JSESSIONID request header read by RequestSessionCookie, to be bound to a SessionContext and its transportsession-scoped service instances. since ResponseSessionCookie hands every caller their own key, one anonymous request tells you the fixed 32 hex characters for that worker thread, and the next key issued on it differs only in the counter's low bits: one of 64 candidates when nothing else drew a UID on the thread in between, a small search otherwise (CWE-330, predictable session identifier). the servlet path uses the container's HttpSession and is unaffected. SessionManagerTest gets a regression that derives the 64 candidates from each key and fails before the change (the next key is among them) and passes after; the transport-http module's verify is green (112 tests).

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.

1 participant