|
1 | 1 | ---
|
2 |
| -title: Protect APS in API Management with Defender for APIs |
3 |
| -description: Learn how to use Azure Defender for APIs to identify and protect API threat in your Azure API Management instance. |
| 2 | +title: Protect APIs in API Management with Defender for APIs |
| 3 | +description: Learn how to enable enhanced API security features in Azure API Management by using Microsoft Defender for Cloud. |
4 | 4 | services: api-management
|
5 | 5 | author: dlepow
|
6 | 6 |
|
7 | 7 | ms.service: api-management
|
8 | 8 | ms.topic: how-to
|
9 |
| -ms.date: 04/06/2023 |
| 9 | +ms.date: 04/14/2023 |
10 | 10 | ms.author: danlep
|
11 | 11 | ---
|
12 |
| -# Use Azure Defender for APIs to protect against API threats |
| 12 | +# Enable enhanced API security features using Microsoft Defender for Cloud |
13 | 13 | <!-- Update links to D4APIs docs when available -->
|
14 |
| -This article shows how to identify and protect against API threats exposed in your API Management instance by using Azure [Defender for APIs](https://aka.ms/apiSecurityOverview) (preview). Background about this feature and considerations for use are also provided. |
15 | 14 |
|
16 |
| -[!INCLUDE [api-management-availability-premium-dev-standard-basic](../../includes/api-management-availability-premium-dev-standard-basic.md)] |
| 15 | +Defender for APIs (preview), a new capability of Microsoft Defender for Cloud, offers full lifecycle protection, detection, and response coverage for APIs that are managed in Azure API Management. The service empowers security practitioners to gain visibility into their business-critical APIs, understand their security posture, prioritize vulnerability fixes, and detect active runtime threats within minutes. |
17 | 16 |
|
18 |
| -## Preview limitations |
| 17 | +This article shows how to use the Azure portal to enable Defender for APIs from your API Management instance and view a summary of security recommendations and alerts for onboarded APIs. You can also enable Defender for APIs directly in the Microsoft Defender for Cloud console, where more API security insights and inventory experiences are available. |
19 | 18 |
|
20 |
| -* Currently, Defender for APIs only discovers and analyzes REST APIs. |
21 |
| -* This feature isn't supported in the API Management [self-hosted gateway](self-hosted-gateway-overview.md). |
22 |
| -* This feature isn't supported for APIs in API Management [workspaces](workspaces-overview.md). |
23 |
| -* In [multi-region](api-management-howto-deploy-multi-region.md) deployments of API Management, some ML-based detections, data classification capabilities, and security insights that are available in the primary region currently don't work in secondary regions. In secondary regions, data residency requirements are still met. |
| 19 | +To learn more, see: |
24 | 20 |
|
25 |
| -## Benefits |
| 21 | +* [Microsoft Defender for APIs – Benefits and features](https://aka.ms/apiSecurityOverview) |
| 22 | +* [Microsoft Defender for Cloud](/azure/defender-for-cloud/defender-for-cloud-introduction) |
26 | 23 |
|
27 |
| -Defender for APIs, a part of Microsoft [Defender for Cloud](/azure/defender-for-cloud/defender-for-cloud-introduction), offers full lifecycle protection, detection, and response coverage for APIs. The service empowers security practitioners to gain visibility into their business-critical APIs, understand their security posture, prioritize vulnerability fixes, and detect active runtime threats within minutes. Currently, the service supports APIs managed in Azure API Management. |
| 24 | +[!INCLUDE [api-management-availability-premium-dev-standard-basic](../../includes/api-management-availability-premium-dev-standard-basic.md)] |
28 | 25 |
|
29 |
| -Defender for APIs has the following key capabilities: |
| 26 | +## Preview limitations |
30 | 27 |
|
31 |
| -* **API inventory** - Discover and catalog all APIs managed in API Management. |
| 28 | +* Currently, Defender for APIs discovers and analyzes REST APIs only. |
| 29 | +* Defender for APIs currently doesn't onboard APIs that are exposed using the API Management [self-hosted gateway](self-hosted-gateway-overview.md) or managed using API Management [workspaces](workspaces-overview.md). |
| 30 | +* Some ML-based detections and security insights (data classification, authentication check, unused and external APIs) for instances with [multi-region](api-management-howto-deploy-multi-region.md) deployments aren't supported in secondary regions. In such cases, data residency requirements are still met. |
32 | 31 |
|
33 |
| -* **API security insights** - Identify external, unused, and unauthenticated APIs, and attack paths, and provide hardening recommendations. |
| 32 | +## Prerequisites |
34 | 33 |
|
35 |
| -* **API data classification** - Classify APIs that handle sensitive data for risk prioritization. |
| 34 | +* At least one API Management instance in an Azure subscription. Defender for APIs is enabled at the level of a subscription. |
| 35 | +* One or more supported APIs must be imported to the API Management instance. |
| 36 | +* Permissions to [enable the Defender for APIs plan](azure/defender-for-cloud/permissions). |
| 37 | +* Owner or Contributor permissions on the API Management instance. |
36 | 38 |
|
37 |
| -* **OWASP API Top 10 threat detection** - Detect exploits using ML-based and rule-based detections, monitor API traffic for compromise. |
| 39 | +## Onboard to Defender for APIs |
38 | 40 |
|
39 |
| -* **Threat response** - Integrate or export alerts into SIEM systems for investigation and threat response workflows. |
| 41 | +Onboarding APIs to Defender for APIs is a two-step process: enabling the Defender for APIs plan, and onboarding unprotected APIs in your API Management instances. |
40 | 42 |
|
41 |
| -* **Integration with [cloud security graph](/azure/defender-for-cloud/concept-attack-path)** - Query API inventory, insights, and recommendations for prioritized remediation and attack path analysis. |
| 43 | +> [!CAUTION] |
| 44 | +> Onboarding APIs to Defender for APIs may increase compute, memory, and network utilization of your API Management instance. Do not onboard all APIs at one time if your API Management instance is running at high utilization. Use caution by gradually onboarding APIs, while monitoring the utilization of your instance (for example, using [the capacity metric](api-management-capacity.md)) and scaling out as needed. |
42 | 45 |
|
43 |
| -## Prerequisites |
| 46 | +### Enable the Defender for APIs plan for a subscription |
44 | 47 |
|
45 |
| -* One or more API Management instances in an Azure subscription. Defender for APIs is enabled at the level of an Azure subscription. |
46 |
| -* At least one REST API must be imported to an instance. |
| 48 | +1. Sign in to the [portal](https://portal.azure.com), and go to your API Management instance. |
47 | 49 |
|
48 |
| -## Onboard to Defender for APIs |
49 |
| -Onboarding APIs from Azure API Management to Defender for APIs is a two-step process: |
| 50 | +1. In the left menu, select **Microsoft Defender for Cloud (preview)**. |
| 51 | + |
| 52 | +1. Select **Enable Defender on the subscription**. |
50 | 53 |
|
51 |
| -1. First, enable the Defender for APIs plan for a subscription |
| 54 | + :::image type="content" source="media/protect-with-defender-for-apis/enable-defender-for-apis.png" alt-text="Screenshot showing how to enable Defender for APIs in the portal."::: |
52 | 55 |
|
53 |
| - 1. Sign in to the [portal](https://portal.azure.com), and go to **Defender for Cloud**. |
54 |
| - 1. In the left menu, select **Environment settings** |
55 |
| - 1. In **Defender plans**, enable **APIs**. |
| 56 | +1. On the **Defender plan** page, select **On** for the **APIs** plan. |
56 | 57 |
|
57 |
| - After the Defender for APIs plan is turned on, APIs in the API Management instances that are available for onboarding are listed on the **Recommendations** page. |
58 |
| -1. Next, onboard unprotected APIs to Defender for APIs |
| 58 | +1. Select **Save**. |
59 | 59 |
|
60 |
| - 1. In the portal, go to **Defender for Cloud** > **Recommendations**. |
61 |
| - 1. Search for **Defender for APIs**. |
62 |
| - 1. Under **Enable enhanced security features**, select **Azure API Management APIs should be onboarded to Defender for APIs**. |
63 |
| - 1. Select an API that you wish to onboard to Defender for APIs from the list of **Unhealthy** resources. |
64 |
| - 1. Select **Fix**. |
65 | 60 |
|
66 |
| -For details, see [Quickstart: Enabling enhanced API security features from Microsoft Defender for Cloud](https://aka.ms/apiSecurityApimOnboarding). |
| 61 | +### Onboard unprotected APIs to Defender for APIs |
67 | 62 |
|
68 |
| -> [!WARNING] |
69 |
| -> Onboarding APIs to Defender for APIs will increase compute and memory utilization by your API Management instance and may affect gateway performance. Onboard APIs gradually, monitor the gateway performance, and scale out the API Management instance as needed. For more information, see [Performance considerations](#performance-considerations). |
| 63 | +1. In the portal, go back to your API Management instance. |
| 64 | +1. In the left menu, select **Microsoft Defender for Cloud (preview)**. |
| 65 | +1. Under **Recommendations**, select **Azure API Management APIs should be onboarded to Defender for APIs**. |
| 66 | + :::image type="content" source="media/protect-with-defender-for-apis/defender-for-apis-recommendations.png" alt-text="Screenshot of Defender for APIs recommendations in the portal."::: |
| 67 | +1. On the next screen, review details about the recommendation: |
| 68 | + * Severity |
| 69 | + * Refresh interval for security findings |
| 70 | + * Description and remediation steps |
| 71 | + * Affected resources, classified as **Healthy** (onboarded to Defender for APIs), **Unhealthy** (not onboarded), or **Not applicable**, along with associated metadata from API Management |
| 72 | + |
| 73 | + > [!NOTE] |
| 74 | + > Affected resources include all API collections (that is, APIs and their associated operations) from all API Management instances under the subscription. |
| 75 | +
|
| 76 | +1. From the list of **Unhealthy** resources, select the API(s) that you wish to onboard to Defender for APIs. |
| 77 | +1. Select **Fix**, and then select **Fix resources**. |
| 78 | + :::image type="content" source="media/protect-with-defender-for-apis/fix-unhealthy-resources.png" alt-text="Screenshot of onboarding unhealthy APIs in the portal."::: |
| 79 | +1. Track the status of onboarded resources under **Notifications**. |
70 | 80 |
|
71 | 81 | > [!NOTE]
|
72 |
| -> Defender for APIs will take 30 minutes to generate its first security insights after onboarding an API. Thereafter, security insights are refreshed every 30 minutes. |
| 82 | +> Defender for APIs takes 30 minutes to generate its first security insights after onboarding an API. Thereafter, security insights are refreshed every 30 minutes. |
73 | 83 | >
|
74 | 84 |
|
75 |
| -## View security insights |
76 |
| - |
77 |
| -After APIs are onboarded and security insights are generated, view security insights in the portal. |
| 85 | +## View security coverage |
78 | 86 |
|
79 |
| -1. In the portal, go to **Defender for Cloud** > **Workload protections**. |
80 |
| -1. Select **API security**. |
| 87 | +After you onboard the APIs from API Management, Defender for APIs receives API traffic that will be used to build security insights and monitor for threats. Defender for APIs generates security recommendations for risky and vulnerable APIs. |
81 | 88 |
|
82 |
| -Review security insights for an onboarded API (called an *API collection* in Defender for APIs) or operation (*API endpoint*). |
| 89 | +You can view a summary of all security recommendations and alerts for onboarded APIs by selecting **Microsoft Defender for Cloud (preview)** in the menu for your API Management instance: |
83 | 90 |
|
84 |
| -## Performance considerations |
| 91 | +1. In the portal, go to your API Management instance and select **Microsoft Defender for Cloud (preview**) from the left menu. |
| 92 | +1. Review **Recommendations** and **Security insights and alerts**. |
85 | 93 |
|
86 |
| -Onboarding APIs to Defender for APIs can affect the performance of the API Management instance in which they're managed. Onboard APIs gradually and monitor your API Management instances for performance changes. Performance impacts by Defender for APIs can be mitigated by scaling or upgrading an API Management instance. |
| 94 | + :::image type="content" source="media/protect-with-defender-for-apis/view-security-insights.png" alt-text="Screenshot of API security insights in the portal."::: |
87 | 95 |
|
88 |
| -* **Reduced gateway performance** - The performance of your API Management gateway (throughput of API requests) may be reduced when many APIs are onboarded from an instance. |
89 |
| -* **Possible outage** - If you onboard multiple APIs from an API Management instance at one time, it is possible to cause a gateway outage. |
90 |
| -* **Monitor capacity metric** - Monitor the [capacity](api-management-capacity.md) metric to evaluate changes in the load on an API Management instance caused by onboarding to Defender for APIs. Look at long-term trends or averages when making decisions to [scale](api-management-capacity.md#use-capacity-for-scaling-decisions) an API Management instance |
| 96 | +For the security alerts received, Defender for APIs suggests necessary steps to perform the required analysis and validate the potential exploit or anomaly associated with the APIs. Follow the steps in the security alert to fix and return the APIs to healthy status. |
91 | 97 |
|
| 98 | +To learn more about the benefits of Defender for APIs, including additional API inventory experiences within Defender for Cloud, see [Microsoft Defender for APIs – Benefits and features](https://aka.ms/apiSecurityOverview). |
92 | 99 |
|
93 | 100 | ## Next steps
|
94 | 101 |
|
95 | 102 | * Learn more about Defender for APIs:
|
96 |
| - * [Benefits and features](https://aka.ms/apiSecurityOverview) |
| 103 | + * [Benefits and features](https://aka.ms/apiSecurityOverview) |
97 | 104 | * [API security alerts](https://aka.ms/apiSecurityAlerts)
|
98 | 105 | * [API security threats](https://aka.ms/apiSecurityRecommendations)
|
99 | 106 | * [API security troubleshooting guide](https://aka.ms/apiSecurityTroubleshooting)
|
| 107 | + * [Pricing](https://azure.microsoft.com/pricing/details/defender-for-cloud/) |
100 | 108 | * Learn how to [upgrade and scale](upgrade-and-scale.md) an API Management instance.
|
0 commit comments