Project level Policies
Policies added to a project can be set to a scope, which further applies to all the resources in a project. For example, if a policy is added to the Proxy Request scope, all the resources will have this policy processed first.
Go to the Project policy scope tab to assign the policy to any of the scopes mentioned below:
- Proxy Request
- Target Request
- Proxy Response
- Target Response
- Error
Adding policies at the Project level
To add a policy to a particular scope, perform the following actions on the Project policy scope panel:
- Click the Policies button to view the list of policies present in the project.
- Darg and drop the policy to a scope as required.
- Click the More actions icon in the scope cell and select the server group from the drop-down to add the policy to the server group required.
To attach another policy to the added policy, drag and drop it to one of the two endpoints of the previous policy.
Drag the policy to the arrow mark of the desired endpoint and leave it when the icon indicates to do so.
Click Save to apply the changes to the project.
Configuration cannot be changed from this screen; to change policy configuration, go to the Configurations section.
Changing the order of policy execution
The order in which the policies are applied to the attached scope can be identified by the arrow mark between the policies.
To change the order of execution, drag and drop the policy to a different endpoint.
Drag the policy to the arrow mark of the other policy's endpoint and leave it when the icon indicates to do so.
Notice the change in the order of policies.
Removing an added Policy
To remove an added policy, select the policy and click the Remove icon.
Error scope
The policies in this scope will be executed only when a policy that is added to any of the other four scopes fails to execute.
In the above example, Decrypt Policy present in the target response scope has failed, hence the execution flow has moved on to the policies present in the error scope i.e Build Message Policy in this case. Thus, a customized message rather than an error message is obtained in the response payload section.
Whenever a change is made, click the Save icon to apply the changes.