Policy Templates
-
Policy templates are currently supported only at the endpoint level. Support for policy templates across multiple scopes (Area-level, Org-level, and API-level), audit log records on the Audit History page, and chaining policy limits across multiple scopes is not available at this time. Contact your Boomi Account Representative for more information.
-
The Policy Templates option in Control Center is only available if it is enabled for your area. If it is unavailable, contact the Boomi Account Representative to enable it.
Today, you configure pre-processing and post-processing policies individually for each endpoint on the Call Transformation page. If several endpoints need the same set of policies, you have to repeat that configuration for every one of them.
Policy templates in Cloud API Management let you configure a set of policies (pre-processing and post-processing) once and apply them across multiple endpoints, making the same configuration reusable rather than configuring them separately for each endpoint. At the endpoint level, you can create, enable or disable, modify, duplicate, view, and delete policy templates, override existing ones, and manage individual policy execution within a template and across multiple attached policy templates.
You can create a policy template from the Policy Templates (Manage > Policy Templates) page. Creating a policy template is similar to adding pre-processing and post-processing policies for an API endpoint on the Call Transformation page, and grouping all the logic together in the template so that multiple endpoints of an API can use the same set of rules.
On the Endpoint Policies page, you can attach more than one policy template to the same endpoint, and Control Center checks for duplicate templates and chain conflicts between the templates you attach.
You can also customize an existing attached policy template by overriding it on the Endpoint Policies page. When an attached policy template is shared across two endpoints, and one of your endpoints has slightly different requirements compared to the other endpoint, then instead of modifying the original attached policy template, you can override it and then customize the "Overridden" policy template as per your requirement without changing the original template or affecting other endpoints that use it. Refer to Overriding an attached policy template for more information.
How it works
Policy execution behavior
Within a policy template
Within a policy template, you can add multiple policies as needed and modify their sequence. Traffic Manager executes the policies in the policy template in the order you added them.
Between multiple policy templates at the same scope
When multiple policy templates are attached at the same scope level, for example, endpoint-level, Traffic Manager executes the policies between attached policy templates in the order you add them.
Same policy applied to multiple templates at the same scope
When the same policy appears in multiple attached policy templates at the endpoint level, Traffic Manager executes only the first occurrence of that policy based on template attachment order and drops all duplicate instances.
To control which instance of a duplicate policy executes, adjust the order in which you attach the policy templates on the Endpoint Policies page. The first attached template's policy instance will run.
Chaining policy constraint
Automatic chaining behavior
When you add or replace a policy in the policy template, Control Center automatically chains and validates the policies in the order you add them in the policy template.
Chaining policy limit within a template
Control Center enforces a limit of one chaining policy per template. If you add more than one, the system rejects the additional chaining policy.
Chaining policy limit across multiple templates at the endpoint level
Control Center enforces a one-chaining-policy limit across multiple policy templates attached at the endpoint level on the Endpoint Policies page. When attaching multiple policy templates to an endpoint, ensure the attached templates together have only one chaining policy. If the attached templates together contain more than one chaining policy (whether the same or different), the system rejects the action.
Fail-fast execution
Control Center enforces fail-fast execution when multiple policies are added in a policy template. A failure in a policy halts subsequent policy execution in the flow.
Consider a policy template with three policies attached at the endpoint level (on the Endpoint Policies page). If the first policy runs successfully but the second policy fails, Control Center halts execution, so the third policy never runs.