Ingest Azure APIM
Collect Azure APIM data with Cortex Cloud.
Integrate Azure APIM with Cortex Cloud to start scanning its APIs for potential threats and vulnerabilities.
You need to set up a policy that enables you to customize the behavior of managed APIs. You can configure the sending of HTTP request/response data to Cortex Cloud. The data is saved and analyzed by API security modules, which provide information on the security risks associated with the APIs.
Settings in Cortex Cloud
In Cortex Cloud, set up the Azure API Management data source to integrate with the Azure API Gateway.
From Settings → Data Sources & Integrations , click + Add New, search for Azure API Management, then hover over it and click Add or Add Instance.
In the APIM Collector wizard, enter a relevant name and then click Create and Proceed.
Copy the key and paste it somewhere so that you can access it for later. If you forget to record the key and close the window, you must generate a new key and repeat this process.
Click Close.
Settings in Azure APIM policy
Configure an inbound and outbound policy to send HTTP traffic data of the APIs to Cortex Cloud. You can configure a policy for individual operations (endpoints) or all operations of a single API.
Follow the steps to configure the policy.
Log in to Microsoft Azure.
Go to API Management services and select the relevant service.
From the left-hand menu, select APIs → Named values.
Configure the settings in each section. Follow the listed order.
Named values: Add these values:
cloud-account-id
Type: Plain
Value: The UUID you saved from the previous step.
cloud-resource-group
Type: Plain
Value: The resource group you saved from the previous step.
cortex-api-key
Type: Secret
Value: The token that you saved from data sources in Cortex.
cortex-api-url
Type: Plain
Value: The API URL from data sources in Cortex.
cortex-http-body-size-limit-bytes
Type: Plain
Value: 131072
APIs: From the left-hand menu, go to APIs → APIs.
You can create a policy on a specific API or choose to create a policy on all APIs.
The Policies screen opens. There are three sections:
<inbound><backend><outbound>
The
<inbound>includes the request before it's sent to the<outbound>. The parameters are saved before they're sent.Add the following inside the
<inbound>:The
<outbound>includes the request before it returns a response.Add the following inside the <outbound> element, at the end, after the other child elements:
Important
If you want to add additional data to the <outbound>, add it at the start of the <outbound> code.
3. Click Save. Your APIM traffic collection is now configured. Request and response data for the configured endpoints are sent to Cortex Cloud for inspection by API security modules.
5. Go to Azure API Management data source to validate that data is ingested from Azure APIM.
6. Do the following to remove the integration of Azure APIM with Cortex Cloud:
Remove the snippets you added to the policies.
Remove the named values from the API service.
Delete the HTTP log collector from Data Sources & Integrations in Cortex.
Last updated
Was this helpful?
