Skip to content

Commit ddf609d

Browse files
committed
Sync app-service folder
1 parent fd89b08 commit ddf609d

File tree

51 files changed

+656
-361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+656
-361
lines changed

articles/app-service/app-service-authentication-how-to.md

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ description: Shows how to customize authentication and authorization in App Serv
44
services: app-service
55
documentationcenter: ''
66
author: cephalin
7-
manager: cfowler
7+
manager: gwallace
88
editor: ''
99

1010
ms.service: app-service
1111
ms.workload: mobile
1212
ms.tgt_pltfrm: na
1313
ms.topic: article
14-
ms.date: 11/08/2018
14+
ms.date: 09/02/2019
1515
ms.author: cephalin
1616
ms.custom: seodec18
1717
---
@@ -126,7 +126,7 @@ When using fully qualified URLs, the URL must be either hosted in the same domai
126126
GET /.auth/logout?post_logout_redirect_uri=https%3A%2F%2Fmyexternalurl.com
127127
```
128128

129-
You must run the following command in the [Azure Cloud Shell](../cloud-shell/quickstart.md):
129+
Run the following command in the [Azure Cloud Shell](../cloud-shell/quickstart.md):
130130

131131
```azurecli-interactive
132132
az webapp auth update --name <app_name> --resource-group <group_name> --allowed-external-redirect-urls "https://myexternalurl.com"
@@ -193,7 +193,7 @@ When your provider's access token (not the [session token](#extend-session-token
193193

194194
Once your provider is configured, you can [find the refresh token and the expiration time for the access token](#retrieve-tokens-in-app-code) in the token store.
195195

196-
To refresh your access token at anytime, just call `/.auth/refresh` in any language. The following snippet uses jQuery to refresh your access tokens from a JavaScript client.
196+
To refresh your access token at any time, just call `/.auth/refresh` in any language. The following snippet uses jQuery to refresh your access tokens from a JavaScript client.
197197

198198
```JavaScript
199199
function refreshTokens() {
@@ -226,7 +226,7 @@ az webapp auth update --resource-group <group_name> --name <app_name> --token-re
226226
227227
## Limit the domain of sign-in accounts
228228

229-
Both Microsoft Account and Azure Active Directory lets you sign in from multiple domains. For example, Microsoft Account allows _outlook.com_, _live.com_, and _hotmail.com_ accounts. Azure Active Directory allows any number of custom domains for the sign-in accounts. This behavior may be undesirable for an internal app, which you don't want anyone with an _outlook.com_ account to access. To limit the domain name of the sign-in accounts, follow these steps.
229+
Both Microsoft Account and Azure Active Directory lets you sign in from multiple domains. For example, Microsoft Account allows _outlook.com_, _live.com_, and _hotmail.com_ accounts. Azure AD allows any number of custom domains for the sign-in accounts. However, you may want to accelerate your users straight to your own branded Azure AD sign-in page (such as `contoso.com`). To suggest the domain name of the sign-in accounts, follow these steps.
230230

231231
In [https://resources.azure.com](https://resources.azure.com), navigate to **subscriptions** > **_\<subscription\_name_** > **resourceGroups** > **_\<resource\_group\_name>_** > **providers** > **Microsoft.Web** > **sites** > **_\<app\_name>_** > **config** > **authsettings**.
232232

@@ -235,6 +235,54 @@ Click **Edit**, modify the following property, and then click **Put**. Be sure t
235235
```json
236236
"additionalLoginParams": ["domain_hint=<domain_name>"]
237237
```
238+
239+
This setting appends the `domain_hint` query string parameter to the login redirect URL.
240+
241+
> [!IMPORTANT]
242+
> It's possible for the client to remove the `domain_hint` parameter after receiving the redirect URL, and then login with a different domain. So while this function is convenient, it's not a security feature.
243+
>
244+
245+
## Authorize or deny users
246+
247+
While App Service takes care of the simplest authorization case (i.e. reject unauthenticated requests), your app may require more fine-grained authorization behavior, such as limiting access to only a specific group of users. In certain cases, you need to write custom application code to allow or deny access to the signed-in user. In other cases, App Service or your identity provider may be able to help without requiring code changes.
248+
249+
- [Server level](#server-level-windows-apps-only)
250+
- [Identity provider level](#identity-provider-level)
251+
- [Application level](#application-level)
252+
253+
### Server level (Windows apps only)
254+
255+
For any Windows app, you can define authorization behavior of the IIS web server, by editing the *Web.config* file. Linux apps don't use IIS and can't be configured through *Web.config*.
256+
257+
1. Navigate to `https://<app-name>.scm.azurewebsites.net/DebugConsole`
258+
259+
1. In the browser explorer of your App Service files, navigate to *site/wwwroot*. If a *Web.config* doesn't exist, create it by selecting **+** > **New File**.
260+
261+
1. Select the pencil for *Web.config* to edit it. Add the following configuration code and click **Save**. If *Web.config* already exists, just add the `<authorization>` element with everything in it. Add the accounts you want to allow in the `<allow>` element.
262+
263+
```xml
264+
<?xml version="1.0" encoding="utf-8"?>
265+
<configuration>
266+
<system.web>
267+
<authorization>
268+
269+
<deny users="*"/>
270+
</authorization>
271+
</system.web>
272+
</configuration>
273+
```
274+
275+
### Identity provider level
276+
277+
The identity provider may provide certain turn-key authorization. For example:
278+
279+
- For [Azure App Service](configure-authentication-provider-aad.md), you can [manage enterprise-level access](../active-directory/manage-apps/what-is-access-management.md) directly in Azure AD. For instructions, see [How to remove a user's access to an application](../active-directory/manage-apps/methods-for-removing-user-access.md).
280+
- For [Google](configure-authentication-provider-google.md), Google API projects that belong to an [organization](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy#organizations) can be configured to allow access only to users in your organization (see [Google's **Setting up OAuth 2.0** support page](https://support.google.com/cloud/answer/6158849?hl=en)).
281+
282+
### Application level
283+
284+
If either of the other levels don't provide the authorization you need, or if your platform or identity provider isn't supported, you must write custom code to authorize users based on the [user claims](#access-user-claims).
285+
238286
## Next steps
239287

240288
> [!div class="nextstepaction"]

articles/app-service/app-service-key-vault-references.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ editor: ''
99
ms.service: app-service
1010
ms.tgt_pltfrm: na
1111
ms.topic: article
12-
ms.date: 11/20/2018
12+
ms.date: 09/03/2019
1313
ms.author: mahender
1414
ms.custom: seodec18
1515

@@ -35,7 +35,8 @@ In order to read secrets from Key Vault, you need to have a vault created and gi
3535
3636
1. Create an [access policy in Key Vault](../key-vault/key-vault-secure-your-key-vault.md#key-vault-access-policies) for the application identity you created earlier. Enable the "Get" secret permission on this policy. Do not configure the "authorized application" or `applicationId` settings, as this is not compatible with a managed identity.
3737

38-
Granting access to an application identity in key vault is a onetime operation, and it will remain same for all Azure subscriptions. You can use it to deploy as many certificates as you want.
38+
> [!NOTE]
39+
> Key Vault references are not presently able to resolve secrets stored in a key vault with [network restrictions](../key-vault/key-vault-overview-vnet-service-endpoints.md).
3940
4041
## Reference syntax
4142

@@ -181,3 +182,27 @@ An example psuedo-template for a function app might look like the following:
181182

182183
> [!NOTE]
183184
> In this example, the source control deployment depends on the application settings. This is normally unsafe behavior, as the app setting update behaves asynchronously. However, because we have included the `WEBSITE_ENABLE_SYNC_UPDATE_SITE` application setting, the update is synchronous. This means that the source control deployment will only begin once the application settings have been fully updated.
185+
186+
## Troubleshooting Key Vault References
187+
188+
If a reference is not resolved properly, the reference value will be used instead. This means that for application settings, an environment variable would be created whose value has the `@Microsoft.KeyVault(...)` syntax. This may cause the application to throw errors, as it was expecting a secret of a certain structure.
189+
190+
Most commonly, this is due to a misconfiguration of the [Key Vault access policy](#granting-your-app-access-to-key-vault). However, it could also be due to a secret no longer existing or a syntax error in the reference itself.
191+
192+
If the syntax is correct, you can view other causes for error by checking the current resolution status using a built-in detector.
193+
194+
### Using the detector for App Service
195+
196+
1. In the portal, navigate to your app.
197+
2. Select **Diagnose and solve prolems**.
198+
3. Choose **Availability and Performance** and select **Web app down.**
199+
4. Find **Key Vault Application Settings Diagnostics** and click **More info**.
200+
201+
202+
### Using the detector for Azure Functions
203+
204+
1. In the portal, navigate to your app.
205+
2. Navigate to **Platform features.**
206+
3. Select **Diagnose and solve prolems**.
207+
4. Choose **Availability and Performance** and select **Function app down or reporting errors.**
208+
5. Click on **Key Vault Application Settings Diagnostics.**
Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Security attributes for Azure App Service
3-
description: A checklist of security attributes for evaluating Azure App Service
2+
title: Security controls for Azure App Service
3+
description: A checklist of security controls for evaluating Azure App Service
44
services: app-service
55
documentationcenter: ''
66
author: msmbaldwin
@@ -12,55 +12,49 @@ ms.date: 05/08/2019
1212
ms.author: mbaldwin
1313

1414
---
15-
# Security attributes for Azure App Service
15+
# Security controls for Azure App Service
1616

17-
This article documents the security attributes built into Azure App Service.
17+
This article documents the security controls built into Azure App Service.
1818

1919
[!INCLUDE [Security attributes header](../../includes/security-attributes-header.md)]
2020

21-
## Preventative
21+
## Network
2222

23-
| Security attribute | Yes/No | Notes |
23+
| Security control | Yes/No | Notes | Documentation
2424
|---|---|--|
25-
| Encryption at rest (such as server-side encryption, server-side encryption with customer-managed keys, and other encryption features) | Yes | Web site file content is stored in Azure Storage, which automatically encrypts the content at rest. See [Azure Storage encryption for data at rest](../storage/common/storage-service-encryption.md).<br><br>Customer supplied secrets are encrypted at rest. The secrets are encrypted at rest while stored in App Service configuration databases.<br><br>Locally attached disks can optionally be used as temporary storage by websites (D:\local and %TMP%). Locally attached disks are not encrypted at rest. |
26-
| Encryption in transit (such as ExpressRoute encryption, in VNet encryption, and VNet-VNet encryption )| Yes | Customers can configure web sites to require and use HTTPS for inbound traffic. See the blog post [How to make an Azure App Service HTTPS only](https://blogs.msdn.microsoft.com/benjaminperkins/2017/11/30/how-to-make-an-azure-app-service-https-only/). |
27-
| Encryption key handling (CMK, BYOK, etc.)| Yes | Customers can choose to store application secrets in Key Vault and retrieve them at runtime. See [Use Key Vault references for App Service and Azure Functions (preview)](app-service-key-vault-references.md).|
28-
| Column level encryption (Azure Data Services)| N/A | |
29-
| API calls encrypted| Yes | Management calls to configure App Service occur via [Azure Resource Manager](../azure-resource-manager/index.yml) calls over HTTPS. |
30-
31-
## Network segmentation
32-
33-
| Security attribute | Yes/No | Notes |
34-
|---|---|--|
35-
| Service endpoint support| Yes | Currently available in preview for App Service. See [Azure App Service Access Restrictions](app-service-ip-restrictions.md). |
36-
| VNet injection support| Yes | App Service Environments are private implementations of App Service dedicated to a single customer injected into a customer's virtual network. See [Introduction to the App Service Environments](environment/intro.md). |
37-
| Network Isolation and Firewalling support| Yes | For the public multi-tenant variation of App Service, customers can configure network ACLs (IP Restrictions) to lock down allowed inbound traffic. See [Azure App Service Access Restrictions](app-service-ip-restrictions.md). App Service Environments are deployed directly into virtual networks and hence can be secured with NSGs. |
38-
| Forced tunneling support| Yes | App Service Environments can be deployed into a customer's virtual network where forced tunneling is configured. Customers need to follow the directions in [Configure your App Service Environment with forced tunneling](environment/forced-tunnel-support.md). |
25+
| Service endpoint support| Yes | Currently available in preview for App Service.| [Azure App Service Access Restrictions](app-service-ip-restrictions.md)
26+
| VNet injection support| Yes | App Service Environments are private implementations of App Service dedicated to a single customer injected into a customer's virtual network. | [Introduction to the App Service Environments](environment/intro.md)
27+
| Network Isolation and Firewalling support| Yes | For the public multi-tenant variation of App Service, customers can configure network ACLs (IP Restrictions) to lock down allowed inbound traffic. App Service Environments are deployed directly into virtual networks and hence can be secured with NSGs. | [Azure App Service Access Restrictions](app-service-ip-restrictions.md)
28+
| Forced tunneling support| Yes | App Service Environments can be deployed into a customer's virtual network where forced tunneling is configured. | [Configure your App Service Environment with forced tunneling](environment/forced-tunnel-support.md)
3929

40-
## Detection
30+
## Monitoring & logging
4131

42-
| Security attribute | Yes/No | Notes|
32+
| Security control | Yes/No | Notes | Documentation
4333
|---|---|--|
44-
| Azure monitoring support (Log analytics, App insights, etc.)| Yes | App Service integrates with Application Insights for languages that support Application Insights (Full .NET Framework, .NET Core, Java and Node.JS). See [Monitor Azure App Service performance](../azure-monitor/app/azure-web-apps.md). App Service also sends application metrics into Azure Monitor. See [Monitor apps in Azure App Service](web-sites-monitor.md). |
34+
| Azure monitoring support (Log analytics, App insights, etc.)| Yes | App Service integrates with Application Insights for languages that support Application Insights (Full .NET Framework, .NET Core, Java and Node.JS). See [Monitor Azure App Service performance](../azure-monitor/app/azure-web-apps.md). App Service also sends application metrics into Azure Monitor. | [Monitor apps in Azure App Service](web-sites-monitor.md)
35+
| Control and management plane logging and audit| Yes | All management operations performed on App Service objects occur via [Azure Resource Manager](../azure-resource-manager/index.yml). Historical logs of these operations are available both in the portal and via the CLI. | [Azure Resource Manager resource provider operations](../role-based-access-control/resource-provider-operations.md#microsoftweb), [az monitor activity-log](/cli/azure/monitor/activity-log)
36+
| Data plane logging and audit | No | The data plane for App Service is a remote file share containing a customer’s deployed web site content. There is no auditing of the remote file share. |
4537

46-
## Identity and access management
38+
## Identity
4739

48-
| Security attribute | Yes/No | Notes|
40+
| Security control | Yes/No | Notes | Documentation
4941
|---|---|--|
50-
| Authentication| Yes | Customers can build applications on App Service that automatically integrate with [Azure Active Directory (Azure AD)](../active-directory/index.yml) as well as other OAuth compatible identity providers; see [Authentication and authorization in Azure App Service](overview-authentication-authorization.md). For management access to App Service assets, all access is controlled by a combination of Azure AD authenticated principal and Azure Resource Manager RBAC roles. |
51-
| Authorization| Yes | For management access to App Service assets, all access is controlled by a combination of Azure AD authenticated principal and Azure Resource Manager RBAC roles. |
52-
42+
| Authentication| Yes | Customers can build applications on App Service that automatically integrate with [Azure Active Directory (Azure AD)](../active-directory/index.yml) as well as other OAuth compatible identity providers For management access to App Service assets, all access is controlled by a combination of Azure AD authenticated principal and Azure Resource Manager RBAC roles. | [Authentication and authorization in Azure App Service](overview-authentication-authorization.md)
43+
| Authorization| Yes | For management access to App Service assets, all access is controlled by a combination of Azure AD authenticated principal and Azure Resource Manager RBAC roles. | [Authentication and authorization in Azure App Service](overview-authentication-authorization.md)
5344

54-
## Audit trail
45+
## Data protection
5546

56-
| Security attribute | Yes/No | Notes|
47+
| Security control | Yes/No | Notes | Documentation
5748
|---|---|--|
58-
| Control and management plane logging and audit| Yes | All management operations performed on App Service objects occur via [Azure Resource Manager](../azure-resource-manager/index.yml). Historical logs of these operations are available both in the portal and via the CLI; see [Azure Resource Manager resource provider operations](../role-based-access-control/resource-provider-operations.md#microsoftweb) and [az monitor activity-log](/cli/azure/monitor/activity-log). |
59-
| Data plane logging and audit | No | The data plane for App Service is a remote file share containing a customer’s deployed web site content. There is no auditing of the remote file share. |
49+
| Server-side encryption at rest: Microsoft managed keys | Yes | Web site file content is stored in Azure Storage, which automatically encrypts the content at rest. <br><br>Customer supplied secrets are encrypted at rest. The secrets are encrypted at rest while stored in App Service configuration databases.<br><br>Locally attached disks can optionally be used as temporary storage by websites (D:\local and %TMP%). Locally attached disks are not encrypted at rest. | [Azure Storage encryption for data at rest](../storage/common/storage-service-encryption.md)
50+
| Server-side encryption at rest: customer managed keys (BYOK) | Yes | Customers can choose to store application secrets in Key Vault and retrieve them at runtime. | [Use Key Vault references for App Service and Azure Functions (preview)](app-service-key-vault-references.md)
51+
| Column level encryption (Azure Data Services)| N/A | |
52+
| Encryption in transit (such as ExpressRoute encryption, in VNet encryption, and VNet-VNet encryption )| Yes | Customers can configure web sites to require and use HTTPS for inbound traffic. | [How to make an Azure App Service HTTPS only](https://blogs.msdn.microsoft.com/benjaminperkins/2017/11/30/how-to-make-an-azure-app-service-https-only/) (blog post)
53+
| API calls encrypted| Yes | Management calls to configure App Service occur via [Azure Resource Manager](../azure-resource-manager/index.yml) calls over HTTPS. |
6054

6155
## Configuration management
6256

63-
| Security attribute | Yes/No | Notes|
57+
| Security control | Yes/No | Notes | Documentation
6458
|---|---|--|
6559
| Configuration management support (versioning of configuration, etc.)| Yes | For management operations, the state of an App Service configuration can be exported as an Azure Resource Manager template and versioned over time. For runtime operations, customers can maintain multiple different live versions of an application using the App Service deployment slots feature. |
6660

0 commit comments

Comments
 (0)