|
6 | 6 |
|
7 | 7 | --- |
8 | 8 |
|
9 | | -Access policies are properties of applications. When setting up an Access application, you will be prompted to create at least one policy for the application. You can go back and create, edit, or delete policies at any time. |
| 9 | +import {Tabs, TabItem } from "~/components"; |
| 10 | + |
| 11 | +Access policies define the users who can log in to your Access applications. You can create, edit, or delete policies at any time and reuse them across multiple applications. |
10 | 12 |
|
11 | 13 | ## Create a policy |
12 | 14 |
|
@@ -80,3 +82,30 @@ The policy tester reports the following information: |
80 | 82 | * Whether the user is allowed or denied access to the application based on all configured policies. |
81 | 83 | * The user's identity from their most recent Access login attempt. |
82 | 84 | * Whether the user matches individual Allow, Block, or Bypass policies. |
| 85 | + |
| 86 | +## Legacy policies |
| 87 | + |
| 88 | +Legacy policies are scoped to a specific application and cannot be added to newly created Access applications. |
| 89 | + |
| 90 | +### Migrate to reusable policies |
| 91 | + |
| 92 | +To migrate legacy policies to reusable policies: |
| 93 | + |
| 94 | +1. [Create a reusable policy](#create-a-policy) that will replace the legacy policy. |
| 95 | +2. Go to the application associated with the legacy policy. |
| 96 | +3. Add the reusable policy to the application and remove the legacy policy. |
| 97 | +4. Repeat these steps for each legacy policy. If you have duplicate legacy policies, you can replace them with a single reuseable policy. |
| 98 | + |
| 99 | +### Convert a legacy policy |
| 100 | + |
| 101 | +You can use the API to convert a legacy policy into a reusable policy. Once converted, you will only be able to manage the policy using the [reusable policies endpoints](/api/resources/zero_trust/subresources/access/subresources/policies/). |
| 102 | + |
| 103 | +To convert a legacy policy, make a `PUT` request with an empty request body: |
| 104 | + |
| 105 | +```bash |
| 106 | +curl --request PUT \ |
| 107 | +https://api.cloudflare.com/client/v4/accounts/{account_id}/access/apps/{app_id}/policies/{legacy_policy_id}/make_reusable \ |
| 108 | +--header "Authorization: Bearer <API_TOKEN>" \ |
| 109 | +``` |
| 110 | + |
| 111 | +A success response returns the policy details. The policy is now removed from `/access/apps/{app_id}/policies` and available at `/access/policies/{policy_id}`. |
0 commit comments