App Service to Storage Account Connection Condition Summary

Published Nov 15 2021 11:02 PM 1,430 Views
Microsoft

Currently, there are 4 main conditions the Azure App Service can connect to Azure Storage Account. 

  • Condition 1: App Service (Public ) --> Storage Account (Public, Same region)
  • Condition 2: App Service (Public ) --> Storage Account (Public, Different region)
  • Condition 3: App Service (Regional Vnet Integration) --> Storage Account (Private, Service Endpoint )
  • Condition 4: App Service (Regional Vnet Integration) --> Storage Account (Private, Private Endpoint)

 

Before going deeper, here is a brief summary for your to choose the suitable design for your system.

Requirements:

  • If your security require the Firewall on the Storage Account. And the Storage Account and Azure App Service are in the same region.

          --> Use the above Condition 3 for 4 for your design.

  • If your security require the Firewall on the Storage Account. And the Storage Account and Azure App Service are in the different region.

         --> Use the Condition 1 or Condition 4 for your design. When you would like to make the connection private, use the Condition 4.

 

For the deeper analysis for the above 4 conditions, please see following:

Background knowledge:

============

Azure Storage Account Network restricting logic is different from the Azure App Service.

Even when we configured the Network restricting from the Azure Storage Account side, the tcpping will still working well like this:

Boqian_13-1637044755386.png

 

And the "List" request to the Azure Storage Account will not be locked.

 

In order to verify if the Network Restricting is working or not, you can use the script to upload a file to Azure Storage Account to test. I am using the code:

<?php

 

$accesskey = "xxxx";

$storageAccount = 'xxxx';

$filetoUpload = realpath('xxxx');

$containerName = 'xxxx';

$blobName = 'xxxx';

 

$destinationURL = "https://$storageAccount.blob.core.windows.net/$containerName/$blobName";

 

function uploadBlob($filetoUpload, $storageAccount, $containerName, $blobName, $destinationURL, $accesskey) {

 

    $currentDate = gmdate("D, d M Y H:i:s T", time());

    $handle = fopen($filetoUpload, "r");

    $fileLen = filesize($filetoUpload);

 

    $headerResource = "x-ms-blob-cache-control:max-age=3600\nx-ms-blob-type:BlockBlob\nx-ms-date:$currentDate\nx-ms-version:2015-12-11";

    $urlResource = "/$storageAccount/$containerName/$blobName";

 

    $arraysign = array();

    $arraysign[] = 'PUT';               /*HTTP Verb*/ 

    $arraysign[] = '';                  /*Content-Encoding*/ 

    $arraysign[] = '';                  /*Content-Language*/ 

    $arraysign[] = $fileLen;            /*Content-Length (include value when zero)*/ 

    $arraysign[] = '';                  /*Content-MD5*/ 

    $arraysign[] = 'image/png';         /*Content-Type*/ 

    $arraysign[] = '';                  /*Date*/ 

    $arraysign[] = '';                  /*If-Modified-Since */ 

    $arraysign[] = '';                  /*If-Match*/ 

    $arraysign[] = '';                  /*If-None-Match*/ 

    $arraysign[] = '';                  /*If-Unmodified-Since*/ 

    $arraysign[] = '';                  /*Range*/ 

    $arraysign[] = $headerResource;     /*CanonicalizedHeaders*/

    $arraysign[] = $urlResource;        /*CanonicalizedResource*/

 

    $str2sign = implode("\n", $arraysign);

 

    $sig = base64_encode(hash_hmac('sha256', urldecode(utf8_encode($str2sign)), base64_decode($accesskey), true)); 

    $authHeader = "SharedKey $storageAccount:$sig";

 

    $headers = [

        'Authorization: ' . $authHeader,

        'x-ms-blob-cache-control: max-age=3600',

        'x-ms-blob-type: BlockBlob',

        'x-ms-date: ' . $currentDate,

        'x-ms-version: 2015-12-11',

        'Content-Type: image/png',

        'Content-Length: ' . $fileLen

    ];

 

    $ch = curl_init($destinationURL);

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");

    curl_setopt($ch, CURLOPT_INFILE, $handle);

    curl_setopt($ch, CURLOPT_INFILESIZE, $fileLen);

    curl_setopt($ch, CURLOPT_UPLOAD, true);

    $result = curl_exec($ch);

 

    echo ('Result<br/>');

    print_r($result);

 

    echo ('Error<br/>');

    print_r(curl_error($ch));

 

    curl_close($ch);

}

 

uploadBlob($filetoUpload, $storageAccount, $containerName, $blobName, $destinationURL, $accesskey);

 

Preparation:

============

  1. Write code to upload the file to Azure Storage Account for testing as mentioned in above. Create xxx.php file under the wwwroot folder for testing.
  2. Enable the "Diagnostic settings" from Azure Portal

      Boqian_14-1637044755389.png

 

Test:

============

Condition 1:  App Service (Public ) --> Storage Account (Public, Same region)

By Default, Azure App Service can access the Storage Account and upload the files.

 

But if we enable the Firewall settings under the Networking blade of Storage Account, and add the Azure App Service Outbound IP to the whitelist like following screenshot, the Azure App Service will still not able to access Azure Storage Account.

Boqian_15-1637044755391.png

 

If we check the Azure Storage Account log, we will see the Azure App Service was trying to use an internal IP (100.x.x.x) to access the Storage Account. Not using the Azure App Service public outbound IP:

Boqian_16-1637044755393.png

Why? 

I discussed this behavior with the Azure Storage Account and Azure App Service Product Group, and the result showed if the Azure App Service and Azure Storage Account are in the same datacenter, they did some optimization, so the Azure App Service will always reach the Storage Account via the fastest route, so the resource IP (Azure App Service) observed from Azure Storage Account could be an un-predicted IP (could start with 100.x.x.x or 10.x.x.x or other others) and this IP could  change at any time.

 

Question:

Considering the resource IP from Azure App Service looks like start with 100.x.x.x for now, if I whitelist the 100.0.0.0/8 in the Azure Storage Account, will the Azure App Service can upload the file on it?

Answer:

Yes it will make the Azure App Service can access the Storage Account for now. But cannot promise it will always work, it is a not officially support scenery.

Because the IP could change to 10.x.x.x and some other un-predicted IPs. Another thing is, the x.0.0.0/8 is a huge range, so it is not a good design. 

Boqian_17-1637044755414.png

 

If you would like to enable the Firewall in the Azure Storage Account and would like to make sure the Azure App Service in the same region still could access this Storage Account, please see the details in the Condition 3 and Condition 4.

 

Condition 2: App Service (Public ) --> Storage Account (Public, Different region)

As we can see in the Azure Storage Account log, the Azure App Service is using the public IP accessing the Azure Storage Account (13.x.x.x is one of the public outbound IP of my test Azure App Service. )

And you can enable the Firewall on Azure Storage Account and whitelist all the Azure App Service outbound IP (Inbound/Outbound IP addresses - Azure App Service | Microsoft Docs). That will make sure the Azure App Service can always access the Storage Account.

Boqian_18-1637044755396.png

 

Condition 3: App Service (Regional Vnet Integration) --> Storage Account (Private, Service Endpoint )

  1. Create Vnet Integration from Azure App Service to Azure Vnet Subnet.
  2. Make sure the "Microsoft.Storage" is enabled as Service Endpoint for the Subnet that App Service is integrated with.

  Boqian_19-1637044755398.png

 

  1. Make sure the "Route All" is enabled for the Vnet Integration:

    Boqian_20-1637044755400.png

 

Configure Azure Storage firewalls and virtual networks | Microsoft Docs

Boqian_21-1637044755402.png

 

After doing above, if we check the Azure App Service resource IP, it will be one of the IP under the Vnet Subnet:

Boqian_22-1637044755403.png

 

Condition 4: App Service (Regional Vnet Integration) --> Storage Account (Private, Private Endpoint)

Similar configuration as the Condition 3, but please make sure:

  1. Disable the Service Endpoint on the Vnet Subnet.
  2. Create Private Endpoint on the Storage Account side.
  3. Make sure the Storage Account FQDN could be resolved to private endpoint IP from Azure App Service:

Boqian_23-1637044755405.png

 

We can see the similar private IP records as we saw when using the Service Endpoint.

Boqian_24-1637044755407.png

 

But the different between the condition 3 is the Private Endpoint support cross region traffic , and the Service Endpoint only support the connection from the Azure App Service in the same region.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2968642%22%20slang%3D%22en-US%22%3EApp%20Service%20to%20Storage%20Account%20Connection%20Condition%20Summary%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2968642%22%20slang%3D%22en-US%22%3E%3CP%3ECurrently%2C%20there%20are%204%20main%20conditions%20the%20Azure%20App%20Service%20can%20connect%20to%20Azure%20Storage%20Account.%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3ECondition%201%3C%2FSTRONG%3E%3A%20App%20Service%20(Public%20)%20--%26gt%3B%20Storage%20Account%20(Public%2C%20Same%20region)%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ECondition%202%3C%2FSTRONG%3E%3A%20App%20Service%20(Public%20)%20--%26gt%3B%20Storage%20Account%20(Public%2C%20Different%20region)%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ECondition%203%3C%2FSTRONG%3E%3A%20App%20Service%20(Regional%20Vnet%20Integration)%20--%26gt%3B%20Storage%20Account%20(Private%2C%20Service%20Endpoint%20)%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ECondition%204%3C%2FSTRONG%3E%3A%20App%20Service%20(Regional%20Vnet%20Integration)%20--%26gt%3B%20Storage%20Account%20(Private%2C%20Private%20Endpoint)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBefore%20going%20deeper%2C%20here%20is%20a%20brief%20summary%20for%20your%20to%20choose%20the%20suitable%20design%20for%20your%20system.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ERequirements%3C%2FSTRONG%3E%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EIf%20your%20security%20%3CSTRONG%3Erequire%20the%20Firewall%3C%2FSTRONG%3E%20on%20the%20Storage%20Account.%20And%20the%20Storage%20Account%20and%20Azure%20App%20Service%20are%20in%20the%20%3CSTRONG%3Esame%3C%2FSTRONG%3E%20region.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20--%26gt%3B%20Use%20the%20above%20Condition%203%20for%204%20for%20your%20design.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EIf%20your%20security%20%3CSTRONG%3Erequire%20the%20Firewall%3C%2FSTRONG%3E%20on%20the%20Storage%20Account.%20And%20the%20Storage%20Account%20and%20Azure%20App%20Service%20are%20in%20the%20%3CSTRONG%3Edifferent%3C%2FSTRONG%3E%20region.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B--%26gt%3B%20Use%20the%20Condition%201%20or%20Condition%204%20for%20your%20design.%20When%20you%20would%20like%20to%20make%20the%20connection%20private%2C%20use%20the%20Condition%204.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20the%20deeper%20analysis%20for%20the%20above%204%20conditions%2C%20please%20see%20following%3A%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EBackground%20knowledge%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%0A%3CP%3EAzure%20Storage%20Account%20Network%20restricting%20logic%20is%20different%20from%20the%20Azure%20App%20Service.%3C%2FP%3E%0A%3CP%3EEven%20when%20we%20configured%20the%20Network%20restricting%20from%20the%20Azure%20Storage%20Account%20side%2C%20the%20tcpping%20will%20still%20working%20well%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_13-1637044755386.png%22%20style%3D%22width%3A%20614px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327223i4FDD147A148B3BA9%2Fimage-dimensions%2F614x112%3Fv%3Dv2%22%20width%3D%22614%22%20height%3D%22112%22%20role%3D%22button%22%20title%3D%22Boqian_13-1637044755386.png%22%20alt%3D%22Boqian_13-1637044755386.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20the%20%22List%22%20request%20to%20the%20Azure%20Storage%20Account%20will%20not%20be%20locked.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20order%20to%20verify%20if%20the%20Network%20Restricting%20is%20working%20or%20not%2C%20you%20can%20use%20the%20script%20to%20upload%20a%20file%20to%20Azure%20Storage%20Account%20to%20test.%20I%20am%20using%20the%20code%3A%3C%2FP%3E%0A%3CTABLE%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E')%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20print_r(%24result)%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20echo%20('Error%3CBR%20%2F%3E')%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20print_r(curl_error(%24ch))%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20curl_close(%24ch)%3B%3C%2FP%3E%0A%3CP%3E%7D%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EuploadBlob(%24filetoUpload%2C%20%24storageAccount%2C%20%24containerName%2C%20%24blobName%2C%20%24destinationURL%2C%20%24accesskey)%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPreparation%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EWrite%20code%20to%20upload%20the%20file%20to%20Azure%20Storage%20Account%20for%20testing%20as%20mentioned%20in%20above.%20Create%20xxx.php%20file%20under%20the%20wwwroot%20folder%20for%20testing.%3C%2FLI%3E%0A%3CLI%3EEnable%20the%20%22Diagnostic%20settings%22%20from%20Azure%20Portal%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_14-1637044755389.png%22%20style%3D%22width%3A%20681px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327224i606987EFFA8D90E6%2Fimage-dimensions%2F681x397%3Fv%3Dv2%22%20width%3D%22681%22%20height%3D%22397%22%20role%3D%22button%22%20title%3D%22Boqian_14-1637044755389.png%22%20alt%3D%22Boqian_14-1637044755389.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETest%3C%2FSTRONG%3E%3A%3C%2FP%3E%0A%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ECondition%201%3C%2FSTRONG%3E%3A%26nbsp%3B%20App%20Service%20(Public%20)%20--%26gt%3B%20Storage%20Account%20(Public%2C%20Same%20region)%3C%2FP%3E%0A%3CP%3EBy%20Default%2C%20Azure%20App%20Service%20can%20access%20the%20Storage%20Account%20and%20upload%20the%20files.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBut%20if%20we%20enable%20the%20Firewall%20settings%20under%20the%20Networking%20blade%20of%20Storage%20Account%2C%20and%20add%20the%20Azure%20App%20Service%20Outbound%20IP%20to%20the%20whitelist%20like%20following%20screenshot%2C%26nbsp%3Bthe%20Azure%20App%20Service%20will%20still%20%3CSTRONG%3Enot%3C%2FSTRONG%3E%20able%20to%20access%20Azure%20Storage%20Account.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_15-1637044755391.png%22%20style%3D%22width%3A%20629px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327225i607C092BFE71AB0E%2Fimage-dimensions%2F629x465%3Fv%3Dv2%22%20width%3D%22629%22%20height%3D%22465%22%20role%3D%22button%22%20title%3D%22Boqian_15-1637044755391.png%22%20alt%3D%22Boqian_15-1637044755391.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20we%20check%20the%20Azure%20Storage%20Account%20log%2C%20we%20will%20see%20the%20Azure%20App%20Service%20was%20trying%20to%20use%20an%20internal%20IP%20(100.x.x.x)%20to%20access%20the%20Storage%20Account.%20Not%20using%20the%20Azure%20App%20Service%20public%20outbound%20IP%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_16-1637044755393.png%22%20style%3D%22width%3A%20886px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327226i00D24D4EBC6DF76E%2Fimage-dimensions%2F886x29%3Fv%3Dv2%22%20width%3D%22886%22%20height%3D%2229%22%20role%3D%22button%22%20title%3D%22Boqian_16-1637044755393.png%22%20alt%3D%22Boqian_16-1637044755393.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EWhy%3F%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EI%20discussed%20this%20behavior%20with%20the%20Azure%20Storage%20Account%20and%20Azure%20App%20Service%20Product%20Group%2C%20and%20the%20result%20showed%20if%20the%20Azure%20App%20Service%20and%20Azure%20Storage%20Account%20are%20in%20the%20same%20datacenter%2C%20they%20did%20some%20optimization%2C%20so%20the%20Azure%20App%20Service%20will%20always%20reach%20the%20Storage%20Account%20via%20the%20fastest%20route%2C%20so%20the%20resource%20IP%20(Azure%20App%20Service)%20observed%20from%20Azure%20Storage%20Account%20could%20be%20an%20un-predicted%20IP%20(could%20start%20with%20100.x.x.x%20or%2010.x.x.x%20or%20other%20others)%20and%20this%20IP%20could%26nbsp%3B%20change%20at%20any%20time.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EQuestion%3C%2FSTRONG%3E%3A%3C%2FP%3E%0A%3CP%3EConsidering%20the%20resource%20IP%20from%20Azure%20App%20Service%20looks%20like%20start%20with%20100.x.x.x%20for%20now%2C%20if%20I%20whitelist%20the%20100.0.0.0%2F8%20in%20the%20Azure%20Storage%20Account%2C%20will%20the%20Azure%20App%20Service%20can%20upload%20the%20file%20on%20it%3F%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAnswer%3C%2FSTRONG%3E%3A%3C%2FP%3E%0A%3CP%3EYes%20it%20will%20make%20the%20Azure%20App%20Service%20can%20access%20the%20Storage%20Account%20for%20now.%20But%20cannot%20promise%20it%20will%20always%20work%2C%20it%20is%20a%20not%20officially%20support%20scenery.%3C%2FP%3E%0A%3CP%3EBecause%20the%20IP%20could%20change%20to%2010.x.x.x%20and%20some%20other%20un-predicted%20IPs.%20Another%20thing%20is%2C%20the%20x.0.0.0%2F8%20is%20a%20huge%20range%2C%20so%20it%20is%20not%20a%20good%20design.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_17-1637044755414.png%22%20style%3D%22width%3A%20830px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327228i8356F587840C1332%2Fimage-dimensions%2F830x27%3Fv%3Dv2%22%20width%3D%22830%22%20height%3D%2227%22%20role%3D%22button%22%20title%3D%22Boqian_17-1637044755414.png%22%20alt%3D%22Boqian_17-1637044755414.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20would%20like%20to%20enable%20the%20Firewall%20in%20the%20Azure%20Storage%20Account%20and%20would%20like%20to%20make%20sure%20the%20Azure%20App%20Service%20in%20the%20same%20region%20still%20could%20access%20this%20Storage%20Account%2C%20please%20see%20the%20details%20in%20the%20Condition%203%20and%20Condition%204.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ECondition%202%3C%2FSTRONG%3E%3A%20App%20Service%20(Public%20)%20--%26gt%3B%20Storage%20Account%20(Public%2C%20Different%20region)%3C%2FP%3E%0A%3CP%3EAs%20we%20can%20see%20in%20the%20Azure%20Storage%20Account%20log%2C%20the%20Azure%20App%20Service%20is%20using%20the%20public%20IP%20accessing%20the%20Azure%20Storage%20Account%20(13.x.x.x%20is%20one%20of%20the%20public%20outbound%20IP%20of%20my%20test%20Azure%20App%20Service.%20)%3C%2FP%3E%0A%3CP%3EAnd%20you%20%3CSTRONG%3Ecan%3C%2FSTRONG%3E%20enable%20the%20Firewall%20on%20Azure%20Storage%20Account%20and%20whitelist%20all%20the%20Azure%20App%20Service%20outbound%20IP%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Foverview-inbound-outbound-ips%23find-outbound-ips%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EInbound%2FOutbound%20IP%20addresses%20-%20Azure%20App%20Service%20%7C%20Microsoft%20Docs%3C%2FA%3E).%20That%20will%20make%20sure%20the%20Azure%20App%20Service%20can%20always%20access%20the%20Storage%20Account.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_18-1637044755396.png%22%20style%3D%22width%3A%20711px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327227i4CD37125B22DD1AF%2Fimage-dimensions%2F711x32%3Fv%3Dv2%22%20width%3D%22711%22%20height%3D%2232%22%20role%3D%22button%22%20title%3D%22Boqian_18-1637044755396.png%22%20alt%3D%22Boqian_18-1637044755396.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ECondition%203%3C%2FSTRONG%3E%3A%20App%20Service%20(Regional%20Vnet%20Integration)%20--%26gt%3B%20Storage%20Account%20(Private%2C%20Service%20Endpoint%20)%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ECreate%20Vnet%20Integration%20from%20Azure%20App%20Service%20to%20Azure%20Vnet%20Subnet.%3C%2FLI%3E%0A%3CLI%3EMake%20sure%20the%20%22Microsoft.Storage%22%20is%20enabled%20as%20Service%20Endpoint%20for%20the%20Subnet%20that%20App%20Service%20is%20integrated%20with.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_19-1637044755398.png%22%20style%3D%22width%3A%20697px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327229i86EFF210C673B660%2Fimage-dimensions%2F697x285%3Fv%3Dv2%22%20width%3D%22697%22%20height%3D%22285%22%20role%3D%22button%22%20title%3D%22Boqian_19-1637044755398.png%22%20alt%3D%22Boqian_19-1637044755398.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EMake%20sure%20the%20%22Route%20All%22%20is%20enabled%20for%20the%20Vnet%20Integration%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_20-1637044755400.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327230i1BFCE48868A08684%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Boqian_20-1637044755400.png%22%20alt%3D%22Boqian_20-1637044755400.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Fcommon%2Fstorage-network-security%3Ftabs%3Dazure-portal%23available-virtual-network-regions%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3EConfigure%20Azure%20Storage%20firewalls%20and%20virtual%20networks%20%7C%20Microsoft%20Docs%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_21-1637044755402.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327231i49A4103DE9923E74%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Boqian_21-1637044755402.png%22%20alt%3D%22Boqian_21-1637044755402.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20doing%20above%2C%20if%20we%20check%20the%20Azure%20App%20Service%20resource%20IP%2C%20it%20will%20be%20one%20of%20the%20IP%20under%20the%20Vnet%20Subnet%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_22-1637044755403.png%22%20style%3D%22width%3A%20900px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327233i04F32E678AC0427E%2Fimage-dimensions%2F900x24%3Fv%3Dv2%22%20width%3D%22900%22%20height%3D%2224%22%20role%3D%22button%22%20title%3D%22Boqian_22-1637044755403.png%22%20alt%3D%22Boqian_22-1637044755403.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ECondition%204%3C%2FSTRONG%3E%3A%20App%20Service%20(Regional%20Vnet%20Integration)%20--%26gt%3B%20Storage%20Account%20(Private%2C%20Private%20Endpoint)%3C%2FP%3E%0A%3CP%3ESimilar%20configuration%20as%20the%20Condition%203%2C%20but%20please%20make%20sure%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EDisable%20the%20Service%20Endpoint%20on%20the%20Vnet%20Subnet.%3C%2FLI%3E%0A%3CLI%3ECreate%20Private%20Endpoint%20on%20the%20Storage%20Account%20side.%3C%2FLI%3E%0A%3CLI%3EMake%20sure%20the%20Storage%20Account%20FQDN%20could%20be%20resolved%20to%20private%20endpoint%20IP%20from%20Azure%20App%20Service%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_23-1637044755405.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327232i15AD0A398FE6C8D0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Boqian_23-1637044755405.png%22%20alt%3D%22Boqian_23-1637044755405.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20can%20see%20the%20similar%20private%20IP%20records%20as%20we%20saw%20when%20using%20the%20Service%20Endpoint.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Boqian_24-1637044755407.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327234i827B335AE0C1E721%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Boqian_24-1637044755407.png%22%20alt%3D%22Boqian_24-1637044755407.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBut%20the%20different%20between%20the%20condition%203%20is%20the%20Private%20Endpoint%20support%20cross%20region%20traffic%20%2C%20and%20the%20Service%20Endpoint%20only%20support%20the%20connection%20from%20the%20Azure%20App%20Service%20in%20the%20same%20region.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2968642%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20App%20Service%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWeb%20Apps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Nov 16 2021 05:47 PM
Updated by: