Configuring Template Download Location for Policies

A policy template, which is a deployable JAR file, contains the business logic for a policy. Each type of policy has a different template based on the rules and logic to be implemented.

Before a policy is applied to an API, the policy template is downloaded. When an application with applied policies is deployed to a runtime, API gateway requests API Manager for the corresponding policies to be applied to the API.

If the required policy templates are not already available in the runtime, API gateway requests API Manager for the location from which to download them. By default, this location is the legacy system, but you can configure the runtime to download templates from a specified source using the following system property:

anypoint.platform.policy_template_source=source_value

You specify one of the following values for the source_value variable, based on the template location:

Source Value Description

external

(Default) Denotes that policy templates are to be retrieved from the legacy system. Use this default setting to maintain compatibility with previously configured firewalls.

internal

Denotes that policy templates are to be retrieved from the new system. This option provides additional reliability due to internal rerouting of the requests when a server becomes unavailable.

The following code snippet shows an example of how to set the template source using the command line:

./bin/mule -M-Danypoint.platform.policy_template_source=internal

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub