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
Improving the deployment to App Services section (#432)
* Improving the deployment to App Services section
- Adding information about the proxies used in app services deployment on Linux containers
- Adding information the client certificates.
* Update 6-Deploy-to-Azure/README.md
Co-authored-by: pmaytak <[email protected]>
Co-authored-by: pmaytak <[email protected]>
Copy file name to clipboardExpand all lines: 6-Deploy-to-Azure/README.md
+28-2Lines changed: 28 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -48,11 +48,37 @@ In the left-hand navigation pane, select the **Azure Active Directory** service,
48
48
1. On the Settings tab, make sure `Enable Organizational Authentication` is NOT selected. Click **Save**. Click on **Publish** on the main screen.
49
49
1. Visual Studio will publish the project and automatically open a browser to the URL of the project. If you see the default web page of the project, the publication was successful.
50
50
51
+
### Case of web apps deployed to App Services as Linux containers
52
+
53
+
#### What is the issue?
54
+
55
+
Normally, Microsoft Identity Web computes the redirect URI automatically depending on the deployed URL.
56
+
57
+
However, when you deploy web apps to App Services as Linux containers, your application will be called by App Services on an HTTP address, whereas its registered redirect URI in the app registration will be HTTPS.
58
+
59
+
This means that when a user browses to the web app, they will be redirected to `login.microsoftonline.com` as expected, but with:
60
+
61
+
```
62
+
redirect_uri=http://<your app service name>.azurewebsites.net/signin-oidc
63
+
```
64
+
65
+
instead of
66
+
67
+
```
68
+
redirect_uri=https://<your app service name>.azurewebsites.net/signin-oidc
69
+
```
70
+
71
+
#### How to fix it?
72
+
73
+
In order to get the right result, the guidance from the ASP.NET Core team for working with proxies is in [Configure ASP.NET Core to work with proxy servers and load balancers](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer). You should address the issue centrally by using `UseForwardedHeaders` to fix the request fields, like scheme.
74
+
75
+
The container scenario should have been addressed by default in .NET Core 3.0. See [Forwarded Headers Middleware Updates in .NET Core 3.0 preview 6](https://devblogs.microsoft.com/aspnet/forwarded-headers-middleware-updates-in-net-core-3-0-preview-6). If there are issues with this for you, please contact the ASP .NET Core team <https://github.com/dotnet/aspnetcore>, as they will be the right team to assist with this.
76
+
51
77
## Key Vault and Managed Service Identity (MSI)
52
78
53
-
Secure key management is essential to protect data in the cloud. Use [Azure Key Vault](https://azure.microsoft.com/en-ca/services/key-vault/) to encrypt keys and small secrets like passwords that use keys stored in hardware security modules (HSMs).
79
+
Secure key management is essential to protect data in the cloud. Use [Azure Key Vault](https://azure.microsoft.com/services/key-vault/) to encrypt certicates/keys and small secrets like passwords that use keys stored in hardware security modules (HSMs). Then Microsoft.Identity.Web leverages Managed Service Identity to retrieve these certificates. For details see [https://aka.ms/ms-id-web-certificates](https://aka.ms/ms-id-web-certificates)
54
80
55
-
Use [this sample](https://github.com/Azure-Samples/app-service-msi-keyvault-dotnet) as a guide on how to use Azure Key Vault from App Service with Managed Service Identity (MSI).
81
+
If you want to retrieve passwords, instead of certificates, see the [app-service-msi-keyvault-dotnet](https://github.com/Azure-Samples/app-service-msi-keyvault-dotnet) sample as a guide on how to use Azure Key Vault from App Service with Managed Service Identity (MSI).
0 commit comments