Deploying PingIntelligence policies in Akana API gateway is divided into three parts:

  • Adding an input script (config.js).
  • Adding PingIntelligence policy and applying the policy to APIs.
  • Adding RetainerHeader policy and applying the policy to APIs.

    Complete the following steps to download and extract the PingIntelligence policy:
    1. Download the PingIntelligence policy.
    2. Extract the policies by using the following command.

      # tar –zxvf <<file name>>

      For example,

      # tar –zxvf pi-api-akana-policy-4.1.1.tar.gz

Add Input script

Complete the following steps to add input script to API gateway:

  1. Login to Akana Policy Manager, navigate to the Tenant and click Scripts.
  2. Click Add Script.
  3. Enter Script Name and Script Description, and click Next.

  4. Select JavaScript as Language from the list.
  5. Copy the contents of config.js script provided by PingIntelligence and paste them into the Source.

  6. Substitute the values of ‘Service_QName’, ‘Interface_Name’, and ‘Operation_Name’ that were captured in Capture ASE details step.This needs to be performed for both primary and secondary ASE nodes. The below table lists the variables in config.js that needs to be populated.
    Variable Purpose
    ase_token Variable to hold ASE sideband authentication token.
    primary_ase_service Service QName for primary ASE.
    primary_ase_interface Interface name for primary ASE.
    primary_ase_request_operation Operation Name for posting Request Metadata in primary ASE.
    primary_ase_response_operation Operation Name for posting Response Metadata in primary ASE.
    secondry_ase_service Service QName for secondary ASE
    secondary_ase_interface Interface name for secondary ASE
    secondary_ase_request_operation Operation Name for posting Request Metadata in secondary ASE.
    secondary_ase_response_operation Operation Name for posting Response Metadata in secondary ASE.

    Here is a sample substitution snippet for reference:

    var ase_token = "ASE-Token-123";
    /*Primary ASE Configuration*/
    var primary_ase_service = "{pi-as-ase-primary_0.0.0}svc_314492f1-ecdc-4184-93a0-57ee2258154b.smshargi.sandbox";
    var primary_ase_interface = "{pi-as-ase-primary_0.0.0}pi-as-ase-primary_PortType_0";
    var primary_ase_request_operation = "postRequestMetadata";
    var primary_ase_response_operation = "postResponseMetadata";
    /************************/
    /*Secondary ASE Configuration*/
    var secondry_ase_service = "{pi-as-ase-primary_0.0.0}svc_314492f1-ecdc-4184-93a0-57ee2258154b.smshargi.sandbox";
    var secondary_ase_interface = "{pi-as-ase-primary_0.0.0}pi-as-ase-primary_PortType_0";
    var secondary_ase_request_operation = "postRequestMetadata";
    var secondary_ase_response_operation = "postResponseMetadata";
    
    
  7. Click Finish, and then click Close.

Add PingIntelligence policy

Complete the following steps to add a PingIntelligence policy to Akana gateway:

  1. Login to Akana Policy Manager and navigate to the Tenant. Under Policies click Operational Policies.
  2. Select Add Policy option. Select Policy Type as Private Operational Script Policy from the list and click Next.