Skip to content

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:

  1. Log in to the MAS client and open the developer console.
  2. Go to "Application/Cookies".
  3. Configure the cookies in insight.properties (if they exist):

    • cookie JSESSIONIDUI

      1. Copy the cookie name to .rule.mass.cookie.allow.
      2. Copy the cookie domain to .rule.mass.domain.
    • cookie JSESSIONIDUIMANAGE

      1. Copy the cookie name to .rule.mass.cookie.allow.
      2. Copy the cookie domain to .rule.mass.domain.
    • cookie WAS_p*

      1. Copy the cookie name to .rule.masp.cookie.allow.
      2. Copy the cookie domain to .rule.masp.domain.
    • cookie WASOidcSession

      1. Add the cookie name to .rule.masp.cookie.allow.
      2. Copy the cookie domain to .rule.masp.domain.
    • cookie ltpatokenmanage

      1. Copy the cookie name to .rule.masp.cookie.allow.
      2. Copy the cookie domain to .rule.masp.domain.

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

    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