How can I password protect a demo web application deployed on Azure Web App for Containers?
We don't require elaborate user management right now. A single user with a standard password would suffice.
Thanks
• You can password protect the ‘Azure Web App for Containers’ for a visitor or any member who tries to access the configuration settings, application settings and general settings of that Azure web app. To do so, kindly refer to the below documentation link for building a pipeline through Azure DevOps and creating an Azure web app for containers successfully through yaml file: -
In the above link, you will have to deploy the sample web app to container through the ‘YAML’ code but before that, you will have to build and publish a Docker image to Azure Container Registry and retrieve the image from the container registry by uploading that image through Azure DevOps via Github
.
• Once the above is done, then kindly navigate to the ‘Web App for Container’ created through the Azure portal, then go to ‘Settings --> Configuration --> General settings --> Password protection section --> select Protect staging environments only or Protect both production and staging environments to protect all environments --> Enter a password in ‘Visitor Password’ with required password parameters --> Confirm visitor password --> Save’
For more information, kindly refer to the documentation below: -
https://learn.microsoft.com/en-us/azure/static-web-apps/password-protection
Thus, by following the above document steps, you can configure password protection for your azure web app deployed on container for a single user/visitor.