CookieMapping for MAS¶
CookieMapping must be configured for MAS otherwise sessions won't be closed/deleted in MAS after logout!
The following properties must be set in insight.properties and the values have to be adjustet according to your installation
gateway.response.header.map.set-cookie.log.unhandled=true
gateway.response.header.map.set-cookie.client.domain.mode=strip
gateway.response.header.map.set-cookie.rule.mass.domain=...
gateway.response.header.map.set-cookie.rule.mass.path=/
gateway.response.header.map.set-cookie.rule.mass.cookie.allow=JSESSIONIDUI
gateway.response.header.map.set-cookie.rule.masp.domain=...
gateway.response.header.map.set-cookie.rule.masp.path=/
gateway.response.header.map.set-cookie.rule.masp.cookie.allow=WAS_p...,WASOidc..
Steps to adjust the values:
- Log in to the MAS client and open the developer console.
- Go to "Application/Cookies".
-
Configure the cookies in insight.properties (if they exist):
-
cookie JSESSIONIDUI
- Copy the cookie name to
.rule.mass.cookie.allow. - Copy the cookie domain to
.rule.mass.domain.
- Copy the cookie name to
-
cookie JSESSIONIDUIMANAGE
- Copy the cookie name to
.rule.mass.cookie.allow. - Copy the cookie domain to
.rule.mass.domain.
- Copy the cookie name to
-
cookie WAS_p*
- Copy the cookie name to
.rule.masp.cookie.allow. - Copy the cookie domain to
.rule.masp.domain.
- Copy the cookie name to
-
cookie WASOidcSession
- Add the cookie name to
.rule.masp.cookie.allow. - Copy the cookie domain to
.rule.masp.domain.
- Add the cookie name to
-
cookie ltpatokenmanage
- Copy the cookie name to
.rule.masp.cookie.allow. - Copy the cookie domain to
.rule.masp.domain.
- Copy the cookie name to
-
Attention: Use one rule per domain. If multiple cookies share the same domain, add all cookie names to .rule.<rulename>.cookie.allow.
The properties should look like this example:
gateway.response.header.map.set-cookie.rule.mass.domain=masdev.manage.mas.somewhere.de
gateway.response.header.map.set-cookie.rule.mass.path=/
gateway.response.header.map.set-cookie.rule.mass.cookie.allow=JSESSIONIDUI,JSESSIONIDUIMANAGE
gateway.response.header.map.set-cookie.rule.masp.domain=mas.somewhere.de
gateway.response.header.map.set-cookie.rule.masp.path=/
gateway.response.header.map.set-cookie.rule.masp.cookie.allow=WAS_p99887766,WASOidcSession,ltpatokenmanage
Necessary checks after restarting Insight-middleware :
-
checking sessions in MAS
-
Login to Insight-Client
-
Check if new record exists in table maxsession with sql "select * from maxsession m where userid = 'your-user-id' order by logindatetime desc"
-
Check if new Login-record exists in table logintracking with sql "select * from logintracking where userid = 'your-user-id' order by attemptdate DESC"
-
Logout from Insight-Client
-
Check if session was deleted from table maxsession with sql "select * from maxsession m where userid = 'your-user-id' order by logindatetime desc"
-
Check if new Logout-record exists in table logintracking with sql "select * from logintracking where userid = 'your-user-id' order by attemptdate DESC"
-
-
checking cookies in insight-client:
- Login to Insight-Client and start developer-console. Configured cookies must be prefixed with rule-name
-
checking logfiles of insight-middleware
- logfile must not contain "unhandled Set-Cookie"-entries otherwise these cookies must be handled like the above mentioned cookies