Bug 1379485

Summary: [GSS] (6.4.z) JvmRouteValve resets cookie max-age
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: dereed
Component: ClusteringAssignee: Paul Ferraro <paul.ferraro>
Status: CLOSED CURRENTRELEASE QA Contact: Jiří Bílek <jbilek>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.4.6CC: bmaxwell, jbilek, jtruhlar, paul.ferraro, ppalaga, rbost, smatasar
Target Milestone: CR1   
Target Release: EAP 6.4.12   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: eap6412-proposed
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 13:11:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1375585    

Description dereed 2016-09-26 23:43:03 UTC
When the JvmRouteValve resets the session cookie, it hard-codes max-age to -1.
It should use the max-age configured for the session cookie.

org.jboss.as.web.session.AbstractSessionManager#setNewSessionCookie

    // JBAS-6206. Configure cookie a la o.a.c.connector.Request.configureSessionCookie()
    cookie.setMaxAge(-1);
    ...

However Request.configureSessionCookie has instead:

    cookie.setMaxAge(context.getSessionCookie().getMaxAge());

It appears the code was copied long ago before max-age was added to the session cookie configuration, and not kept in sync.

Comment 3 Paul Ferraro 2016-10-03 21:02:34 UTC
https://github.com/jbossas/jboss-eap/pull/2856

Comment 4 Jiří Bílek 2016-11-08 12:41:04 UTC
Verified with EAP 6.4.12.CP.CR1

Comment 5 Petr Penicka 2017-01-17 13:11:46 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.