Accept only traffic from a front-end service (API Management, Functions)

Published Oct 05 2021 09:43 PM 1,719 Views
Microsoft

Overview

The following great article is helpful for us when configuring Azure Front Door in front of API Management to accept only traffic from Azure Front Door at API Management.

 

Integrate Azure Front Door with Azure API Management - Microsoft Tech Community

 

I would like to add information in case of using Application Gateway.

 

Query from customer

 

As always, I received the following query from my customer.

 

Now they are trying to use Azure API Management and Azure Functions for backend services to expose APIs. They plan to use Application Gateway as a web application firewall (WAF) in front of API Management. As they don't use either premium SKU or developer SKU, however, their API Management instance is not permitted to access VNet. In this situation, how do they configure each component behind Application Gateway to avoid accessing it from Internet directly?

I illustrated their requirements.

Logico_jp_0-1633410480290.png

 

If they used premium SKU for both API Management and Azure Functions, they would not have to worry about that (as these services can access VNet when using Premium SKU). However, this customer uses Consumption SKU for Azure Functions, and Basic SKU for API Management.

 

Solution sample

Note: This is an example and is not the only one solution.

  1. As Application Gateway is already configured for public access, assigned public IP address is used to communicate API Management instance. Therefore, NAT Gateway for communication with API Management instance is optional (not required).
  2. Configure API Management instance to accept only traffic from Application Gateway instance. Along with source IP restriction, subscription key is also acceptable.
  3. Configure Function app to accept only traffic from API Management instance. Along with source IP restriction, API host key and authentication are also acceptable.

 

1. Application Gateway

As I mentioned above, public IP address is already assigned to Application Gateway instance and the IP address is also used for outbound communication. Therefore, we don't have to do anymore. 

 

Logico_jp_2-1633483418887.png

 

We can create a NAT Gateway, assign another public IP address (or IP address prefix) to the gateway, and deploy it to a subnet for outbound connection, of course. In this case, public IP address assigned to NAT Gateway is used to communicate with the API Management instance. 

Logico_jp_0-1633483273314.png

2. API Management

To accept only traffic from the Application Gateway instance, we can use ip-filter policy to restrict source IP in API Management. 

 

IP Filter policy

Azure API Management access restriction policies | Microsoft Docs

 

This policy should be defined in global scope as we have to check all traffics to the API Management instance.

 

Global scope

How to set or edit Azure API Management policies | Microsoft Docs

 

IP address(es) assigned to Application Gateway instance or NAT Gateway are filled in as permitted source IP address(es).

image-11

 

Policy configuration is as follows.

 

<policies>
    <inbound>
        <ip-filter action="allow">
            <address>xxx.xxx.xxx.xxx</address>
        </ip-filter>
    </inbound>
    <backend>
        <forward-request />
    </backend>
    <outbound />
    <on-error />
</policies>

 

We can also use original request IP addresses to filter requests through Application Gateway. For more details, check the following URL.  

Sample API management policy - Filter on IP Address when using Application Gateway - Azure API Manag...

 

Enforcing using subscription key along with source IP address restriction would be much more strong restriction. When adding subscription key, configuration of HTTP header in Application Gateway is required.

 

3. Function app

 

In case of Function app, the following configuration should be done to avoid direct connection from the Internet.

  • IP address restriction
    Configure to accept only traffic from Public IP address assigned to the API Management instance.
  • Authentication
    Configure authentication in Function app to accept only accesses from resources in the same Azure AD tenant.
  • Host key enforcement
    Authorization level should be set to function.

IP address restriction and authentication would be sufficient, using host key along with them would be much better. In this section, I describe how to configure IP address restriction and authentication in Function app. Both configurations are the same as in case of App Service.

 

a) IP address restriction

 

Settings > Networking > Incoming Traffic and click "Access restriction".

 

Logico_jp_0-1633439758447.png

 

Click "+Add rule" on a tab whose name does not contain "scm".

Logico_jp_1-1633440832740.png

 

Specify the following properties in the "Add Access Restriction" window pane.

  • Rule name
  • Action ( Allow )
  • Priority (any value is okay)
  • Description (optional)
  • Source settings
    • Type (IPv4)
      Note: Service tag is not applicable in this case. Indeed we can choose the service tag ApiManagement or ApiManagement.{region} , but these represents source IP addresses used for administrative traffic when deploying artifacts to API Management instance. For more details, check the following URL.

      Available service tags
      Azure service tags overview | Microsoft Docs

  • IP Address block (specify public IP assigned to API Management instance)

Click "Add rule" button to complete entering all properties.

 

b) Authentication

 

These steps are required to configure authentication in both Function app and API Management.

 

Function App

 

Settings > Authentication and click "Add identity provider".

Logico_jp_0-1633440731941.png

 

Next, choose "Microsoft" for identity provider to authenticate identities against Azure AD.

Logico_jp_0-1633478820262.png

 

In "App registration", you can choose either registering your application to Azure AD or picking the existing application. In "Restrict access", choose "Require authentication" and enable token store (enabled by default). And click the button "Next: Permissions >".

 

Logico_jp_1-1633478944408.png

 

In "Microsoft Graph permissions", leave the default configuration and click "Add".

Logico_jp_2-1633479170299.png

 

The following screen should appear after entry is completed. If you register application to Azure AD in the previous step, you can find client ID for the Function app. This client ID is required for authentication at API Management instance. (Note: this client ID has been already disabled.:smile:)

 

Logico_jp_3-1633479418294.png

 

API Management

 

Security > Managed identities, and enable system-assigned managed identities of the API Management instance. we use this identity for authentication. 

 

Logico_jp_0-1633481547680.png

 

Next, APIs > APIs and choose not operation scope but API scope, and add authentication-managed-identity policy to inbound pipeline. Configuration of this policy is as follows.

 

<policies>
    <inbound>
        <base />
        <authentication-managed-identity resource="0399d0f3-479a-41eb-8628-2cd2572d7b1d" />
    </inbound>
    <backend>
        <base />
    </backend>
    <outbound>
        <base />
    </outbound>
    <on-error>
        <base />
    </on-error>
</policies>

 

That's it!

 

4. Test

 

When invoking Function app directly, the app returns 403 due to IP address restriction.

image-32

 

When calling an API backed by Function app via API Management (with IP address restriction disabled on API Management), the API returns 200 with response body.

Note: you can pass subscription key to API Management in the form of query parameter (subscription-key) or HTTP header (Ocp-Apim-Subscription-Key).

image-22

Next, when calling the API directly with IP address restriction enabled on API Management, it returns 403 .

image-24

At last, when calling the API via Application Gateway, it returns 200 with response body. (in this case, HTTP instead of HTTPS is used for testing purpose.)

image-25

 

How about Azure Front Door?

 

In case of Front Door, we can add API Management instance(s) in backend pool(s).

 

Logico_jp_0-1633488007686.png

 

IP addresses Front Door uses for backend communication are different from front-end IP address(es) assigned to Front Door and the former is packed into the service tag AzureFrontDoor.Backend. However, when filling in IP addresses on API Management ip-filter policy, the following limitation exists and additional tasks are required.

  • API Management ip-filter policy cannot accept any service tags. Therefore, we have to add all IP addresses packed in the service tag.
  • IP addresses contained in service tags are subject to change without notification. Indeed we might automate the task to download JSON file containing service tags, retrieve IP addresses, and update IP addresses in ip-filter policy. However, some might think that its cost is expensive...

In some circumstances, access restriction using X-Azure-FDID might be reasonable. However, we keep in mind that we cannot use only X-Azure-FDID to restrict access from other services than Front Door strictly. The best solution to accept only traffic from Front Door would be Private Link Service, which is available in Front Door Standard/Premium SKU, but this service does not support API Management as of now.

 

Summary

 

My customer understood my proposal mentioned above, and they followed my proposal to configure their environment. In case of Azure Front Door, cost for IP address restriction is expensive as API Management ip-filter policy accepts only IP address(es) instead of service tag AzureFrontDoor.Backend. Simply using X-Azure-FDID is less expensive but this does not work for some cases.

If API Management instance were deployed in VNet, we could use Private Link, which is available in Azure Front Door Premium SKU, to connect Application Gateway in front of API Management.

image-2

However, Private Link for Application Gateway is not available as of October 6, 2021 even though we can choose Application Gateway as a destination of Private Link (see the screenshot above). If Private Link for Application Gateway is available, better option is to configure Private Link from Front Door to Application Gateway and deploy API Management instance behind internal Application Gateway.

%3CLINGO-SUB%20id%3D%22lingo-sub-2811502%22%20slang%3D%22en-US%22%3EAccept%20only%20traffic%20from%20a%20front-end%20service%20(API%20Management%2C%20Functions)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2811502%22%20slang%3D%22en-US%22%3E%3CH2%20id%3D%22toc-hId--327600527%22%20id%3D%22toc-hId--327478451%22%3EOverview%3C%2FH2%3E%0A%3CP%3EThe%20following%20great%20article%20is%20helpful%20for%20us%20when%20configuring%20Azure%20Front%20Door%20in%20front%20of%26nbsp%3BAPI%20Management%26nbsp%3Bto%20accept%26nbsp%3B%3CSPAN%3Eonly%20%3C%2FSPAN%3Etraffic%20from%26nbsp%3B%3CSPAN%3EAzure%20Front%20Door%20at%20API%20Management.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-paas-blog%2Fintegrate-azure-front-door-with-azure-api-management%2Fba-p%2F2654925%22%20target%3D%22_blank%22%3EIntegrate%20Azure%20Front%20Door%20with%20Azure%20API%20Management%20-%20Microsoft%20Tech%20Community%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20would%20like%20to%20add%20information%20in%20case%20of%20using%20Application%20Gateway.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--2135054990%22%20id%3D%22toc-hId--2134932914%22%3EQuery%20from%20customer%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20always%2C%20I%20received%20the%20following%20query%20from%20my%20customer.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%20class%3D%22wp-block-quote%22%3E%0A%3CP%3ENow%20they%20are%20trying%20to%20use%20Azure%20API%20Management%20and%20Azure%20Functions%20for%20backend%20services%20to%20expose%20APIs.%20They%20plan%20to%20use%20Application%20Gateway%20as%20a%20web%20application%20firewall%20(WAF)%20in%20front%20of%20API%20Management.%20As%20they%20don't%20use%20either%20premium%20SKU%20or%20developer%20SKU%2C%20however%2C%20their%20API%20Management%20instance%20is%20not%20permitted%20to%20access%20VNet.%20In%20this%20situation%2C%20how%20do%20they%20configure%20each%20component%20behind%20Application%20Gateway%20to%20avoid%20accessing%20it%20from%20Internet%20directly%3F%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EI%20illustrated%20their%20requirements.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_0-1633410480290.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315157iB984EC361D402920%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_0-1633410480290.png%22%20alt%3D%22Logico_jp_0-1633410480290.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20they%20used%20premium%20SKU%20for%20both%20API%20Management%20and%20Azure%20Functions%2C%20they%20would%20not%20have%20to%20worry%20about%20that%20(as%20these%20services%20can%20access%20VNet%20when%20using%20Premium%20SKU).%20However%2C%20this%20customer%20uses%20Consumption%20SKU%20for%20Azure%20Functions%2C%20and%20Basic%20SKU%20for%20API%20Management.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-352457843%22%20id%3D%22toc-hId-352579919%22%3ESolution%20sample%3C%2FH2%3E%0A%3CP%3ENote%3A%20This%20is%20an%20example%20and%20is%20not%20the%20only%20one%20solution.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAs%20Application%20Gateway%20is%20already%20configured%20for%20public%20access%2C%20assigned%20public%20IP%20address%20is%20used%20to%20communicate%20API%20Management%20instance.%20Therefore%2C%20NAT%20Gateway%20for%20communication%20with%20API%20Management%20instance%20is%20optional%20(not%20required).%3C%2FLI%3E%0A%3CLI%3EConfigure%20API%20Management%20instance%20to%20accept%20only%20traffic%20from%20Application%20Gateway%20instance.%20Along%20with%20source%20IP%20restriction%2C%20subscription%20key%20is%20also%20acceptable.%3C%2FLI%3E%0A%3CLI%3EConfigure%20Function%20app%20to%20accept%20only%20traffic%20from%20API%20Management%20instance.%20Along%20with%20source%20IP%20restriction%2C%20API%20host%20key%20and%20authentication%20are%20also%20acceptable.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1043019317%22%20id%3D%22toc-hId-1043141393%22%3E1.%20Application%20Gateway%3C%2FH3%3E%0A%3CP%3EAs%20I%20mentioned%20above%2C%20public%20IP%20address%20is%20already%20assigned%20to%20Application%20Gateway%20instance%20and%20the%20IP%20address%20is%20also%20used%20for%20outbound%20communication.%20Therefore%2C%20we%20don't%20have%20to%20do%20anymore.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-columns%22%3E%0A%3CDIV%20class%3D%22wp-block-column%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_2-1633483418887.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315456i551732EDDA79FB0B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_2-1633483418887.png%22%20alt%3D%22Logico_jp_2-1633483418887.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20can%20create%20a%20NAT%20Gateway%2C%20assign%20another%20public%20IP%20address%20(or%20IP%20address%20prefix)%20to%20the%20gateway%2C%20and%20deploy%20it%20to%20a%20subnet%20for%20outbound%20connection%2C%20of%20course.%20In%20this%20case%2C%20public%20IP%20address%20assigned%20to%20NAT%20Gateway%20is%20used%20to%20communicate%20with%20the%20API%20Management%20instance.%26nbsp%3B%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3CDIV%20class%3D%22wp-block-column%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_0-1633483273314.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315454i4A2E240E8CF6934F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_0-1633483273314.png%22%20alt%3D%22Logico_jp_0-1633483273314.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId--764435146%22%20id%3D%22toc-hId--764313070%22%3E%3CSPAN%20style%3D%22color%3A%20inherit%3B%20font-family%3A%20inherit%3B%20font-size%3A%2018px%3B%22%3E2.%20API%20Management%3C%2FSPAN%3E%3C%2FH3%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3ETo%20accept%20only%20traffic%20from%20the%20Application%20Gateway%20instance%2C%20we%20can%20use%3CCODE%3Eip-filter%3C%2FCODE%3E%26nbsp%3Bpolicy%20to%20restrict%20source%20IP%20in%20API%20Management.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3EIP%20Filter%20policy%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fapi-management%2Fapi-management-access-restriction-policies%23RestrictCallerIPs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20API%20Management%20access%20restriction%20policies%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20policy%20should%20be%20defined%20in%20global%20scope%20as%20we%20have%20to%20check%20all%20traffics%20to%20the%20API%20Management%20instance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3EGlobal%20scope%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fapi-management%2Fset-edit-policies%23global-scope%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EHow%20to%20set%20or%20edit%20Azure%20API%20Management%20policies%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIP%20address(es)%20assigned%20to%20Application%20Gateway%20instance%20or%20NAT%20Gateway%20are%20filled%20in%20as%20permitted%20source%20IP%20address(es).%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image-11%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315179iBE903106186C440C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image-11%22%20alt%3D%22image-11%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPolicy%20configuration%20is%20as%20follows.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CPOLICIES%3E%0A%20%20%20%20%3CINBOUND%3E%0A%20%20%20%20%20%20%20%20%3CIP-FILTER%20action%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fallow%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CADDRESS%3Exxx.xxx.xxx.xxx%3C%2FADDRESS%3E%0A%20%20%20%20%20%20%20%20%3C%2FIP-FILTER%3E%0A%20%20%20%20%3C%2FINBOUND%3E%0A%20%20%20%20%3CBACKEND%3E%0A%20%20%20%20%20%20%20%20%3CFORWARD-REQUEST%3E%3C%2FFORWARD-REQUEST%3E%0A%20%20%20%20%3C%2FBACKEND%3E%0A%20%20%20%20%3COUTBOUND%3E%3C%2FOUTBOUND%3E%0A%20%20%20%20%3CON-ERROR%3E%3C%2FON-ERROR%3E%0A%3C%2FPOLICIES%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20can%20also%20use%20original%20request%20IP%20addresses%20to%20filter%20requests%20through%20Application%20Gateway.%20For%20more%20details%2C%20check%20the%20following%20URL.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fapi-management%2Fpolicies%2Ffilter-ip-addresses-when-using-appgw%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESample%20API%20management%20policy%20-%20Filter%20on%20IP%20Address%20when%20using%20Application%20Gateway%20-%20Azure%20API%20Management%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEnforcing%20using%20subscription%20key%20along%20with%20source%20IP%20address%20restriction%20would%20be%20much%20more%20strong%20restriction.%20When%20adding%20subscription%20key%2C%20configuration%20of%20HTTP%20header%20in%20Application%20Gateway%20is%20required.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1723077687%22%20id%3D%22toc-hId-1723199763%22%3E3.%20Function%20app%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20case%20of%20Function%20app%2C%20the%20following%20configuration%20should%20be%20done%20to%20avoid%20direct%20connection%20from%20the%20Internet.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EIP%20address%20restriction%3CBR%20%2F%3EConfigure%20to%20accept%20only%20traffic%20from%20Public%20IP%20address%20assigned%20to%20the%20API%20Management%20instance.%3C%2FLI%3E%0A%3CLI%3EAuthentication%3CBR%20%2F%3EConfigure%20authentication%20in%20Function%20app%20to%20accept%20only%20accesses%20from%20resources%20in%20the%20same%20Azure%20AD%20tenant.%3C%2FLI%3E%0A%3CLI%3EHost%20key%20enforcement%3CBR%20%2F%3EAuthorization%20level%20should%20be%20set%20to%3CCODE%3Efunction%3C%2FCODE%3E.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIP%20address%20restriction%20and%20authentication%20would%20be%20sufficient%2C%20using%20host%20key%20along%20with%20them%20would%20be%20much%20better.%20In%20this%20section%2C%20I%20describe%20how%20to%20configure%20IP%20address%20restriction%20and%20authentication%20in%20Function%20app.%20Both%20configurations%20are%20the%20same%20as%20in%20case%20of%20App%20Service.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--1881328135%22%20id%3D%22toc-hId--1881206059%22%3Ea)%20IP%20address%20restriction%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESettings%20%26gt%3B%20Networking%20%26gt%3B%20Incoming%20Traffic%20and%20click%20%22Access%20restriction%22.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_0-1633439758447.png%22%20style%3D%22width%3A%20600px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315279iDD77B39743217D75%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_0-1633439758447.png%22%20alt%3D%22Logico_jp_0-1633439758447.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EClick%20%22%2BAdd%20rule%22%20on%20a%20tab%20whose%20name%20does%20not%20contain%20%22scm%22.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_1-1633440832740.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315286i3F0CB83C575A313F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_1-1633440832740.png%22%20alt%3D%22Logico_jp_1-1633440832740.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-jetpack-layout-grid%20alignfull%20column1-desktop-grid__span-8%20column1-desktop-grid__row-1%20column2-desktop-grid__span-4%20column2-desktop-grid__start-9%20column2-desktop-grid__row-1%20column1-tablet-grid__span-4%20column1-tablet-grid__row-1%20column2-tablet-grid__span-4%20column2-tablet-grid__start-5%20column2-tablet-grid__row-1%20column1-mobile-grid__span-4%20column1-mobile-grid__row-1%20column2-mobile-grid__span-4%20column2-mobile-grid__row-2%22%3E%0A%3CDIV%20class%3D%22wp-block-jetpack-layout-grid-column%20wp-block-jetpack-layout-grid__padding-none%22%3E%0A%3CP%3ESpecify%20the%20following%20properties%20in%20the%20%22Add%20Access%20Restriction%22%20window%20pane.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERule%20name%3C%2FLI%3E%0A%3CLI%3EAction%20(%3CCODE%3EAllow%3C%2FCODE%3E%26nbsp%3B)%3C%2FLI%3E%0A%3CLI%3EPriority%20(any%20value%20is%20okay)%3C%2FLI%3E%0A%3CLI%3EDescription%20(optional)%3C%2FLI%3E%0A%3CLI%3ESource%20settings%3CUL%3E%0A%3CLI%3EType%20(%3CCODE%3EIPv4%3C%2FCODE%3E)%3CBR%20%2F%3ENote%3A%20Service%20tag%20is%20not%20applicable%20in%20this%20case.%20Indeed%20we%20can%20choose%20the%20service%20tag%3CCODE%3EApiManagement%3C%2FCODE%3E%26nbsp%3Bor%3CCODE%3EApiManagement.%7Bregion%7D%3C%2FCODE%3E%26nbsp%3B%2C%20but%20these%20represents%20source%20IP%20addresses%20used%20for%20administrative%20traffic%20when%20deploying%20artifacts%20to%20API%20Management%20instance.%20For%20more%20details%2C%20check%20the%20following%20URL.%3CBR%20%2F%3E%3CBR%20%2F%3EAvailable%20service%20tags%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fvirtual-network%2Fservice-tags-overview%23available-service-tags%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20service%20tags%20overview%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3EIP%20Address%20block%20(specify%20public%20IP%20assigned%20to%20API%20Management%20instance)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EClick%20%22Add%20rule%22%20button%20to%20complete%20entering%20all%20properties.%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3CDIV%20class%3D%22wp-block-jetpack-layout-grid-column%20wp-block-jetpack-layout-grid__padding-none%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CH4%20id%3D%22toc-hId-606184698%22%20id%3D%22toc-hId-606306774%22%3Eb)%20Authentication%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThese%20steps%20are%20required%20to%20configure%20authentication%20in%20both%20Function%20app%20and%20API%20Management.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH5%20id%3D%22toc-hId-1296746172%22%20id%3D%22toc-hId-1296868248%22%3EFunction%20App%3C%2FH5%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESettings%20%26gt%3B%20Authentication%20and%20click%20%22Add%20identity%20provider%22.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_0-1633440731941.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315285i13DC7FE7E7BDCF5D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_0-1633440731941.png%22%20alt%3D%22Logico_jp_0-1633440731941.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENext%2C%20choose%20%22Microsoft%22%20for%20identity%20provider%20to%20authenticate%20identities%20against%20Azure%20AD.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_0-1633478820262.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315433iF6D60FC92E64913E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_0-1633478820262.png%22%20alt%3D%22Logico_jp_0-1633478820262.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20%22App%20registration%22%2C%20you%20can%20choose%20either%20registering%20your%20application%20to%20Azure%20AD%20or%20picking%20the%20existing%20application.%20In%20%22Restrict%20access%22%2C%20choose%20%22Require%20authentication%22%20and%20enable%20token%20store%20(enabled%20by%20default).%20And%20click%20the%20button%20%22Next%3A%20Permissions%20%26gt%3B%22.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_1-1633478944408.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315434i9E65CD791D036F08%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_1-1633478944408.png%22%20alt%3D%22Logico_jp_1-1633478944408.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20%22Microsoft%20Graph%20permissions%22%2C%20leave%20the%20default%20configuration%20and%20click%20%22Add%22.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_2-1633479170299.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315437iCDFCAAF8506D17E5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_2-1633479170299.png%22%20alt%3D%22Logico_jp_2-1633479170299.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20following%20screen%20should%20appear%20after%20entry%20is%20completed.%20If%20you%20register%20application%20to%20Azure%20AD%20in%20the%20previous%20step%2C%20you%20can%20find%20client%20ID%20for%20the%20Function%20app.%20This%20client%20ID%20is%20required%20for%20authentication%20at%20API%20Management%20instance.%20(Note%3A%20this%20client%20ID%20has%20been%20already%20disabled.%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2F%408341BD79091AF36AA2A09063B554B5CD%2Fimages%2Femoticons%2Fsmile_40x40.gif%22%20alt%3D%22%3Asmile%3A%22%20title%3D%22%3Asmile%3A%22%20%2F%3E)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_3-1633479418294.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315438iEE639EF573963AC1%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_3-1633479418294.png%22%20alt%3D%22Logico_jp_3-1633479418294.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH5%20id%3D%22toc-hId--510708291%22%20id%3D%22toc-hId--510586215%22%3EAPI%20Management%3C%2FH5%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESecurity%20%26gt%3B%20Managed%20identities%2C%20and%20enable%20system-assigned%20managed%20identities%20of%20the%20API%20Management%20instance.%20we%20use%20this%20identity%20for%20authentication.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_0-1633481547680.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315450i44FEF157A42D9D33%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_0-1633481547680.png%22%20alt%3D%22Logico_jp_0-1633481547680.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENext%2C%20APIs%20%26gt%3B%20APIs%20and%20choose%20not%20operation%20scope%20but%20API%20scope%2C%20and%20add%26nbsp%3B%3CCODE%20class%3D%22xml%20plain%22%3Eauthentication-managed-identity%3C%2FCODE%3E%26nbsp%3Bpolicy%20to%20inbound%20pipeline.%20Configuration%20of%20this%20policy%20is%20as%20follows.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CPOLICIES%3E%0A%20%20%20%20%3CINBOUND%3E%0A%20%20%20%20%20%20%20%20%3CBASE%20%2F%3E%0A%20%20%20%20%20%20%20%20%3CAUTHENTICATION-MANAGED-IDENTITY%20resource%3D%220399d0f3-479a-41eb-8628-2cd2572d7b1d%22%3E%3C%2FAUTHENTICATION-MANAGED-IDENTITY%3E%0A%20%20%20%20%3C%2FINBOUND%3E%0A%20%20%20%20%3CBACKEND%3E%0A%20%20%20%20%20%20%20%20%3CBASE%20%2F%3E%0A%20%20%20%20%3C%2FBACKEND%3E%0A%20%20%20%20%3COUTBOUND%3E%0A%20%20%20%20%20%20%20%20%3CBASE%20%2F%3E%0A%20%20%20%20%3C%2FOUTBOUND%3E%0A%20%20%20%20%3CON-ERROR%3E%0A%20%20%20%20%20%20%20%20%3CBASE%20%2F%3E%0A%20%20%20%20%3C%2FON-ERROR%3E%0A%3C%2FPOLICIES%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3EThat's%20it!%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-580576485%22%20id%3D%22toc-hId-580698561%22%3E4.%20Test%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20invoking%20Function%20app%20directly%2C%20the%20app%20returns%3CCODE%20class%3D%22xml%20plain%22%3E403%3C%2FCODE%3Edue%20to%20IP%20address%20restriction.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image-32%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315459iD447B8EA06331E57%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image-32%22%20alt%3D%22image-32%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20calling%20an%20API%20backed%20by%20Function%20app%20via%20API%20Management%20(with%20IP%20address%20restriction%20disabled%20on%20API%20Management)%2C%20the%20API%20returns%3CCODE%20class%3D%22xml%20plain%22%3E200%3C%2FCODE%3E%26nbsp%3Bwith%20response%20body.%3C%2FP%3E%0A%3CP%3ENote%3A%20you%20can%20pass%20subscription%20key%20to%20API%20Management%20in%20the%20form%20of%20query%20parameter%20(%3CCODE%20class%3D%22xml%20plain%22%3Esubscription-key%3C%2FCODE%3E)%20or%20HTTP%20header%20(%3CCODE%20class%3D%22xml%20plain%22%3EOcp-Apim-Subscription-Key%3C%2FCODE%3E).%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image-22%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315460i916468C0B0E1C283%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image-22%22%20alt%3D%22image-22%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENext%2C%20when%20calling%20the%20API%20directly%20with%20IP%20address%20restriction%20enabled%20on%20API%20Management%2C%20it%20returns%26nbsp%3B%3CCODE%20class%3D%22xml%20plain%22%3E403%3C%2FCODE%3E%26nbsp%3B.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image-24%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315465iBC0ADF3F4EB8B764%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image-24%22%20alt%3D%22image-24%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAt%20last%2C%20when%20calling%20the%20API%20via%20Application%20Gateway%2C%20it%20returns%3CCODE%20class%3D%22xml%20plain%22%3E200%3C%2FCODE%3E%26nbsp%3Bwith%20response%20body.%20(in%20this%20case%2C%20HTTP%20instead%20of%20HTTPS%20is%20used%20for%20testing%20purpose.)%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image-25%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315467iF6085EF3AF81551E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image-25%22%20alt%3D%22image-25%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1355960697%22%20id%3D%22toc-hId--1355838621%22%3EHow%20about%20Azure%20Front%20Door%3F%3C%2FH2%3E%0A%3CDIV%20class%3D%22wp-block-jetpack-layout-grid%20alignfull%20column1-desktop-grid__span-6%20column1-desktop-grid__row-1%20column2-desktop-grid__span-6%20column2-desktop-grid__start-7%20column2-desktop-grid__row-1%20column1-tablet-grid__span-4%20column1-tablet-grid__row-1%20column2-tablet-grid__span-4%20column2-tablet-grid__start-5%20column2-tablet-grid__row-1%20column1-mobile-grid__span-4%20column1-mobile-grid__row-1%20column2-mobile-grid__span-4%20column2-mobile-grid__row-2%22%3E%0A%3CDIV%20class%3D%22wp-block-jetpack-layout-grid-column%20wp-block-jetpack-layout-grid__padding-none%22%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20case%20of%20Front%20Door%2C%20we%20can%20add%20API%20Management%20instance(s)%20in%20backend%20pool(s).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Logico_jp_0-1633488007686.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F315470iC1C6D9C570054194%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Logico_jp_0-1633488007686.png%22%20alt%3D%22Logico_jp_0-1633488007686.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIP%20addresses%20Front%20Door%20uses%20for%20backend%20communication%20are%20different%20from%20front-end%20IP%20address(es)%20assigned%20to%20Front%20Door%20and%20the%20former%20is%20packed%20into%20the%20service%20tag%3CCODE%3EAzureFrontDoor.Backend%3C%2FCODE%3E.%20However%2C%20when%20filling%20in%20IP%20addresses%20on%20API%20Management%3CCODE%3Eip-filter%3C%2FCODE%3E%26nbsp%3Bpolicy%2C%20the%20following%20limitation%20exists%20and%20additional%20tasks%20are%20required.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAPI%20Management%3CCODE%3Eip-filter%3C%2FCODE%3E%26nbsp%3Bpolicy%20cannot%20accept%20any%20service%20tags.%20Therefore%2C%20we%20have%20to%20add%20all%20IP%20addresses%20packed%20in%20the%20service%20tag.%3C%2FLI%3E%0A%3CLI%3EIP%20addresses%20contained%20in%20service%20tags%20are%20subject%20to%20change%20without%20notification.%20Indeed%20we%20might%20automate%20the%20task%20to%20download%20JSON%20file%20containing%20service%20tags%2C%20retrieve%20IP%20addresses%2C%20and%20update%20IP%20addresses%20in%26nbsp%3B%3CCODE%3Eip-filter%3C%2FCODE%3E%26nbsp%3Bpolicy.%20However%2C%20some%20might%20think%20that%20its%20cost%20is%20expensive...%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FDIV%3E%0A%3CP%20class%3D%22wp-block-jetpack-layout-grid-column%20wp-block-jetpack-layout-grid__padding-none%22%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%20In%20some%20circumstances%2C%20access%20restriction%20using%20%3C%2FSPAN%3E%3CCODE%3EX-Azure-FDID%3C%2FCODE%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%26nbsp%3Bmight%20be%20reasonable.%20However%2C%20we%20keep%20in%20mind%20that%20we%20cannot%20use%20only%3CCODE%3EX-Azure-FDID%3C%2FCODE%3E%26nbsp%3Bto%20restrict%20access%20from%20other%20services%20than%20Front%20Door%20strictly.%20The%20best%20solution%20to%20accept%20only%20traffic%20from%20Front%20Door%20would%20be%20Private%20Link%20Service%2C%20which%20is%20available%20in%20Front%20Door%20Standard%2FPremium%20SKU%2C%20but%20this%20service%20does%20not%20support%20API%20Management%20as%20of%20now.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-jetpack-layout-grid-column%20wp-block-jetpack-layout-grid__padding-none%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CH2%20id%3D%22toc-hId-1131552136%22%20id%3D%22toc-hId-1131674212%22%3ESummary%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMy%20customer%20understood%20my%20proposal%20mentioned%20above%2C%20and%20they%20followed%20my%20proposal%20to%20configure%20their%20environment.%26nbsp%3BIn%20case%20of%20Azure%20Front%20Door%2C%20cost%20for%20IP%20address%20restriction%20is%20expensive%20as%20API%20Management%3CCODE%3Eip-filter%3C%2FCODE%3E%26nbsp%3Bpolicy%20accepts%20only%20IP%20address(es)%20instead%20of%20service%20tag%3CCODE%3EAzureFrontDoor.Backend%3C%2FCODE%3E.%20Simply%20using%3CCODE%3EX-Azure-FDID%3C%2FCODE%3E%26nbsp%3Bis%20less%20expensive%20but%20this%20does%20not%20work%20for%20some%20cases.%3C%2FP%3E%0A%3CP%3EIf%20API%20Management%20instance%20were%20deployed%20in%20VNet%2C%20we%20could%20use%20Private%20Link%2C%20which%20is%20available%20in%26nbsp%3BAzure%20Front%20Door%20Premium%20SKU%2C%20to%20connect%20Application%20Gateway%20in%20front%20of%20API%20Management.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image-2%22%20style%3D%22width%3A%20548px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316347iACD696A97DD70AF3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image-2%22%20alt%3D%22image-2%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHowever%2C%20Private%20Link%20for%20Application%20Gateway%20is%20not%20available%20as%20of%20October%206%2C%202021%20even%20though%20we%20can%20choose%20Application%20Gateway%20as%20a%20destination%20of%20Private%20Link%20(see%20the%20screenshot%20above).%20If%20Private%20Link%20for%20Application%20Gateway%20is%20available%2C%20better%20option%20is%20to%20configure%20Private%20Link%20from%20Front%20Door%20to%20Application%20Gateway%20and%20deploy%20API%20Management%20instance%20behind%20internal%20Application%20Gateway.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2811502%22%20slang%3D%22en-US%22%3E%3CP%3EDescribe%20how%20to%20configure%20Application%20Gateway%2FFront%20Door%2C%20API%20Management%2C%20and%20Azure%20Functions%20(including%20App%20Service)%20and%20accept%20only%20traffic%20from%20services%20in%20front%20of%20backend%20service.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2811502%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplication%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EArchitecture%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIntegration%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Oct 09 2021 04:15 PM
Updated by: