title | description | author | ms.author | ms.service | ms.topic | ms.date | ms.custom |
---|---|---|---|---|---|---|---|
How to disable public access in Azure App Configuration |
How to disable public access to your Azure App Configuration store. |
maud-lv |
malev |
azure-app-configuration |
how-to |
04/12/2024 |
template-how-to |
In this article, you'll learn how to disable public access for your Azure App Configuration store. Setting up private access can offer better security for your configuration store.
- An Azure account with an active subscription. Create an account for free.
- We assume you already have an App Configuration store. If you want to create one, create an App Configuration store.
You will need to sign in to Azure first to access the App Configuration service.
Sign in to the Azure portal at https://portal.azure.com/ with your Azure account.
Sign in to Azure using the az login
command in the Azure CLI.
az login
This command will prompt your web browser to launch and load an Azure sign-in page. If the browser fails to open, use device code flow with az login --use-device-code
. For more sign in options, go to sign in with the Azure CLI.
Azure App Configuration offers three public access options:
- Automatic public access: public network access is enabled, as long as you don't have a private endpoint present. Once you create a private endpoint, App Configuration disables public network access and enables private access. This option can only be selected when creating the store.
- Disabled: public access is disabled and no traffic can access this resource unless it's through a private endpoint.
- Enabled: all networks can access this resource.
To disable access to the App Configuration store from public network, follow the process below.
-
In your App Configuration store, under Settings, select Networking.
-
Under Public Access, select Disabled to disable public access to the App Configuration store and only allow access through private endpoints. If you already had public access disabled and instead wanted to enable public access to your configuration store, you would select Enabled.
[!NOTE] Once you've switched Public Access to Disabled or Enabled, you won't be able to select Public Access: Automatic anymore, as this option can only be selected when creating the store.
-
Select Apply.
:::image type="content" source="media/disable-public-access.png" alt-text="Screenshot of the Azure portal disabling public access.":::
In the CLI, run the following code:
az appconfig update --name <name-of-the-appconfig-store> --enable-public-network false
Note
When you create an App Config store without specifying if you want public access to be enabled or disabled, public access is set to automatic by default. After you've run the --enable-public-network
command, you won't be able to switch to an automatic public access anymore.
[!div class="nextstepaction"] Use private endpoints for Azure App Configuration
[!div class="nextstepaction"] Set up private access to an Azure App Configuration store