WrenSecurity / wrensec-commons

Community fork of ForgeRock Commons, which contains common utility code used by multiple products originally developed by ForgeRock.
http://wrensecurity.org
0 stars 10 forks source link

JwtSessionModule and AbstractJwtSessionModule are incompatible when handling Max-Age cookie attribute #22

Open pavelhoral opened 3 years ago

pavelhoral commented 3 years ago

JwtSessionModule is setting Max-Age cookie attribute to negative value to mark it as a session cookie. This is in line with ServletJwtSessionModule that does the same, however CHF Cookie API is not the same as javax.servlet Cookie API in a sense that negative Max-Age will automatically expire the cookie.

JwtSessionModule needs to handle negative max-age according to AbstractJwtSessionModule#getCookieMaxAge's contract.

This issue breaks Wren:IDM's authentication.