Skip to content

Commit f3a5156

Browse files
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into swa/byo-afd
2 parents b22bae0 + bf1cc5f commit f3a5156

File tree

7 files changed

+115
-7
lines changed

7 files changed

+115
-7
lines changed

articles/active-directory/managed-identities-azure-resources/how-to-assign-app-role-managed-identity-cli.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ ms.custom: devx-track-azurepowershell
2222

2323
Managed identities for Azure resources provide Azure services with an identity in Azure Active Directory. They work without needing credentials in your code. Azure services use this identity to authenticate to services that support Azure AD authentication. Application roles provide a form of role-based access control, and allow a service to implement authorization rules.
2424

25+
> [!NOTE]
26+
> The tokens which your application receives are cached by the underlying infrastructure, which means that any changes to the managed identity's roles can take significant time to take effect. For more information, see [Limitation of using managed identities for authorization](managed-identity-best-practice-recommendations.md#limitation-of-using-managed-identities-for-authorization).
27+
2528
In this article, you learn how to assign a managed identity to an application role exposed by another application using Azure CLI.
2629

2730
## Prerequisites

articles/active-directory/managed-identities-azure-resources/how-to-assign-app-role-managed-identity-powershell.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ ms.custom: devx-track-azurepowershell
2222

2323
Managed identities for Azure resources provide Azure services with an identity in Azure Active Directory. They work without needing credentials in your code. Azure services use this identity to authenticate to services that support Azure AD authentication. Application roles provide a form of role-based access control, and allow a service to implement authorization rules.
2424

25+
> [!NOTE]
26+
> The tokens which your application receives are cached by the underlying infrastructure, which means that any changes to the managed identity's roles can take significant time to take effect. For more information, see [Limitation of using managed identities for authorization](managed-identity-best-practice-recommendations.md#limitation-of-using-managed-identities-for-authorization).
27+
2528
In this article, you learn how to assign a managed identity to an application role exposed by another application using Azure AD PowerShell.
2629

2730
[!INCLUDE [az-powershell-update](../../../includes/updated-for-az.md)]

articles/active-directory/managed-identities-azure-resources/managed-identities-faq.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Managed identities use certificate-based authentication. Each managed identity
101101

102102
### What identity will IMDS default to if don't specify the identity in the request?
103103

104-
- If system assigned managed identity is enabled and no identity is specified in the request, IMDS defaults to the system assigned managed identity.
104+
- If system assigned managed identity is enabled and no identity is specified in the request, Azure Instance Metadata Service (IMDS) defaults to the system assigned managed identity.
105105
- If system assigned managed identity is not enabled, and only one user assigned managed identity exists, IMDS defaults to that single user assigned managed identity.
106106
- If system assigned managed identity is not enabled, and multiple user assigned managed identities exist, then you are required to specify a managed identity in the request.
107107

@@ -143,6 +143,10 @@ Managed identities limits have dependencies on Azure service limits, Azure Insta
143143

144144
Moving a user-assigned managed identity to a different resource group is not supported.
145145

146+
### Are tokens cached after they are issued for a managed identity?
147+
148+
Managed identity tokens are cached by the underlying Azure infrastructure for performance and resiliency purposes: the back-end services for managed identities maintain a cache per resource URI for around 24 hours. This means that it can take several hours for changes to a managed identity's permissions to take effect, for example. Today, it is not possible to force a managed identity's token to be refreshed before its expiry. For more information, see [Limitation of using managed identities for authorization](managed-identity-best-practice-recommendations.md#limitation-of-using-managed-identities-for-authorization).
149+
146150
## Next steps
147151

148152
- Learn [how managed identities work with virtual machines](how-managed-identities-work-vm.md)

articles/active-directory/managed-identities-azure-resources/managed-identity-best-practice-recommendations.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,12 @@ will be displayed with “Identity not found” when viewed in the portal. [Read
106106

107107
:::image type="content" source="media/managed-identity-best-practice-recommendations/identity-not-found.png" alt-text="Identity not found for role assignment.":::
108108

109-
## Limitation of using Azure AD Groups with managed identities for authorization
109+
## Limitation of using managed identities for authorization
110110

111-
Using Azure AD Groups for granting access to services is a great way to simplify the authorization process. The idea is simple – grant permissions to a group and add identities to the group so that they inherit the same permissions. This is a well-established pattern from various on-premises systems and works well when the identities represent users. However, for non-human identities, such as Azure AD Applications and Managed identities, the exact mechanism is not well suited today. Today’s implementation with Azure AD and Azure Role Based Access Control (Azure RBAC), uses access tokens issued by Azure AD for authentication of each identity. However, if the identity is added to a group, its group membership is expressed as a claim in the access token issued by Azure AD. Azure RBAC uses this claim to further evaluate the authorization rules for allowing or denying access.
111+
Using Azure AD **groups** for granting access to services is a great way to simplify the authorization process. The idea is simple – grant permissions to a group and add identities to the group so that they inherit the same permissions. This is a well-established pattern from various on-premises systems and works well when the identities represent users. Another option to control authorization in Azure AD is by using [App Roles](../develop/howto-add-app-roles-in-azure-ad-apps.md), which allows you to declare **roles** that are specific to an app (rather than groups, which are a global concept in the directory). You can then [assign app roles to managed identities](how-to-assign-app-role-managed-identity-powershell.md) (as well as users or groups).
112112

113-
As the group membership is a claim in the access token, group membership changes do not take effect until the token is refreshed. A human user can acquire a new access token by logging out and in again. Managed identity tokens are cached by the underlying Azure infrastructure for performance and resiliency purposes. This means that it can take several hours for changes to a managed identity’s group membership to take effect. Today, it is not possible to force a managed identity’s token to be refreshed before its expiry. If you change a managed identity’s group membership to add or remove permissions, you may therefore need to wait several hours for the Azure resource using the identity to have the correct access, compared to just a few minutes if you were to add or remove permissions directly on the identity.
113+
In both cases, for non-human identities such as Azure AD Applications and Managed identities, the exact mechanism of how this authorization information is presented to the application is not ideally suited today. Today's implementation with Azure AD and Azure Role Based Access Control (Azure RBAC) uses access tokens issued by Azure AD for authentication of each identity. If the identity is added to a group or role, this is expressed as claims in the access token issued by Azure AD. Azure RBAC uses these claims to further evaluate the authorization rules for allowing or denying access.
114114

115-
To ensure that changes to permissions for managed identities take effect quickly, we recommend that you group Azure resources using a [user-assigned managed identity](how-manage-user-assigned-managed-identities.md?pivots=identity-mi-methods-azcli) with permissions applied directly to the identity, instead of adding to or removing managed identities from an Azure AD group that has permissions. A user-assigned managed identity can be used like a group because it can be assigned to one or more Azure resources to use it. The assignment operation can be controlled using the [Managed identity contributor](../../role-based-access-control/built-in-roles.md#managed-identity-contributor) and [Managed identity operator role](../../role-based-access-control/built-in-roles.md#managed-identity-operator).
115+
Given that the identity's groups and roles are claims in the access token, any authorization changes do not take effect until the token is refreshed. For a human user that's typically not a problem, because a user can acquire a new access token by logging out and in again (or waiting for the token lifetime to expire, which is 1 hour by default). Managed identity tokens on the other hand are cached by the underlying Azure infrastructure for performance and resiliency purposes: the back-end services for managed identities maintain a cache per resource URI for around 24 hours. This means that it can take several hours for changes to a managed identity's group or role membership to take effect. Today, it is not possible to force a managed identity's token to be refreshed before its expiry. If you change a managed identity’s group or role membership to add or remove permissions, you may therefore need to wait several hours for the Azure resource using the identity to have the correct access.
116+
117+
If this delay is not acceptable for your requirements, consider alternatives to using groups or roles in the token. To ensure that changes to permissions for managed identities take effect quickly, we recommend that you group Azure resources using a [user-assigned managed identity](how-manage-user-assigned-managed-identities.md?pivots=identity-mi-methods-azcli) with permissions applied directly to the identity, instead of adding to or removing managed identities from an Azure AD group that has permissions. A user-assigned managed identity can be used like a group because it can be assigned to one or more Azure resources to use it. The assignment operation can be controlled using the [Managed identity contributor](../../role-based-access-control/built-in-roles.md#managed-identity-contributor) and [Managed identity operator role](../../role-based-access-control/built-in-roles.md#managed-identity-operator).

articles/static-web-apps/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
- name: Enable monitoring
7676
href: monitor.md
7777
displayName: Application Insights
78+
- name: Enable enterprise-grade edge
79+
href: enterprise-edge.md
7880
- name: Reset deployment tokens
7981
href: deployment-token-management.md
8082
- name: Troubleshoot errors

articles/static-web-apps/authentication-custom.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,19 +302,20 @@ If you are using Azure Active Directory, use `aad` as the value for the `<PROVID
302302
> [!Note]
303303
> These URLs are provided by Azure Static Web Apps to receive the response from the authentication provider, you don't need to create pages at these routes.
304304
305-
## Login, logout, and purging user details
305+
## Login, logout, and user details
306306

307307
To use a custom identity provider, use the following URL patterns.
308308

309309
| Action | Pattern |
310310
| ------------------ | ---------------------------------------- |
311311
| Login | `/.auth/login/<PROVIDER_NAME_IN_CONFIG>` |
312312
| Logout | `/.auth/logout` |
313+
| User details | `/.auth/me` |
313314
| Purge user details | `/.auth/purge/<PROVIDER_NAME_IN_CONFIG>` |
314315

315316
If you are using Azure Active Directory, use `aad` as the value for the `<PROVIDER_NAME_IN_CONFIG>` placeholder.
316317

317318
## Next steps
318319

319320
> [!div class="nextstepaction"]
320-
> [Securing authentication secrets in Azure Key Vault](./key-vault-secrets.md)
321+
> [Set user roles programmatically](./assign-roles-microsoft-graph.md)
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: Enterprise-grade edge (preview) in Azure Static Web Apps
3+
description: Learn about Azure Static Web Apps enterprise-grade edge (Preview)
4+
services: static-web-apps
5+
author: craigshoemaker
6+
ms.service: static-web-apps
7+
ms.topic: how-to
8+
ms.date: 01/11/2021
9+
ms.author: cshoe
10+
---
11+
12+
# Enterprise-grade edge (Preview)
13+
14+
Use Azure Static Web Apps enterprise-grade edge (Preview) to enable faster page loads, enhance security, and optimize reliability for your global applications. Enterprise edge combines the capabilities of Azure Static Web Apps, Azure Front Door, and Azure Content Delivery Network (CDN) into a single secure cloud CDN platform.
15+
16+
Key features of Azure Static Web Apps enterprise-grade edge include:
17+
18+
* Global presence in 118+ [edge locations](/azure/frontdoor/edge-locations-by-region) across 100 metro cities.
19+
20+
* Caching assets at the [edge](/azure/frontdoor/front-door-caching).
21+
22+
* Proactive protection against [Distributed Denial of Service (DDoS) attacks](/azure/frontdoor/front-door-ddos).
23+
24+
* Native support of end-to-end IPv6 connectivity and [HTTP/2 protocol](/azure/frontdoor/front-door-http2.md).
25+
26+
* Optimized file compression.
27+
28+
> [!NOTE]
29+
> Static Web Apps enterprise-grade edge is currently in preview.
30+
31+
## Caching
32+
33+
When enterprise-grade edge is enabled for your static web app, you benefit from caching at various levels.
34+
35+
* **CDN**: Caching content on edge locations as physically close to users a possible to reduce latency.
36+
37+
* **DNS**: Caching DNS records for faster lookups.
38+
39+
* **Browser**: Files are stored in the browser and returned for identical requests.
40+
41+
For further control, you can also create [custom cache control headers](configuration.md) for your static web app.
42+
43+
## Configuration types
44+
45+
You can enable enterprise-grade edge powered by Azure Front Door via a managed experience through the Azure portal, or you [can set it up manually](front-door-manual.md).
46+
47+
A managed experience provides:
48+
49+
* Zero configuration changes
50+
* No downtime
51+
* Automatically managed SSL certifications and custom domains
52+
53+
A manual setup gives you full control over the CDN configuration including the chance to:
54+
55+
* Limit traffic origin by origin
56+
* Add a web application firewall
57+
* Use more advanced features of Azure Front Door
58+
59+
## Enable enterprise-grade edge
60+
61+
### Prerequisites
62+
63+
* [Custom domain](./custom-domain.md) configured for your static web app with a time to live (TTL) set to less than 48 hrs.
64+
* An application deployed with [Azure Static Web Apps](./get-started-portal.md) that uses the Standard hosting plan.
65+
66+
# [Azure portal](#tab/azure-portal)
67+
68+
1. Navigate to your static web app in the Azure portal.
69+
70+
1. Select **Enterprise-grade edge** in the left menu.
71+
72+
1. Check the box labeled **Enable enterprise-grade edge**.
73+
74+
1. Select **Save**.
75+
76+
1. Select **OK** to confirm the save.
77+
78+
Enabling this feature incurs extra costs.
79+
80+
# [Azure CLI](#tab/azure-cli)
81+
82+
```azurecli
83+
az extension add -n enterprise-edge
84+
85+
az staticwebapp enterprise-edge enable -n my-static-webapp -g my-resource-group
86+
```
87+
88+
---
89+
90+
## Next steps
91+
92+
> [!div class="nextstepaction"]
93+
> [Application configuration](configuration.md)

0 commit comments

Comments
 (0)