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:
- Login to MAS-Client and start developer-console. Go to "Application/Cookies"
-
configure cookies in insight.properties
-
cookie JSESSIONIDUI
- copy name to value of .rule.mass.cookie.allow
- copy value of domain to value of ...rule.mass.domain
-
cookie WAS_p*
- copy name to value of .rule.masp.cookie.allow
- copy value of domain to value of ...rule.masp.domain
-
cookie WASOidcSession only if exits
- add name to value of .rule.masp.cookie.allow (comma separated list)
-
so these properties must 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
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
Necessary checks after restarting Insight-middleware :
-
checking sessions in MAS
1) Login to Insight-Client
2) Check if new record exists in table maxsession with sql "select * from maxsession m where userid = 'your-user-id' order by logindatetime desc"
3) Check if new Login-record exists in table logintracking with sql "select * from logintracking where userid = 'your-user-id' order by attemptdate DESC"
4) Logout from Insight-Client
5) Check if session was deleted from table maxsession with sql "select * from maxsession m where userid = 'your-user-id' order by logindatetime desc"
6) 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:
1) Login to Insight-Client and start developer-console. Configured cookies must be prefixed with rule-name
-
checking logfiles of insight-middleware
1) logfile must not contain "unhandled Set-Cookie"-entries otherwise these cookies must be handled like the above mentioned cookies