Azure / Azure/static-web-apps

Securing Azure Function backend api with AzureCloud service tag - change in behaviour

Open
#1,666 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

I have six SWA instances deployed to West Europe (Standard SKU). These all follow the same architecture:

SWA (React FE) -> /api route -> Azure Function (BYO, nodejs - deployed to UK South)

The Azure Function inbound traffic is restricted with "AzureCloud" as the source. This is working fine for the six instances - I cannot reach the function app directly unless I go through the /api/.

A couple of days ago I deployed a seventh instance - exact same architecture, same region etc.

The Azure Function returns a 403 if the "AzureCloud" service tag is present in the inbound traffic restrictions. If I remove the rule, the function app can be reached from the SWA as per the other six.

Debugging the issue, what I can see is that a header is returned in the 403 response for the sixth instance:

"x-ms-forbidden-ip" - (starting [fd00:0:1200)

Testing this against a working instance, I get a different result:

"x-ms-forbidden-ip" - 13.69.116.3

As you can see the above ipv4 address is Azure owned, originating from West Europe - which is expected:

Image

Aside from the firewall seeing an ipv6 address over an ipv4 address. Why doesn't the "AzureCloud" service tag work?

My guess is that the ipv6 address isn't Azure owned or this is missing from the published IP ranges.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.