Static web app security at azure

Heikki Vilppu 0 Reputation points
2023-10-16T08:49:45.0866667+00:00

We are about to make a static web app as:

https://learn.microsoft.com/en-us/azure/static-web-apps/

  1. frontend is Vue.
  2. backend is Web App type Asp .NET API written with C# in Azure.
  3. backend is linked to UI in Azure static Web App APISs management.
  4. we use Azure AD as an authentication provider
  5. staticwebapp.config.json is configured correctly for API routes

As we can read here:

https://learn.microsoft.com/en-us/azure/static-web-apps/apis-app-service

"By default, when an App Service app is linked to a static web app, the App Service app only accepts requests that are proxied through the linked static web app. An Azure App Service app can only be linked to a single static web app at a time."

Now the questions are:

  1. How we can be 100% sure on the backend that roles (in x-ms-client-principal header) are not edited/hacked on frontend
  2. How we be 100% sure that App Service does not accept requests outside static web app UI?
  3. Is this setup secure or are there known problems?
Developer technologies ASP.NET ASP.NET Core
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,173 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 19,151 Reputation points Moderator
    2023-10-26T23:46:43.1033333+00:00

    @Heikki Vilppu thanks for the question.

    By default, Static Web Apps environments are publicly accessible, but you can configure a password and require visitors to enter it before viewing the app. Azure Static Web Apps provides a streamlined authentication experience, where no other actions or configurations are required to use GitHub, Twitter, and Azure Active Directory (Azure AD) for authentication. Azure App Service lets you secure your apps with HTTPS, and provides other security features such as static IP restrictions, client authentication and authorization, service-to-service authentication, and network isolation

    Regarding your 3 questions:

    Hope this helps!

    -Grace

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.