Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private endpoints on SWA feature working properly for Production but incorrectly for Staging environments. #1502

Open
v-jesume opened this issue Jun 24, 2024 · 3 comments

Comments

@v-jesume
Copy link

Describe the bug
Following the documentation to enable Private Endpoints on SWAs we noticed that after enabling the private endpoints, as expected, the prod environment will return a 403 when trying to access from machines outside of the Private Endpoint's network and you will be able to see the content when the machine that you are using is in the same VNET as the Private Endpoint, however if we create a staging branch/environment, this one is not returning a 403 as Prod when trying to access from any machines outside of the Private Endpoint's VNET, which seems to be a contradiction with this statement in the documentation.

https://learn.microsoft.com/en-us/azure/static-web-apps/private-endpoint
"This behavior applies to both the production environment as well as any staging environments."

Additionally, if you try to access that staging url from a VM that it is inside the same network as the Private Endpoint, this one will be rejected and will get a 403, so it seems like the staging branches are behaving the opposite way we should expect based on the documentation.

Through a support ticket, we got confirmation from the Static Web App team that this is indeed an unexpected behavior and that they are already working on a fix for this, however we were unlucky getting an ETA. Opening this GitHub issue in case we could get an update on this problem and any expected date for the fix to be released, as it would help any user that faces with this same concern.

To Reproduce
Steps to reproduce the behavior:

  1. Create a SWA using Standard tier.
  2. Enable Private Endpoints to this SWA.
  3. After successfully enabling Private Endpoints, if you try to open the SWA url from a machine outside the PE network you should face a 403: Forbidden screen.
  4. Next, in order to see the content of the SWA, I linked an Azure VM's vnet inside the PE's Private DNS zone configuration.
  5. Now that you are able to see Prod, create a staging environment for the SWA (used GitHub actions to deploy in this case)
  6. After successfully create the pull request, create and deploy the code in that staging branch, you will notice that if you try to access the staging url from the VM, you will face a 403 and if you try to access from any other network, you will be able to see the content, when this should not be the case.

Expected behavior
The expected would be that both staging, and production environment will be accessible only if reaching through the PE's network/private ip.

@mablanco
Copy link

mablanco commented Jul 1, 2024

I'm also hitting this exact issue in my current project 😔 Really interested in a solution.

@MohdmM01
Copy link

I am also facing the same issue where private endpoints works correctly in Production but fails with Staging environment.

@OJonesMatthey
Copy link

OJonesMatthey commented Jul 15, 2024

We are facing this issue too where the staging branch has the same unexpected behaviour, it is not accessible within the VNET but is accessible from outside it, the opposite of the release branch. This could be a serious problem for customers leaking data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants