Tracking User Runtimes

Content

Overview

When a user signs into the platform with a new runtime (i.e., a device or browser that has not previously been used to sign into ULM Cloud), the system registers that runtime (as a ULM runtime entity) in the database for tracking purposes.

Runtime Creation

After a successful User Authentication, the system executes the following tasks:

  1. Creates the new ULM Runtime entity.
  2. Associates the Runtime entity to the currently authenticated user (i.e., to the unique ULM User entity).
  3. Attaches the Runtime to the current authentication context.
  4. Creates an entry in ULM Cloud's login history and access logs.
  5. Sends a JRUNTIMEID cookie to the browser.

Runtime Unique ID

The ULM Runtime's unique ID will be obtained (or generated) through one of the following methods:

The system first checks for the existence of a GUID value in the request body of the POST /session/start API.

If no runtime is found, then the system checks for and reads from the JRUNTIMEID cookie value.

If the JRUNTIMEID cookie also does not exist, then the system fallbacks to generating a random universally unique identifier (UUID).

Runtime User Agent

From the standard HTTP User Agent header, the following information about the device will be resolved

  • display name
  • platform type
  • device type

These pieces of data are captured as properties on the ULM Runtime entity. See the ULM Data Model section for more information on how properties (and attributes)

Retrieve Current Runtime

The following techniques can use to track current user runtime:

  • JRUNTIMEID cookie
  • API calls

The following APIs can be used to track current user runtime:

GET /runtime

Retrieves information the ULM runtime specified by the currently authenticated user’s open session.

GET /runtime
{
   "id":5023,
   "type":"com.uxpsystems.mint.device.Runtime",
   "displayName":"Device (1)",
   "status":"activated",
   "guid":"23784568-2bb4-4625-9bb0-9cf41afbd59d",
   "version":"Unknown",
   "platformType":"Unknown",
   "deviceType":"UNKNOWN",
   "userAgent":"PostmanRuntime/7.1.1",
   "createdDate":1541534787000
}

GET /user/loginHistory

Retrieves a list of the currently authenticated user's login attempts and results. You can specify pagination query parameters in order to control the amount of responses per page.

GET /user/loginHistory
[
   {
      "timestamp":1541538186000,
      "deviceIP":"69.150.27.29, 10.0.1.16",
      "runtime":{
         "guid":"23784568-2bb4-4625-9bb0-9cf41afbd59d"
      },
      "requestedHost":"ulm.uxpsystemsdemo.com"
   },
   {
      "timestamp":1541536918000,
      "deviceIP":"158.106.83.220",
      "runtime":{
         "guid":"000000000001A0"
      },
      "requestedHost":"api.uxpsystemsdemo.com"
   },
   {
      "timestamp":1541534519000,
      "deviceIP":"69.150.27.29, 10.0.1.16",
      "requestedHost":"ulm.uxpsystemsdemo.com"
   },
   {
      "timestamp":1541100221000,
      "relyingPartyId":"facebook",
      "deviceIP":"158.106.83.220, 10.0.1.16",
      "requestedHost":"ulm.uxpsystemsdemo.com",
      "relyingPartyProtocol":"OIDC"
   },
   {
      "timestamp":1541011149000,
      "relyingPartyId":"https://slack.com",
      "deviceIP":"69.150.27.29, 10.0.1.16",
      "requestedHost":"ulm.uxpsystemsdemo.com",
      "relyingPartyProtocol":"OIDC"
   }
]

GET /user/runtimes/{GUID}/loginHistory

Retrieves a list of login attempts for the current user on specified runtime GUID.

GET /user/runtimes/{GUID}/loginHistory
[
   {
      "timestamp":1541538186000,
      "deviceIP":"69.150.27.29, 10.0.1.16",
      "runtime":{
         "guid":"23784568-2bb4-4625-9bb0-9cf41afbd59d"
      },
      "requestedHost":"ulm.uxpsystemsdemo.com"
   },
   {
      "timestamp":1541534787000,
      "deviceIP":"69.150.27.29, 10.0.1.16",
      "runtime":{
         "guid":"23784568-2bb4-4625-9bb0-9cf41afbd59d"
      },
      "requestedHost":"ulm.uxpsystemsdemo.com"
   }
]

Note: See the ULM APIs section of the MarketONE Developer Portal for the full ULM REST API specification that includes these APIs.

Revision History

Version Description
2020.11 Added this topic.