Uploaded image for project: 'OpenAM Agents'
  1. OpenAM Agents
  2. AMAGENTS-3718

Webagent does not read getSessionInfo response attributes outside "properties" element

    XMLWordPrintable

    Details

      Description

      Configure webagent to map following session attributes as headers:

      latestAccessTime, maxIdleExpirationTime and maxSessionExpirationTime.

      Request protected resource and observe agent log:

      2020-09-03 08:22:03 UTC DEBUG   [88dd2b4d-3c47-2610-8829-44efd71468ee]: (source/enforce/enforce_header_setter.c:33) do_header_set(): setting CUSTOMmaxIdleExpirationTime: 2020-09-03T08:52:03Z

      2020-09-03 08:22:03 UTC DEBUG   [88dd2b4d-3c47-2610-8829-44efd71468ee]: (source/enforce/enforce_header_setter.c:55) do_header_set(): CUSTOMlatestAccessTime (latestAccessTime) is not available in session attributes

       

      Although getSessionInfo response has them both:

       

      POST /am/json/realms/root/sessions?_action=getSessionInfo HTTP/1.1
      Cookie: iPlanetDirectoryPro=rx24DaIv1N4R3LPrFiLMuKdYuHM.AAJTSQACMDIAAlNLABxuTUFlZXMyaVFnYlNKNVh1TmcwM010RzRUZWs9AAR0eXBlAANDVFMAAlMxAAIwMQ..
      User-Agent: OpenAM Web Agent/5.7.0
      Accept: application/json
      Connection: Close
      Content-Type: application/json; charset=UTF-8
      Accept-API-Version: resource=3.1, protocol=1.0
      X-ForgeRock-TransactionId: 88dd2b4d-3c47-2610-8829-44efd71468ee/1
      Content-length: 1246

      {"properties":["latestAccessTime","maxIdleExpirationTime","UserToken"],"tokenId":"eyJ0eXAiOiJKV4iLCJc4CAlRlsLHeNw"}

      2020-09-03 08:22:03 UTC DEBUG [88dd2b4d-3c47-2610-8829-44efd71468ee]: (source/sdk_base.c:223) http response 200 from
      X-Frame-Options: SAMEORIGIN
      Cache-Control: no-cache
      Content-API-Version: resource=3.1
      X-Content-Type-Options: nosniff
      Content-Type: application/json;charset=UTF-8
      Content-Length: 1249
      Date: Thu, 03 Sep 2020 08:22:03 GMT
      Connection: close
      {"username":"test","universalId":"id=test,ou=user,dc=openam,dc=forgerock,dc=org","realm":"/","latestAccessTime":"2020-09-03T08:22:03Z","maxIdleExpirationTime":"2020-09-03T08:52:03Z","maxSessionExpirationTime":"2020-09-03T10:22:02Z","properties":{"Locale":"en_US","authInstant":"2020-09-03T08:22:03Z","Organization":"dc=openam,dc=forgerock,dc=org","UserProfile":"Required","Principals":"test","successURL":"/am/console","CharSet":"UTF-8","Service":"ldapService","Host":"127.0.0.1","FullLoginURL":"/am/UI/Login?goto=http%3A%ider%3Dtrue%26agent_realm%3D%252F&realm=%2F","AuthLevel":"0","clientType":"genericHTML","AMCtxId":"0535f9ac-4cec-4cae-aa9e-f73f7ea9fca0-3281","loginURL":"/am/UI/Login","UserId":"test","AuthType":"DataStore","sun.am.UniversalIdentifier":"id=test,ou=user,dc=openam,dc=forgerock,dc=org","HostName":"127.0.0.1","amlbcookie":"01","Principal":"id=test,ou=user,dc=openam,dc=forgerock,dc=org","UserToken":"test"}}

       

       

       

       

       

        Attachments

          Activity

            People

            Assignee:
            mareks.malnacs Mareks Malnacs
            Reporter:
            mareks.malnacs Mareks Malnacs
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: