feat: Restrict API to Private Access#2209
Open
Priyanka-Microsoft wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces support for secure, private-only networking for the backend Function App when running in container hosting mode with WAF enabled. It ensures the Function App is only accessible via private endpoints, except during deployment, when public access is temporarily enabled to allow deployment tools to function. The changes also clarify deployment behaviors for both container and code hosting models, and add supporting scripts and documentation.
Infrastructure and Networking Enhancements:
publicNetworkAccess=Disabledand private endpoint with DNS) whenenablePrivateNetworking=trueandAZURE_APP_SERVICE_HOSTING_MODEL=container. Public access is temporarily enabled during deployment and restored to private-only after. [1] [2] [3] [4]privatelink.azurewebsites.netDNS zone and related indexing to support the Function App’s private endpoint. [1] [2] [3] [4]Deployment Automation:
azure.yamlto run new scripts that toggle Function App public network access before and after deployment, ensuring deployments succeed while maintaining private-only access outside of deployment windows. [1] [2]scripts/function_network_toggle.ps1for Windows,scripts/function_network_toggle.shfor POSIX) that safely enable/disable public access only when required and only for container hosting. [1] [2]Documentation Updates:
README.mdanddocs/LOCAL_DEPLOYMENT.mdto explain the new WAF/private networking deployment flow, including differences between container and code hosting models, and what to expect regarding network access during deployment and at runtime. [1] [2]These changes improve security and compliance for deployments requiring private networking, while maintaining a smooth deployment experience.
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information