Akamai observes traffic at the Akamai edge, which is traffic between external clients and your APIs on domains you own and control. To also have Akamai analyze traffic that passes through Omni Gateway but isn’t inspected at the Akamai edge, apply the Akamai API Security (Omni Gateway) policy to your API instances. This traffic includes:
-
Internal traffic between services (east-west traffic).
-
External traffic to endpoints you can’t register at the Akamai edge, such as MuleSoft-managed CloudHub endpoints.
The policy forwards this traffic to Akamai API Security in asynchronous batches. Forwarding doesn’t block requests. If the Akamai engine is unavailable, forwarding fails open and your API traffic isn’t affected.
Akamai owns and maintains this policy, and it’s separate from the Akamai correlation policy that the scanner applies. For findings from forwarded traffic to appear on the related API in Portfolio, apply both policies to the API instance. The correlation policy adds the correlation data that Akamai uses to match a finding to its API, and the Akamai API Security (Omni Gateway) policy forwards that data with the traffic it captures.
You create the policy in Akamai API Security, publish it to Anypoint Exchange, and apply it to your APIs in Anypoint API Manager.
|
|
To monitor traffic, set PREVENTION_ENABLED to false when you apply the policy. In this capture-only configuration, the policy forwards traffic for analysis without blocking requests.
The policy can also block requests from attackers that Akamai API Security detects and return a 403 response. Blocking is an opt-in control that runs synchronously in the request path, so Akamai engine availability and the policy’s timeout settings can affect your API traffic. Before you enable prevention, review the policy parameters in the Akamai documentation.
|
Before You Apply the Policy
-
API instances that run on Omni Gateway.
-
The Akamai correlation policy applied to those API instances. See Set Up the Akamai Scanner.
-
Network access from Omni Gateway to your Akamai API Security engine over HTTPS.
-
The Admin role in Akamai API Security with the Traffic Source & Prevention permission.
-
Permission to publish assets to Anypoint Exchange and apply policies in Anypoint API Manager.
-
Anypoint CLI with the PDK plugin, Node.js, and Rust installed on the machine where you install the policy. See Prerequisites for Omni Gateway Policy Development Kit (PDK).
Apply the Policy
-
In Akamai API Security, create a MuleSoft traffic source integration for Omni Gateway, and then download the policy.
-
In Anypoint Platform, create a connected app that acts on its own behalf (client credentials) with the Exchange Contributor scope, and then copy the client ID and client secret.
-
Configure Anypoint CLI with the connected app credentials, your business group ID, and your environment ID, and then run the installation script included in the policy download.
-
In Anypoint API Manager, apply the Akamai API Security (Omni Gateway) policy in one of these ways:
-
To apply the policy to all APIs in an environment, add it as an automated policy. In Advanced Options, set Rule of application to Omni gateways only. See Applying Automated Inbound Policies.
-
To apply the policy to specific APIs, add it as an inbound policy on each API.
-
Move the Akamai API Security (Omni Gateway) policy to the top of the policy list, above the Akamai correlation policy.
With this order, the correlation policy adds correlation data to the response before the Akamai API Security (Omni Gateway) policy captures it. If the order is reversed, Akamai receives the traffic without correlation data, so findings from that traffic don’t appear on the related API in Portfolio. No error is reported.