Skip to content

Commit 78bc8ad

Browse files
Merge pull request #5768 from okta/tc-okta-1016076-add-example-oamp-guide
Add device conditions example to OAMP
2 parents eb941ab + 71f42fa commit 78bc8ad

File tree

1 file changed

+83
-1
lines changed
  • packages/@okta/vuepress-site/docs/guides/okta-account-management-policy/main

1 file changed

+83
-1
lines changed

packages/@okta/vuepress-site/docs/guides/okta-account-management-policy/main/index.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ The policy allows for the following specific expressions:
112112
| `accessRequest.{operation}`| `accessRequest` references the access context of the request. `operation` references the account management operation: `enroll`, `unenroll`, `recover`, or `unlockAccount`. | String |
113113
| `accessRequest.authenticator.{id}` | `accessRequest` references the access context of the request. `authenticator.id` references an optional authenticator `id`, for example, the `id` of a custom authenticator. | String |
114114
| `accessRequest.authenticator.{key}` | `accessRequest` references the access context of the request. `authenticator.key` references the [authenticator key](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/createPolicyRule!path=0/actions/appSignOn/verificationMethod/0/constraints&t=request). | String |
115+
| <ApiLifecycle access="ea" />`device.profile.{property}` | `device` references the device context of the request. `profile` references the device profile. `property` references device properties such as `registered` or `managed`. <br></br> For information about expressions related to device context, see [Expression Language attributes for devices](https://help.okta.com/okta_help.htm?type=oie&id=csh-fp-policy-custom-expression). | String |
115116

116117
### Condition Object example
117118

@@ -286,7 +287,7 @@ curl --location --request PUT '{yourSubdomain}/api/v1/policies/{policyId}/rules/
286287
--data '{
287288
"id": "{ruleId}",
288289
"name": "sdfsd",
289-
"priority": 1,
290+
"priority": ,
290291
"status": "ACTIVE",
291292
"conditions": {
292293
"people": {
@@ -341,6 +342,87 @@ There are no changes to the user experience when you move password recovery and
341342
- [User enumeration prevention](https://help.okta.com/okta_help.htm?type=oie&id=ext_Security_General): Isn't supported in recovery scenarios with the Okta account management policy.
342343
If a user doesn't meet the requirements of your Okta account management policy, they can't update their profile settings. All fields are read-only, including the Reset, Update, and Remove options for their existing security methods. Also, the authenticators that they haven't enrolled are hidden.
343344
345+
## Add a rule for device conditions
346+
347+
<ApiLifecycle access="ea" />
348+
349+
You can add device conditions to your Okta account management policy rules. Device conditions let you enforce rules based on whether a device is registered or managed. You can also associate a [device assurance policy](/docs/guides/device-assurance-policies/main/) with a rule.
350+
351+
For example, you can create a rule where users can reset their password only when they are using a registered device. Registered devices are devices that are enrolled in Okta Verify.
352+
353+
This request is similar to the request to [add a rule for password recovery and account unlock](#add-a-rule-for-password-recovery-and-account-unlock). However, keep in mind the following:
354+
355+
* Use the same value for `policyId`.
356+
* Set the value of `priority` above the catch-all rule but below the first [phishing-resistant authenticator](#add-a-rule-for-your-first-phishing-resistant-authenticator) (if you added it). Make sure that the first phishing-resistant authenticator rule stays at priority 1.
357+
* Set the `device.registered` property to `true`.
358+
* Set the `elCondition` with an expression that requires a registered device for password recovery.
359+
* Your user doesn't need to sign in from a network zone.
360+
361+
> **Note:** You can also configure device conditions without using an EL expression. Remove the `elCondition` object from your request.
362+
363+
If you want to add this rule using the Admin Console, see [Add a rule for authenticator enrollment](https://help.okta.com/okta_help.htm?type=oie&id=ext-oamp-enroll-pr-auth).
364+
365+
### Example device condition request
366+
367+
```bash
368+
curl --location --request POST 'https://{yourOktaDomain}/api/v1/policies/{policyId}/rules' \
369+
--header 'Accept: application/json' \
370+
--header 'Content-Type: application/json' \
371+
--header 'Authorization: SSWS {apiToken}' \
372+
--data '{
373+
"name": "Require registered device for password recovery",
374+
"priority": 1,
375+
"type": "ACCESS_POLICY",
376+
"system": false,
377+
"conditions": {
378+
"people": {
379+
"groups": {
380+
"include": []
381+
}
382+
},
383+
"network": {
384+
"connection": "ANYWHERE"
385+
},
386+
"riskScore": {
387+
"level": "ANY"
388+
},
389+
"elCondition": {
390+
"condition": "accessRequest.authenticator.key == '\''okta_password'\'' && accessRequest.operation == '\''recover'\''"
391+
},
392+
"device": {
393+
"registered": true,
394+
"managed": true,
395+
"assurance": {
396+
"include": []
397+
}
398+
},
399+
"actions": {
400+
"appSignOn": {
401+
"access": "ALLOW",
402+
"verificationMethod": {
403+
"factorMode": "2FA",
404+
"type": "ASSURANCE",
405+
"reauthenticateIn": "PT1H",
406+
"constraints": [
407+
{
408+
"possession": {
409+
"required": true,
410+
"phishingResistant": "REQUIRED",
411+
"userPresence": "OPTIONAL"
412+
}
413+
}
414+
]
415+
}
416+
}
417+
}
418+
}
419+
}'
420+
```
421+
422+
### User experience
423+
424+
When a user attempts to reset their password or unlock their account, they must use a registered device to authenticate first.
425+
344426
## Use the legacy option
345427
346428
You might want to use the Okta account management policy for some processes but not for others. For example, you want to use the Okta account management policy for authenticator enrollment. However, for self-service password recovery, you want to keep using your password policy.

0 commit comments

Comments
 (0)