You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Create Azure Front Door in front of Azure API Management
3
-
description: Learn how to front your API Management instance with Azure Front Door Standard/Premium to provide global HTTPS load balancing, TLS offloading, dynamic request acceleration and other capabilities.
2
+
title: Configure Azure Front Door in front of Azure API Management
3
+
description: Learn how to front your API Management instance with Azure Front Door Standard/Premium to provide global HTTPS load balancing, TLS offloading, dynamic request acceleration, and other capabilities.
4
4
services: api-management
5
5
author: dlepow
6
6
@@ -9,19 +9,19 @@ ms.topic: how-to
9
9
ms.date: 08/22/2022
10
10
ms.author: danlep
11
11
---
12
-
# Use Front Door Standard in front of Azure API Management
12
+
# Configure Front Door Standard/Premium in front of Azure API Management
13
13
14
-
Azure Front Door is a modern application delivery network platform providing a secure, scalable content delivery network (CDN), dynamic site acceleration, and global HTTP(s) load balancing for your global web applications. When used in front of API Management, Front Door is useful for TLS offloading, end-to-end TLS, load balancing, response caching of GET requests, a web application firewall, among other capabilities. For a full list of supported features, see [What is Azure Front Door?](../frontdoor/front-door-overview.md).
14
+
Azure Front Door is a modern application delivery network platform providing a secure, scalable content delivery network (CDN), dynamic site acceleration, and global HTTP(s) load balancing for your global web applications. When used in front of API Management, Front Door can provide TLS offloading, end-to-end TLS, load balancing, response caching of GET requests, and a web application firewall, among other capabilities. For a full list of supported features, see [What is Azure Front Door?](../frontdoor/front-door-overview.md)
15
15
16
16
This article shows how to:
17
17
18
-
* Set up Azure Front Door Standard/Premium in front of a publicly accessible Azure API Management instance: either non-networked, or injected in a virtual network in [external mode](api-management-using-with-vnet.md).
18
+
* Set up an Azure Front Door Standard/Premium profile in front of a publicly accessible Azure API Management instance: either non-networked, or injected in a virtual network in [external mode](api-management-using-with-vnet.md).
19
19
* Restrict API Management to accept API traffic only from Azure Front Door.
20
20
21
21
## Prerequisites
22
22
23
23
* An API Management instance.
24
-
* If you choose to use a network-injected instance, it must be deployed in an external VNet. (Virtual network injection is supported in the Developer or Premium service tier.)
24
+
* If you choose to use a network-injected instance, it must be deployed in an external VNet. (Virtual network injection is supported in the Developer and Premium service tiers.)
25
25
* Import one or more APIs to your API Management instance to confirm routing through Front Door.
26
26
27
27
## Configure Azure Front Door
@@ -35,7 +35,7 @@ Configure the following settings that are specific to using the gateway endpoint
35
35
|Setting |Value |
36
36
|---------|---------|
37
37
|**Origin type**| Select **API Management**|
38
-
|**Origin hostname**|Enter the hostname of your API Management instance, for example, *myapim*.azure-api.net |
38
+
|**Origin hostname**|Select the hostname of your API Management instance, for example, *myapim*.azure-api.net |
39
39
|**Caching**| Select **Enable caching** for Front Door to [cache static content](../frontdoor/front-door-caching.md?pivots=front-door-standard-premium)|
@@ -50,42 +50,41 @@ After the profile is created, update the default origin group to include an API
50
50
1. In the **Update origin group** window, configure the following **Health probe** settings and select **Update**:
51
51
52
52
53
-
|Setting |Value |
54
-
|---------|---------|
55
-
|**Status**| Select **Enable health probes**|
56
-
|**Path**| Enter `/status-0123456789abcdef`|
57
-
|**Protocol**| Select **HTTPS**|
58
-
|**Method**| Select **GET**|
59
-
|**Interval (in seconds)**| Enter **30**|
60
-
61
-
:::image type="content" source="media/front-door-api-management/update-origin-group.png" alt-text="Screenshot of updating the default origin group in the portal.":::
53
+
|Setting |Value |
54
+
|---------|---------|
55
+
|**Status**| Select **Enable health probes**|
56
+
|**Path**| Enter `/status-0123456789abcdef`|
57
+
|**Protocol**| Select **HTTPS**|
58
+
|**Method**| Select **GET**|
59
+
|**Interval (in seconds)**| Enter **30**|
60
+
61
+
:::image type="content" source="media/front-door-api-management/update-origin-group.png" alt-text="Screenshot of updating the default origin group in the portal.":::
62
62
63
63
### Update default route
64
64
65
-
We recommend updating the default route that is configured in the profile to use HTTPS as the forwarding protocol.
65
+
We recommend updating the route that associated with the API Management origin group to use HTTPS as the forwarding protocol. In this example, it's the default route.
66
66
67
67
1. In the [portal](https://portal.azure.com), go to your Front Door profile.
68
68
1. In the left menu, under **Settings** select **Origin groups**.
69
69
1. Expand **default-origin-group**.
70
-
1. In the context menu (**...**) of **default-rout**, select **Configure route**.
70
+
1. In the context menu (**...**) of **default-route**, select **Configure route**.
71
71
1. Set **Accepted protocols** to **HTTP and HTTPS**.
72
72
1. Enable **Redirect all traffic to use HTTPS**.
73
73
1. Set **Forwarding protocol** to **HTTPS only** and then select **Update**.
74
74
75
-
76
75
### Test the configuration
77
76
78
77
Test the Front Door profile configuration by calling an API hosted by API Management. First, call the API directly through the API Management gateway to ensure that the API is reachable. Then, call the API through Front Door. To test, you can use a command line client such as `curl` for the calls, or a tool such as [Postman](https://www.getpostman.com).
79
78
80
79
### Call an API directly through API Management
81
80
82
-
In the following example, an operation in the Demo Conference API hosted by an API Management instance is called directly using Postman. The instance's hostname here is in the default `azure-api.net` domain. In this example, a valid subscription key is passed using a request header. A successful response shows `200 OK` and returns the expected data:
81
+
In the following example, an operation in the Demo Conference API hosted by the API Management instance is called directly using Postman. The instance's hostname shown is in the default `azure-api.net` domain. In this example, a valid subscription key is passed using a request header. A successful response shows `200 OK` and returns the expected data:
83
82
84
83
:::image type="content" source="media/front-door-api-management/test-api-management-gateway.png" alt-text="Screenshot showing calling API Management endpoint directly using Postman.":::
85
84
86
85
### Call an API directly through Front Door
87
86
88
-
In the following example, the same operation in the Demo Conference API is called using the Front Door endpoint configured for your instance. The endpoint's hostname is in the `azurefd.net` domain, and it's shown in the portal on the **Properties** page of your Front Door profile. Again, a successful response shows `200 OK` and returns the expected data:
87
+
In the following example, the same operation in the Demo Conference API is called using the Front Door endpoint configured for your instance. The endpoint's hostname is in the `azurefd.net` domain, and can be found in the portal on the **Properties** page of your Front Door profile. A successful response shows `200 OK` and returns the same data as in the previous example:
89
88
90
89
:::image type="content" source="media/front-door-api-management/test-front-door-gateway.png" alt-text="Screenshot showing calling Front Door endpoint using Postman.":::
91
90
@@ -94,7 +93,7 @@ In the following example, the same operation in the Demo Conference API is calle
94
93
Use API Management policies to ensure that your API Management instance accepts traffic only from Azure Front Door. You can accomplish this restriction using one or both of the [following methods](../frontdoor/front-door-faq.yml#how-do-i-lock-down-the-access-to-my-backend-to-only-azure-front-door-):
95
94
96
95
1. Restrict incoming IP addresses to your API Management instances
97
-
1. Restrict traffic based on value of the `X-Azure-FDID` header
96
+
1. Restrict traffic based on the value of the `X-Azure-FDID` header
98
97
99
98
### Restrict incoming IP addresses
100
99
@@ -103,13 +102,13 @@ You can configure an inbound [ip-filter](/api-management-access-restriction-poli
103
102
***Front Door's backend IP address space** - Allow IP addresses corresponding to the *AzureFrontDoor.Backend* section in [Azure IP Ranges and Service Tags](https://www.microsoft.com/download/details.aspx?id=56519).
104
103
105
104
> [!NOTE]
106
-
> If your API Management instance is deployed in an external virtual network, accomplish the same restriction instead by adding an inbound network security group rule in the subnet used for your API Management instance. Configure the rule to allow HTTPS traffic from source service tag *AzureFrontDoor.Backend* on port 443.
105
+
> If your API Management instance is deployed in an external virtual network, accomplish the same restriction by adding an inbound network security group rule in the subnet used for your API Management instance. Configure the rule to allow HTTPS traffic from source service tag *AzureFrontDoor.Backend* on port 443.
107
106
108
107
***Azure infrastructure services** - Allow IP addresses 168.63.129.16 and 169.254.169.254.
109
108
110
109
### Check Front Door header
111
110
112
-
You can configure the [check-header](/api-management-access-restriction-policies.md#CheckHTTPHeader) policy to filter incoming requests based on the `X-Azure-FDID` HTTP request header. Azure Front Door sends this header to API Management with its unique Front Door ID. Find the **Front Door ID** value on the **Overview** page of the Front Door profile in the portal.
111
+
Requests routed through Front Door include headers specific to your Front Door configuration. You can configure the [check-header](/api-management-access-restriction-policies.md#CheckHTTPHeader) policy to filter incoming requests based on the unique value of the `X-Azure-FDID` HTTP request header that is sent to API Management. Find the **Front Door ID** value in the portal on the **Overview** page of the Front Door profile.
113
112
114
113
In the following policy example, the Front Door ID is specified using a [named value](api-management-howto-properties.md) named `FrontDoorId`.
115
114
@@ -123,7 +122,7 @@ Requests that aren't accompanied by a valid `X-Azure-FDID` header return a `403
123
122
124
123
## (Optional) Configure Front Door for developer portal
125
124
126
-
Optionally, configure the API Management instance's developer portal as an endpoint in the Front Door profile.
125
+
Optionally, configure the API Management instance's developer portal as an endpoint in the Front Door profile. The following are high level steps
127
126
128
127
* To add an endpoint and configure a route, see [Configure and endpoint with Front Door manager](../frontdoor/how-to-configure-endpoints.md).
129
128
@@ -135,10 +134,10 @@ Optionally, configure the API Management instance's developer portal as an endpo
135
134
For more information and details about settings, see [How to configure an origin for Azure Front Door](../frontdoor/how-to-configure-origin.md#create-a-new-origin-group).
136
135
137
136
> [!NOTE]
138
-
> If you've configured an Azure AD or Azure AD B2C identity provider for the developer portal, you need to update the corresponding app registration with an additional redirect URL to Front Door. In the app registration, supply the URL for the developer portal endpoint configured in your Front Door profile.
137
+
> If you've configured an Azure AD or Azure AD B2C identity provider for the developer portal, you need to update the corresponding app registration with an additional redirect URL to Front Door. In the app registration, add the URL for the developer portal endpoint configured in your Front Door profile.
139
138
140
139
## Next steps
141
140
142
-
* To automate deployments of Front Door with API Management, see the following example Quickstart template:[Front Door Standard/Premium with API Management origin](https://azure.microsoft.com/resources/templates/front-door-standard-premium-api-management-external/)\
141
+
* To automate deployments of Front Door with API Management, see the template [Front Door Standard/Premium with API Management origin](https://azure.microsoft.com/resources/templates/front-door-standard-premium-api-management-external/)
143
142
144
-
* Optionally deploy Web Application Firewall (WAF) on Azure Front Door to protect the API Management instance from malicious attacks. For more information, see [Azure Web Application Firewall on Azure Front Door](../web-application-firewall/afds/afds-overview.md).
143
+
* Optionally deploy [Web Application Firewall (WAF)](../web-application-firewall/afds/afds-overview.md) on Azure Front Door to protect the API Management instance from malicious attacks.
0 commit comments