Context Size claims to be too small for StorageBackedSessionManager

Description

Reported on the users list. This exception is firing

if (sessionId.length() > storageService.getCapabilities().getContextSize()) { throw new SessionException("Session IDs are too large for StorageService, check configuration"); }

Environment

None

Activity

Rod WiddowsonJuly 10, 2022 at 2:57 PM

I should also extend the base test class in OpenSAML to look for non initialize size fields

Rod WiddowsonJuly 10, 2022 at 2:52 PM

This appears (modulo a glitch in my HSQLDB config where I had value as varchar(255) and it needed to be clob

My fix is not correct however since I am setting the value in doInitialize the correct solution is to

  • Set the context, key and value sizes up (to 255, 255 & Integer.MAX_VALUE) in the constructor

  • Document the keySize, contextSize & valueSize setters (so people can set their configuration to match the SQL). It might be magical to query the database for these values, but life is too short (isn’t it?)

  • Do NOT set any of these values in the doInitialize so that Spring configuration trumps the defaukt.

But that can all wait for tomorrow.

Rod WiddowsonJuly 10, 2022 at 2:12 PM

I (finally) have this reproduced in the testbed. I’ll try the simple fix but even if that works I won’t rush to ship out 1.0.3 until maybe Monday or Tuesday.

Rod WiddowsonJuly 6, 2022 at 2:17 PM

Looks like a straight PEBKAC in the initializer (missing setters for the internal sizes). But I will get the testbed running with this for the session cache before I do anything more - just testing for the attribute-release was obviously not good enough.

I’ll see about adding some regression tests to the base test class as well

Fixed

Details

Affects versions

Fix versions

Assignee

Reporter

Created July 6, 2022 at 12:45 PM
Updated July 11, 2022 at 2:59 PM
Resolved July 11, 2022 at 2:59 PM

Flag notifications