Risk Policies
Risk policies enable you to customize the risk evaluations to your specific needs. Risk policies are containers for specific risk logic. You can define multiple risk policies and deploy them to initiate different authentication flow actions based on the calculated risk. By default, every PingOne environment has an associated system-level default risk policy set.
For more information about the default risk policies, refer to the example response in Read Risk Policy Sets. Each risk policy set contains a list of risk policies. The maximum number of policy sets per environment is 100; the maximum number of policies per policy set is 100.
Risk policies have the components:
-
Condition
A Boolean predicate that defines when the policy element is evaluated to true and when it is evaluated to false.
-
Result
Defines the final result of the risk evaluation when the condition is evaluated to true.
Value comparison conditions
Value comparison conditions compare a placeholder to a value. For example:
{
"value": "${some.placeholder}",
"equals": "some value"
}
The value is the outcome of one of the risk predictors.
IP range conditions
IP range conditions designate IP addresses for whitelisting and blacklisting.
{
"ipRange": ["1.1.1.1/16", "2.2.2.2/24"],
"contains": "${transaction.ip}"
}
|
The IP range rule list has a maximum of 400 CIDRs. |
Override policies
Override policies are the ones with the highest priority. They should be listed at the beginning of the riskPolicies array. They can have value comparison condition rules or IP range condition rules. The risk policy array can have no override policies or multiple override policies.
|
Note:
|
Combining predictors
There are two methods of combining the predictors - Weights and Scores. When you use the Weights approach, you are determining relative weights that should be used when calculating the individual risk score for each predictor. When you use the Scores approach, you can exercise more control over the overall calculation because you can specify an exact numerical score that should be assigned when PingOne Protect determines that there is a medium or high risk level for a predictor.
Weighted policies
|
The use of weights in risk policies has been deprecated for new PingOne environments, but weighted policies can still be used in existing environments. For new PingOne environments, use score-based policies. |
Weighted policies allow you to combine results from multiple predictors.
Weighted policies determine risk based on aggregated weighted risk score. These policies must be listed in the riskPolicies array after all override policies are specified. An aggregated risk score involves two weighted policies, and these policies must be the last policies in the riskPolicies array.
The weighted policies that determine the aggregated risk score complement each other and are subject to these restrictions:
-
The first weighted policy should have
result.level=MEDIUMand the second should haveresult.level=HIGH. -
The value for the
condition.aggregatedWeightsattribute for both policies must be the same. -
The value for the
condition.between.maxScoreattribute for theHIGHweighted policy must be 100. -
The value of the
condition.betweenattribute for the two policies must be complementary. For example, if theHIGHpolicy hascondition.between.minScore = 70, theMEDIUMpolicy should havecondition.between.maxScore = 70. -
condition.typeshould be set to AGGREGATED_WEIGHTS. -
Choose the
weightvalue assigned to each predictor outcome according to its significance. The following example shows theweightfor two predictors:ipAddressReputationat 9 and theweightforgeoVelocityat 4. The maximum and minimum scores are set at 60 and 90, respectively:
{
"aggregatedWeights": [
{
"value": "${details.aggregatedWeights.ipAddressReputation}",
"weight": 9
},
{
"value": "${details.aggregatedWeights.geoVelocity}",
"weight": 4
}
],
"between": {
"minScore": 60,
"maxScore": 90
}
}
The value of value consists of the identifier for a specific predictor, and it takes the form ${details.aggregatedWeights.geoVelocity}, where the string after aggregatedWeights is the compact name of the relevant predictor.
Score policies
The JSON content below shows an example of a policy set that uses the Scores approach to risk calculation.
Details to note about the use of score policies:
-
If you are including overrides in the policy set, they must precede the score policies.
-
The policy set must include two score policies - one that includes the score range that should be translated into MEDIUM risk, and one that includes the score range that should be translated into HIGH risk.
-
In terms of order, the MEDIUM policy must precede the HIGH policy.
-
Use
condition.between.minScoreandcondition.between.maxScoreto define the ranges for MEDIUM risk and HIGH risk. ThemaxScorefor MEDIUM risk should always equal theminScorefor HIGH risk. -
condition.typeshould be set to AGGREGATED_SCORES. -
The
conditionobject should contain anaggregatedScoresobject that consists of an array ofvalue/scorepairs. The value ofvalueconsists of the identifier for a specific predictor, and it takes the form${details.userLocationAnomaly.level}, where the string betweendetailsandlevelis the compact name of the relevant predictor. The value ofscoreis the score you want to assign to that predictor when it is determined that there is a high risk for the predictor. If it is determined that there is medium risk, the predictor will automatically be assigned a score equal to half of the value you specified for high risk. -
The array in
condition.aggregatedScoresmust be identical in the MEDIUM policy that you define and the HIGH policy that you define.
{
"id": "944fa7b4-e280-4932-80e7-01853ac9ce6d",
"name": "aa",
"default": false,
"defaultResult": {
"level": "Low"
},
"riskPolicies": [
{
"name": "ANONYMOUS_NETWORK_DETECTION",
"result": {
"level": "HIGH"
},
"condition": {
"value": "${details.anonymousNetworkDetected}",
"equals": true
}
},
{
"name": "GEOVELOCITY_ANOMALY",
"result": {
"level": "MEDIUM"
},
"condition": {
"value": "${details.impossibleTravel}",
"equals": true
}
},
{
"name": "Medium score policy",
"result": {
"level": "MEDIUM"
},
"condition": {
"type" : "AGGREGATED_SCORES",
"aggregatedScores": [
{
"value": "${details.userLocationAnomaly.level}",
"score": 40
},
{
"value": "${details.anonymousNetwork.level}",
"score": 60
},
{
"value": "${details.ipRisk.level}",
"score": 40
}
],
"between": {
"minScore": 700,
"maxScore": 900
}
}
},
{
"name": "High score policy",
"result": {
"level": "HIGH"
},
"condition": {
"type" : "AGGREGATED_SCORES",
"aggregatedScores": [
{
"value": "${details.userLocationAnomaly.level}",
"score": 40
},
{
"value": "${details.anonymousNetwork.level}",
"score": 60
},
{
"value": "${details.ipRisk.level}",
"score": 40
}
],
"between": {
"minScore": 900,
"maxScore": 1000
}
}
}
]
}
Condition type
The condition.type field indicates the type of policy you are defining. It can take any of the following values:
-
AGGREGATED_SCORES
-
AGGREGATED_WEIGHTS (deprecated)
-
VALUE_COMPARISON
-
IP_RANGE (for override policies or custom predictors)
Risk staging policy set
Risk staging policy allows you to test a policy set in parallel with another policy set. You link an existing policy set to the test policy set with a triggers object in the existing policy set, which points to the test policy set in its triggers.policySet object. Every time the existing policy set runs, it triggers the test policy set to also run. While in staging, the test policy set runs but only records its evaluation. A trigger expires 3 months from when it is set. Use Update Risk Policy Set to add the triggers object to an existing policy set.
|
You can use the default policy set to trigger a test policy set in staging, but you cannot put the default policy in staging. In terms of the data model, the default policy set can contain a |
Targeted risk policies
For standard risk policies, you must choose the risk policy to pass to the risk evaluation. Targeted risk policies allow you to define risk policies for different "targets" - combinations of transaction types, user groups, and applications that are being accessed. You can then order the targeted risk policies that you defined. When a risk evaluation is carried out, these targeted policies are processed in the order that you specified. The risk policy that is ultimately used for the risk evaluation will be the first one whose conditions (transaction type, user group, application) are met.
The following JSON snippet shows how to specify the target for a risk policy. For details, refer to the targets object in the Risk policies data model and the Create Risk Policy Set - Targeted Policy with Mitigations example.
"targets":{
"condition": { "and": [{
"list": ["AUTHENTICATION", "AUTHORIZATION"],
"contains": "${event.flow.type}"
},
{
"list": ["Sales"],
"contains": "${event.user.groups}"
},
{
"list": ["6b6f867b-d768-4c2c-a9b6-6816da00d824", "845c9918-94d7-430c-b3d8-eafafc215fd9"],
"contains": "${event.targetResource.id}"
}]
}
}
Using mitigations in your policies
You can choose to include mitigations in your risk policies. In this context, a mitigation is an action that you recommend if a given condition is met, for example, deny access if the email reputation predictor indicates high risk. In situations where the condition is met, the action that you recommended be taken is returned in the risk evaluation response as the value of the result.mitigations[].action field.
The following JSON snippet shows how to define mitigations in a risk policy (within the riskPolicies array). For details, refer to the result.mitigations array in the Risk policies data model and the Create Risk Policy Set - Targeted Policy with Mitigations example.
{
"name" : "USER_LOCATION_ANOMALY",
"result" : {
"mitigations" : [ {
"action" : "CUSTOM",
"customAction" : "CustomActionForUserLocationAnomaly"
}],
"type" : "MITIGATION"
},
"condition" : {
"value" : "${details.userLocationAnomaly.level}",
"equals" : "High",
"type" : "VALUE_COMPARISON"
}
},
{
"name" : "VELOCITY",
"result" : {
"mitigations" : [ {
"action" : "DENY_AND_SUSPEND"
} ],
"type" : "MITIGATION"
},
"condition" : {
"value" : "${details.ipVelocityByUser.level}",
"equals" : "High",
"type" : "VALUE_COMPARISON"
}
},{
"name" : "USER_RISK_BEHAVIOR",
"result" : {
"mitigations" : [ {
"action" : "VERIFY"
} ],
"type" : "MITIGATION"
},
"condition" : {
"value" : "${details.userBasedRiskBehavior.level}",
"equals" : "Medium",
"type" : "VALUE_COMPARISON"
}
},
{
"name" : "EMAIL_REPUTATION",
"result" : {
"mitigations" : [ {
"action" : "MFA",
"mfaAuthenticationPolicyId" : "{{deviceAuthenticationPolicyID}}"
} ],
"type" : "MITIGATION"
},
"condition" : {
"value" : "${details.emailReputation.level}",
"equals" : "High",
"type" : "VALUE_COMPARISON"
}
},
{
"name" : "IP_REPUTATION",
"result" : {
"mitigations" : [ {
"action" : "APPROVE"
} ],
"type" : "MITIGATION"
},
"condition" : {
"value" : "${details.ipRisk.level}",
"equals" : "Low",
"type" : "VALUE_COMPARISON"
}
}
Base risk policy set data model
| Property | Type | Required? | Mutable? | Description |
|---|---|---|---|---|
|
Date |
N/A |
Read-only |
The date and time the resource was created (format ISO-8061). |
|
Boolean |
Optional |
Mutable |
Indicates whether this risk policy set is the environment’s default risk policy set. This is used whenever an explicit |
|
Object |
Optional |
Mutable |
Contains the default result returned if none of the conditions in the policy are evaluated to true. At this time, the |
|
String |
Optional |
Mutable |
A description for this policy set. Valid characters consist of any Unicode letter, mark (for example, accent, umlaut), numeric character, punctuation character, or space. Maximum size is 1024 characters. |
|
String |
Required |
Immutable |
The environment resource’s unique identifier. |
|
Array |
N/A |
Read-only |
The IDs of the risk predictors that are evaluated in the policy. Included in responses to requests to get risk policies. |
|
String |
Required |
Immutable |
The resource’s unique identifier. |
|
String |
Required |
Mutable |
The name for this policy set. Valid characters consist of any Unicode letter, mark (such as, accent, umlaut), # (numeric), / (forward slash), . (period), ' (apostrophe), _ (underscore), space, or - (hyphen). Maximum size is 256 characters. |
|
Array |
Required |
Mutable |
The conditions associated with this policy set. Refer also to [Risk policies data model]{#risk-policies-data-model} below. |
|
Array |
N/A |
Read-only |
The user groups specified in the policy target that the current user belongs to. |
|
String |
N/A |
Read-only |
The name of the user group. |
|
Array |
Optional |
Mutable |
The |
|
Object[] |
Optional |
Mutable |
Array that contains trigger definitions for staging mode. |
|
String |
Required |
Immutable |
Trigger type; must be |
|
Object |
Required |
Immutable |
Contains the policy set identifier to trigger. |
|
String |
Required |
Immutable |
UUID of the policy set to trigger in staging mode. |
|
String |
Required |
Immutable |
Date and time at which the trigger expires. |
|
Date |
N/A |
Read-only |
The date and time the resource was last updated (format ISO-8061). |
Risk policies data model
This table lists the fields and objects that can be included in each of the elements in the riskPolicies array.
| Property | Type | Required? | Mutable? | Description |
|---|---|---|---|---|
|
Object |
Required |
Mutable |
Contains the condition logic that determines when a policy is evaluated to true and when it is evaluated to false. |
|
Array |
Required/Optional |
Mutable |
Required for score-based policies. The elements in the array are |
|
String |
Required |
Mutable |
Text that identifies a specific risk predictor in the environment. It uses the form |
|
Integer |
Required |
Mutable |
The score you want to assign to the predictor when it is determined that there is a high risk for the predictor. Value should be between 0 and 100. If it is determined that there is medium risk, the predictor will automatically be assigned a score equal to half of the value you specified for high risk. |
|
String |
Optional |
Mutable |
When defining an override or mitigation, use |
|
String |
Optional |
Mutable |
When defining an override or mitigation, use |
|
String |
Required |
Mutable |
Indicates the type of policy you are defining. Can be one of the following values: AGGREGATED_SCORES, AGGREGATED_WEIGHTS (deprecated), VALUE_COMPARISON, and IP_RANGE (for override policies or custom predictors). |
|
Integer |
Required/Optional |
Mutable |
Required for policies of type AGGREGATED_SCORES or AGGREGATED_WEIGHTS. The beginning of the risk score range that will be translated into the specified risk level (MEDIUM or HIGH). Must be between 0 and 1000. |
|
Integer |
Required/Optional |
Mutable |
Required for policies of type AGGREGATED_SCORES or AGGREGATED_WEIGHTS. The end of the risk score range that will be translated into the specified risk level (MEDIUM or HIGH). Must be between 0 and 1000. |
|
Date |
Required |
Immutable |
The date and time the resource was first created (format ISO-8061). |
|
String |
Optional |
Mutable |
A description for this risk policy. Valid characters consist of any Unicode letter, mark (for example, accent, umlaut), # (numeric), / (forward slash), . (period), ' (apostrophe), _ (underscore), space, or - (hyphen). Maximum size is 1024 characters. |
|
String |
Required |
Immutable |
The environment resource’s unique identifier. |
|
String |
Required |
Immutable |
The resource’s unique identifier. |
|
String |
Required |
Mutable |
The name to use for the condition. Valid characters consist of any Unicode letter, mark (for example, accent, umlaut), # (numeric), / (forward slash), . (period), ' (apostrophe), _ (underscore), space, or - (hyphen). Maximum size is 256 characters. |
|
Integer |
N/A |
Read-only |
The index of the element in the |
|
Object |
Required |
Mutable |
The |
|
String |
Required |
Mutable |
Contains the risk level that is returned if the condition is evaluated as true. If several policies are evaluated as true, the result related to the lowest priority condition is returned. For more information, refer to the Result attribute data model in Risk Evaluations. |
|
Array |
Optional |
Mutable |
For mitigations that you define, contains the action that is being recommended if the specified condition is met. |
|
String |
Required |
Mutable |
The action that is being recommended if the condition specified for the mitigation is met. Can take any of the following values: |
|
String |
Optional |
Mutable |
If you set the |
|
String |
Optional |
Mutable |
If you set the |
|
String |
Optional |
Mutable |
If you set the |
|
String |
Optional |
Mutable |
If you set the |
|
String |
Optional |
Mutable |
Can be one of two values: |
|
Object |
Optional |
Mutable |
For targeted policies, used to define the conditions for applying the policy. |
|
Object |
Optional |
Mutable |
Used to specify the conditions for applying the policy - the type of flows, the user groups, and the applications that are being accessed. |
|
Array |
Optional |
Mutable |
Array of the conditions for applying the policy. It is mandatory to include in the array the relevant transaction types. The relevant user groups and applications are optional. Each element in the array contains the target transaction types/user groups/applications and the event attribute that is checked. |
|
Array |
Optional |
Mutable |
Used to list the strings for the target transaction types, user groups, or applications, for example, |
|
String |
Optional |
Mutable |
The event attribute that is checked for the values specified in the |
|
String |
N/A |
Read-only |
Included in risk policy responses. For transaction types, value returned is |
|
String |
N/A |
Read-only |
Included in risk policy responses for targeted policies. Value returned is |
|
Date |
Required |
Immutable |
The date and time the resource was last updated (format ISO-8061). |
Risk policies events generated
Refer to Audit Reporting Events for the events generated.