Defining, packaging, and publishing a catalog-scoped policy for the API Gateway
Create a catalog-scoped, user-defined policy that can be used in API assemblies within the catalog where the policy is published.
About this task
When a catalog-scoped policy is published, you can only use it in the API Assembler's Policy palette for APIs contained within the same catalog where the policy was published. Complete the following tasks to define, package, and publish the catalog-scoped policy.
zip
command on the command line with the following flags:
-x ".DS_Store" -x "__MACOSX"
Including the flags prevents the auto-generated .DS_Store and __MACOSX files from being added to the zip.
Step 1: Define a catalog-scoped policy for API Gateway
Use the DataPower Web GUI to define a new policy that can be used in API assemblies within the catalog where the policy is published.
Procedure
Step 2: Package and publish a catalog-scoped policy for API Gateway
Decide how you want the new catalog-scoped policy to be managed, and then publish it to make it available to API assemblies within a particular catalog.
About this task
Be sure to complete Step 1: Define a catalog-scoped policy for API Gateway before attempting to package and publish the new policy.
There are two methods for packaging and publishing a user-defined policy, based on how you want the policy to be managed:
Step 2, Option A: Package and publish a catalog-scoped policy directly in the DataPower configuration
Package and publish a catalog-scoped policy so it can be stored directly on the DataPower API Gateway.
About this task
When you store a catalog-scoped policy on the DataPower API Gateway, the policy exists in the gateway's startup domain configuration and will be unaffected by the API Manager lifecycle. If you want to store the catalog-scoped policy directly on DataPower, you do not need to package it for API Manager. Instead, complete the following steps.
Procedure
- Import the custom policy created in Step 1: Define a catalog-scoped policy for API Gateway to the application domain for every DataPower node in the cluster.
- Proceed to Step 3: Create and publish a policy.yaml file, where you will create a file that describes the new policy so that API Manager can support it.
Step 2, Option B: Package and publish a catalog-scoped policy as a gateway extension that API Connect manages
Package and publish a catalog-scoped policy as a gateway extension in API Connect.
Before you begin
The xml-manager must be enabled on the default domain of every gateway that will have a gateway-extension published to it.
About this task
When you publish a catalog-scoped policy as a gateway extension in API Connect, it is subject to the API Manager lifecycle. The individual assembly functions will not be added to the API Connect Gateway Service (only global-scoped policies are added to the service).
Procedure
Step 3: Create and publish a policy.yaml file
Create a file that describes the properties of the catalog-scoped policy, and then publish it to make it accessible to API Manager.