Class PingOneProtectDeviceProfileFilter
java.lang.Object
org.forgerock.openig.ping.protect.PingOneProtectDeviceProfileFilter
- All Implemented Interfaces:
Filter
If configured and enabled, the
PingOneProtectDeviceProfileFilter gathers a "device profile" from the client
for the purpose of providing additional evaluation signals to PingOne Protect. The device profile is gathered prior
to conducting a risk evaluation. The device profile has a lifetime, after
which it expires and must be retrieved again (prior to the next evaluation).
This filter always creates a PingOneProtectDeviceProfileContext, which may contain a
deviceProfile if it is known (i.e. if it has previously been obtained and not yet expired).
When device profiling is configured and enabled, the flow is as follows:
-
On first access, this filter creates a
PingOneProtectDeviceProfileContextcontaining only the device profiling state (nodeviceProfileat this stage). -
Prior to making a PingOne Protect risk evaluation, the
PingOneProtectEvaluationFilterwill first obtain thedeviceProfile. This is not yet present in thePingOneProtectDeviceProfileContext, and so must be retrieved from the client. Theevaluation filterreturns an 'OK' responsesignallinga device profile request to thePingOneProtectDeviceProfileContext. -
On the response flow, the
PingOneProtectDeviceProfileFilterdetects thedevice profile requestand (using theSDK config), generates and includes the formPOST in the response. The response is propagated onwards to the user-agent, enabling the PingOne Protect SDK to conduct device profiling. -
The formPOST re-posts to PingGateway on the "callbackEndpoint",
which unwraps the collected
deviceProfileand transforms it into a cookie (named according to config "cookieName"). The generated cookie expires aftermaxAgebased on the value of "lifetime". -
The flow is then redirected back to the original request, with the
deviceProfilecookie attached. -
Back in the original request flow, the
PingOneProtectDeviceProfileFilteragain populates aPingOneProtectDeviceProfileContext, but this time including thedeviceProfile. -
The flow progresses again to the
PingOneProtectEvaluationFilter, which is now able to include thedeviceProfilein the risk evaluation request to PingOne Protect. -
This
deviceProfilewill be available for all subsequent risk evaluation requests on this session, until its lifetime expires. At that point we repeat the device profiling process.
-
This filter is not Heap-defined as it is not intended to form part of configuration. It is expected to be
included directly by the
PingOneProtectEvaluationFilterwhen configured as part of its config. -
The
deviceProfilecookie may be large (10Kb) and so is split in transit.
-
Method Summary
-
Method Details
-
filter
public Promise<Response,NeverThrowsException> filter(Context context, Request request, Handler next) Description copied from interface:FilterFilters the request and/or response of an exchange. To pass the request to the next filter or handler in the chain, the filter callsnext.handle(context, request).This method may elect not to pass the request to the next filter or handler, and instead handle the request itself. It can achieve this by merely avoiding a call to
next.handle(context, request)and creating its own response object. The filter is also at liberty to replace a response with another of its own by intercepting the response returned by the next handler.
-