You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/app-service-configuration-references.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Use App Configuration References
3
-
description: Learn how to set up Azure App Service and Azure Functions to use Azure App Configuration references. Make App Configuration key-value pairs available to your application code without changing it.
3
+
description: Learn how to set up Azure App Service and Azure Functions to use Azure App Configuration references. Make App Configuration key/value pairs available to your application code without changing it.
4
4
author: muksvso
5
5
6
6
ms.topic: how-to
@@ -15,7 +15,7 @@ This article shows you how to work with configuration data in your Azure App Ser
15
15
16
16
## Grant app access to App Configuration
17
17
18
-
To get started with using App Configuration references in App Service, first you create an App Configuration store. Then, you grant permissions to your app to access the configuration key-value pairs that are in the store.
18
+
To get started with using App Configuration references in App Service, first you create an App Configuration store. Then, you grant permissions to your app to access the configuration key/value pairs that are in the store.
19
19
20
20
1. To create an App Configuration store, complete the [App Configuration quickstart](../azure-app-configuration/quickstart-azure-app-configuration-create.md).
21
21
@@ -45,10 +45,10 @@ This configuration applies to all references from this app.
45
45
46
46
## Grant your app access to referenced key vaults
47
47
48
-
In addition to storing raw configuration values, Azure App Configuration has its own format for storing [key vault references][app-config-key-vault-references]. If the value of an App Configuration reference is a key vault reference in the App Configuration store, your app also must have permissions to access the key vault that is specified in the reference.
48
+
In addition to storing raw configuration values, Azure App Configuration has its own format for storing [Azure Key Vault references][app-config-key-vault-references]. If the value of an App Configuration reference is a Key Vault reference in the App Configuration store, your app also must have permissions to access the key vault that is specified in the reference.
49
49
50
50
> [!NOTE]
51
-
> The [App Configuration key vault references concept][app-config-key-vault-references] shouldn't be confused with [the App Service and Azure Functions key vault references concept][app-service-key-vault-references]. Your app can use any combination of these references, but there are some important differences. If your vault needs to be network restricted or if you need the app to periodically update to latest versions, consider using the App Service and Azure Functions direct approach instead of using an App Configuration reference.
51
+
> The [App Configuration Key Vault references concept][app-config-key-vault-references] shouldn't be confused with [the App Service and Azure Functions Key Vault references concept][app-service-key-vault-references]. Your app can use any combination of these references, but there are some important differences. If your vault needs to be network restricted or if you need the app to periodically update to latest versions, consider using the App Service and Azure Functions direct approach instead of using an App Configuration reference.
Any configuration change to the app that results in a site restart causes an immediate refetch of all referenced key-value pairs from the App Configuration store.
84
+
Any configuration change to the app that results in a site restart causes an immediate refetch of all referenced key/value pairs from the App Configuration store.
85
85
86
86
> [!NOTE]
87
-
> Automatic refresh and refetch of these values when the key-value pairs are updated in App Configuration currently isn't supported.
87
+
> Automatic refresh and refetch of these values when the key/value pairs are updated in App Configuration currently isn't supported.
88
88
89
89
## Source application settings from App Configuration
90
90
91
-
You can use App Configuration references as values for [application settings](configure-common.md#configure-app-settings), so you can keep configuration data in App Configuration instead of in the site configuration settings. Application settings and App Configuration key-value pairs both are securely encrypted at rest. If you need centralized configuration management capabilities, add configuration data to App Configuration.
91
+
You can use App Configuration references as values for [application settings](configure-common.md#configure-app-settings), so you can keep configuration data in App Configuration instead of in the site configuration settings. Application settings and App Configuration key/value pairs both are securely encrypted at rest. If you need centralized configuration management capabilities, add configuration data to App Configuration.
92
92
93
93
To use an App Configuration reference for an [app setting](configure-common.md#configure-app-settings), set the reference as the value of the setting. Your app can reference the Configuration value through its key as usual. No code changes are required.
94
94
@@ -241,7 +241,7 @@ Here's a demonstration template for a function app that has App Configuration re
241
241
242
242
If a reference isn't resolved properly, the reference value is used instead. For an application setting in this scenario, an environment variable that uses the syntax `@Microsoft.AppConfiguration(...)` is created. The reference might cause an error because the application was expecting a configuration value.
243
243
244
-
This error most commonly is the result of a misconfiguration of the [App Configuration access policy](#grant-app-access-to-app-configuration). But it also might occur if there's a syntax error in the reference or if the configuration key-value pair doesn't exist in the store.
244
+
This error most commonly is the result of a misconfiguration of the [App Configuration access policy](#grant-app-access-to-app-configuration). But it also might occur if there's a syntax error in the reference or if the configuration key/value pair doesn't exist in the store.
For Azure Resource Manager templates (ARM templates), modify the properties `clientCertEnabled`, `clientCertMode`, and `clientCertExclusionPaths`. A sample ARM template snippet is provided for you:
76
+
For Azure Resource Manager templates (ARM templates), modify the `clientCertEnabled`, `clientCertMode`, and `clientCertExclusionPaths` properties.
77
+
78
+
Here's a sample ARM template snippet:
74
79
75
-
```ARM
80
+
```json
76
81
{
77
82
"type": "Microsoft.Web/sites",
78
83
"apiVersion": "2020-06-01",
@@ -97,7 +102,7 @@ For Azure Resource Manager templates (ARM templates), modify the properties `cli
97
102
98
103
## Exclude paths from requiring authentication
99
104
100
-
When you enable mutual auth for your application, all paths under the root of your app require a client certificate for access. To remove this requirement for certain paths, define exclusion paths as part of your application configuration.
105
+
When you enable mutual authentication for your application, all paths under the root of your app require a client certificate for access. To remove this requirement for certain paths, define exclusion paths as part of your application configuration.
101
106
102
107
> [!NOTE]
103
108
> Using any client certificate exclusion path triggers TLS renegotiation for incoming requests to the app.
@@ -147,7 +152,7 @@ In App Service, TLS termination of the request happens at the front-end load bal
147
152
148
153
For ASP.NET, the client certificate is available through the `HttpRequest.ClientCertificate` property.
149
154
150
-
For other application stacks (Node.js, PHP), the client cert is available in your app through a base64-encoded value in the `X-ARR-ClientCert` request header.
155
+
For other application stacks (Node.js, PHP), the client certificate is available in your app through a Base64-encoded value in the `X-ARR-ClientCert` request header.
151
156
152
157
## ASP.NET Core sample
153
158
@@ -342,7 +347,7 @@ public class Startup
342
347
343
348
## Node.js sample
344
349
345
-
The following Node.js sample code gets the `X-ARR-ClientCert` header and uses [node-forge](https://github.com/digitalbazaar/forge) to convert the base64-encoded Privacy Enhanced Mail (PEM) string into a certificate object and validate it:
350
+
The following Node.js sample code gets the `X-ARR-ClientCert` header and uses [node-forge](https://github.com/digitalbazaar/forge) to convert the Base64-encoded Privacy Enhanced Mail (PEM) string into a certificate object and validate it:
|`X-MS-CLIENT-PRINCIPAL`| A base64-encoded JSON representation of available claims. For more information, see [Decode the client principal header](#decode-the-client-principal-header). |
23
+
|`X-MS-CLIENT-PRINCIPAL`| A Base64-encoded JSON representation of available claims. For more information, see [Decode the client principal header](#decode-the-client-principal-header). |
24
24
|`X-MS-CLIENT-PRINCIPAL-ID`| An identifier for the caller, which the identity provider sets. |
25
25
|`X-MS-CLIENT-PRINCIPAL-NAME`| A human-readable name for the caller, set by the identity provider, such as an email address or a user principal name. |
26
26
|`X-MS-CLIENT-PRINCIPAL-IDP`| The name of the identity provider that App Service authentication uses. |
@@ -34,7 +34,7 @@ Code that is written in any language or framework can get the information that i
34
34
35
35
### Decode the client principal header
36
36
37
-
`X-MS-CLIENT-PRINCIPAL` contains the full set of available claims as base64-encoded JSON. These claims go through a default claims-mapping process, so some might have different names than you would see if you processed the token directly.
37
+
`X-MS-CLIENT-PRINCIPAL` contains the full set of available claims as Base64-encoded JSON. These claims go through a default claims-mapping process, so some might have different names than you would see if you processed the token directly.
38
38
39
39
Here's how the decoded payload is structured:
40
40
@@ -61,7 +61,7 @@ Here's how the decoded payload is structured:
61
61
|`name_typ`| string | The name claim type, which is typically a URI that provides scheme information about the `name` claim if one is defined. |
62
62
|`role_typ`| string | The role claim type, which is typically a URI that provides scheme information about the `role` claim if one is defined. |
63
63
64
-
To process this header, your app must decode the payload and iterate through the `claims` array to find relevant claims. It might be convenient to convert claims into a representation that the app's language framework uses. Here's an example of this process in C# that constructs a [ClaimsPrincipal](/dotnet/api/system.security.claims.claimsprincipal) type for the app to use:
64
+
To process this header, your app must decode the payload and iterate through the `claims` array to find relevant claims. It might be convenient to convert claims into a representation that the app's language framework uses. Here's an example of this process in C# that constructs a [`ClaimsPrincipal`](/dotnet/api/system.security.claims.claimsprincipal) type for the app to use:
65
65
66
66
```csharp
67
67
usingSystem;
@@ -127,11 +127,11 @@ public static class ClaimsPrincipalParser
127
127
128
128
### Framework-specific alternatives
129
129
130
-
For ASP.NET 4.6 apps, App Service populates [ClaimsPrincipal.Current](/dotnet/api/system.security.claims.claimsprincipal.current) with the authenticated user's claims. You can follow the standard .NET code pattern, including the `[Authorize]` attribute. Similarly, for PHP apps, App Service populates the `_SERVER['REMOTE_USER']` variable. For Java apps, the claims are [accessible from the Tomcat servlet](configure-language-java-security.md#authenticate-users-easy-auth).
130
+
For ASP.NET 4.6 apps, App Service populates [`ClaimsPrincipal.Current`](/dotnet/api/system.security.claims.claimsprincipal.current) with the authenticated user's claims. You can follow the standard .NET code pattern, including the [`Authorize`] attribute. Similarly, for PHP apps, App Service populates the `_SERVER['REMOTE_USER']` variable. For Java apps, the claims are [accessible from the Tomcat servlet](configure-language-java-security.md#authenticate-users-easy-auth).
131
131
132
132
For [Azure Functions](../azure-functions/functions-overview.md), `ClaimsPrincipal.Current` isn't populated for .NET code, but you can still find the user claims in the request headers, or get the `ClaimsPrincipal` object from the request context or even through a binding parameter. For more information, see [Work with client identities in Azure Functions](../azure-functions/functions-bindings-http-webhook-trigger.md#working-with-client-identities).
133
133
134
-
For .NET Core, [Microsoft.Identity.Web](https://www.nuget.org/packages/Microsoft.Identity.Web/) supports populating the current user with App Service authentication. To learn more, review the [Microsoft.Identity.Web wiki](https://github.com/AzureAD/microsoft-identity-web/wiki/1.2.0#integration-with-azure-app-services-authentication-of-web-apps-running-with-microsoftidentityweb) or see it demonstrated in [this tutorial for a web app accessing Microsoft Graph](./scenario-secure-app-access-microsoft-graph-as-user.md?tabs=command-line#install-client-library-packages).
134
+
For .NET Core, [`Microsoft.Identity.Web`](https://www.nuget.org/packages/Microsoft.Identity.Web/) supports populating the current user with App Service authentication. To learn more, review the [Microsoft.Identity.Web wiki](https://github.com/AzureAD/microsoft-identity-web/wiki/1.2.0#integration-with-azure-app-services-authentication-of-web-apps-running-with-microsoftidentityweb) or see it demonstrated in [this tutorial for a web app accessing Microsoft Graph](./scenario-secure-app-access-microsoft-graph-as-user.md?tabs=command-line#install-client-library-packages).
135
135
136
136
> [!NOTE]
137
137
> For claims mapping to work, you must enable the [token store](overview-authentication-authorization.md#token-store).
1. On the resource menu, select **Deployment Center** > **Settings**.
110
110
1. For **Source**, select **Local Git**, and then select **Save**.
111
111
112
-

112
+
:::image type="content" source="media/deploy-local-git/enable-portal.png" alt-text="Screenshot that shows how to enable local Git deployment for App Service in the Azure portal.":::
113
113
114
114
1. In the **Local Git** section, copy the value for **Git Clone Uri** to use later. This URI doesn't contain any sign-in information.
115
115
@@ -154,7 +154,7 @@ When you push commits to your App Service repository, App Service deploys the fi
154
154
155
155
To do it by using the Azure CLI:
156
156
157
-
```azurecli-interactive
157
+
```azurecli
158
158
az webapp config appsettings set --name <app-name> --resource-group <group-name> --settings DEPLOYMENT_BRANCH='main'
# Application Gateway integration with Azure App Service overview
14
+
# What is Application Gateway integration with Azure App Service?
15
15
16
16
This article describes how to configure Azure Application Gateway with Azure App Service by using private endpoints to secure traffic. The article also discusses considerations for using service endpoints and integrating with internal and external App Service Environments. The article describes how to set access restrictions on a Source Control Manager (SCM) site.
0 commit comments