DeviceTamperingPolicy

The Device Tampering policy checks the integrity of device's software and hardware. It uses the FRRootDetector available in the 'forgerock-core' module. The class analyzes the device by using multiple device tamper detectors and returns the highest score in the range between 0.0 to 1.0 from all the detectors, indicating how likely the device is rooted: 0.0 - not likely, 0.5 - likely, 1.0 -very likely. The policy receives the `score` value as parameter to use as threshold on determine if the device is tampered. If the parameter is not passed, the policy will use the DEFAULT_THRESHOLD_SCORE. JSON Policy format: {"deviceTampering": {"score": 0.8}}

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open var data: JSONObject
Link copied to clipboard
Link copied to clipboard
private val DEVICE_TAMPERING_POLICY: String = "deviceTampering"
Link copied to clipboard
private val SCORE_KEY: String = "score"

Functions

Link copied to clipboard
open fun evaluate(context: Context): Boolean
Evaluate the policy compliance.
Link copied to clipboard
open fun getName(): String
Retrieve the name of the Policy.
Link copied to clipboard
private open fun isDeviceRooted(context: Context, thresholdScore: Double): Boolean