|
| 1 | +--- |
| 2 | +title: Migrate applications to Azure AD B2C with Grit's app proxy |
| 3 | +titleSuffix: Azure AD B2C |
| 4 | +description: Learn how Grit's app proxy can migrate your applications to Azure AD B2C with no code change |
| 5 | +services: active-directory-b2c |
| 6 | +author: gargi-sinha |
| 7 | +manager: martinco |
| 8 | +ms.service: active-directory |
| 9 | +ms.workload: identity |
| 10 | +ms.topic: how-to |
| 11 | +ms.date: 1/25/2023 |
| 12 | +ms.author: gasinh |
| 13 | +ms.reviewer: kengaderdus |
| 14 | +ms.subservice: B2C |
| 15 | +--- |
| 16 | + |
| 17 | +# Migrate applications using header-based authentication to Azure Active Directory B2C with Grit's app proxy |
| 18 | + |
| 19 | +In this sample tutorial, learn how to migrate a legacy application using header-based authentication to Azure Active Directory B2C (Azure AD B2C) with [Grit's app proxy](https://www.gritiam.com/appProxy.html). |
| 20 | + |
| 21 | +Benefits of using Grit's app proxy are as follows: |
| 22 | + |
| 23 | +- No application code change and easy deployment resulting in faster ROI |
| 24 | + |
| 25 | +- Enables users to use modern authentication experiences such as Multi-Factor authentication, biometrics, and password-less resulting in enhanced security. |
| 26 | + |
| 27 | +- Significant savings on the license cost of the legacy authentication solution |
| 28 | + |
| 29 | +## Prerequisites |
| 30 | + |
| 31 | +To get started, you'll need: |
| 32 | + |
| 33 | +- License to Grit’s app proxy. Contact [Grit support ](mailto:[email protected]) for license details. For this tutorial, you don't need a license. |
| 34 | + |
| 35 | +- An Azure subscription. If you don't have one, get a [free account](https://azure.microsoft.com/free/). |
| 36 | + |
| 37 | +- An [Azure AD B2C tenant](tutorial-create-tenant.md) that is linked to your Azure subscription. |
| 38 | + |
| 39 | +## Scenario description |
| 40 | + |
| 41 | +Grit integration includes the following components: |
| 42 | + |
| 43 | +- **Azure AD B2C**: The authorization server to verify user credentials - Authenticated users access on-premises applications using a local account stored in the Azure AD B2C directory. |
| 44 | + |
| 45 | +- **Grit app proxy**: The service that passes identity to applications through HTTP headers. |
| 46 | + |
| 47 | +- **Web application**: The legacy application to which user requests access. |
| 48 | + |
| 49 | +The following architecture diagram shows the implementation. |
| 50 | + |
| 51 | +  |
| 52 | + |
| 53 | +1. The user requests access to an on-premises application. |
| 54 | + |
| 55 | +2. Grit app proxy receives the request through [Azure Web Application Firewall (WAF)](https://azure.microsoft.com/products/web-application-firewall/) and sends it to the application. |
| 56 | + |
| 57 | +3. Grit app proxy checks user authentication state. With no session token, or an invalid token, the user goes to Azure AD B2C for authentication. |
| 58 | + |
| 59 | +4. Azure AD B2C sends the user request to the endpoint specified during Grit app proxy registration in the Azure AD B2C tenant. |
| 60 | + |
| 61 | +4. Grit app proxy evaluates access policies and calculates attribute values in HTTP headers forwarded to the application. Grit app proxy sets the header values and sends the request to the application. |
| 62 | + |
| 63 | +5. The user is authenticated with access granted/denied to the application. |
| 64 | + |
| 65 | +## Onboard with Grit app proxy |
| 66 | + |
| 67 | +Contact [Grit support ](mailto:[email protected]) for details to get onboarded. |
| 68 | + |
| 69 | +### Configure Grit's app proxy solution with Azure AD B2C |
| 70 | + |
| 71 | +For this tutorial, Grit already has a backend application and an Azure AD B2C policy. This tutorial will be about configuring the proxy to access the backend application. |
| 72 | + |
| 73 | +You can use the UX to configure each page of the backend application for security. You can configure the type of auth required by each page and the header values needed. |
| 74 | + |
| 75 | +If the users need to be denied permission to certain pages based on group membership or some other criteria, it's handled by the auth user journey. |
| 76 | + |
| 77 | +1. Navigate to https://proxyeditor.z13.web.core.windows.net/. |
| 78 | + |
| 79 | +2. Once the dropdown appears, select the dropdown, and select **Create New**. |
| 80 | + |
| 81 | +3. Enter a name for the page that contains only letters and numbers. |
| 82 | + |
| 83 | +4. Enter **B2C_1A_SIGNUP_SIGNIN** into the B2C Policy box. |
| 84 | + |
| 85 | +5. Select **GET** at the HTTP method. |
| 86 | + |
| 87 | +6. Enter 'https://anj-grit-legacy-backend.azurewebsites.net/Home/Page' into the endpoint field and that would be the endpoint to your legacy application. |
| 88 | + |
| 89 | + >[!NOTE] |
| 90 | + >This demo is publicly available, values you enter will be visible to public. Don't configure a secure application with this demo. |
| 91 | +
|
| 92 | +  |
| 93 | + |
| 94 | +7. Select **ADD HEADER**. |
| 95 | + |
| 96 | +8. Enter **x-iss** in the destination header field to configure the valid HTTP header that must be sent to the application. |
| 97 | + |
| 98 | +9. Enter **given_name** into the Value field that is the name of a claim in the B2C policy. The value of the claim will be passed into the header. |
| 99 | + |
| 100 | +10. Select **Token** as the source. |
| 101 | + |
| 102 | +11. Select **SAVE SETTINGS**. |
| 103 | + |
| 104 | +12. Select the link in the popup. It will take you to a sign-in page. Select the sign-up link and enter the required information. Once you complete the sign-up process, you'll be redirected to the legacy application. The application displays the name you provided in the **Given name** field during sign-up. |
| 105 | + |
| 106 | +## Test the flow |
| 107 | + |
| 108 | +1. Navigate to the on-premises application URL. |
| 109 | + |
| 110 | +2. The Grit app proxy redirects to the page you configured in your user flow. |
| 111 | +From the list, select the IdP. |
| 112 | + |
| 113 | +3. At the prompt, enter your credentials. If necessary, include an Azure AD Multi-Factor authentication (MFA) token. |
| 114 | + |
| 115 | +4. You're redirected to Azure AD B2C, which forwards the application request to the Grit's app proxy redirect URI. |
| 116 | + |
| 117 | +5. The Grit's app proxy evaluates policies, calculates headers, and sends the user to the upstream application. |
| 118 | + |
| 119 | +6. The requested application appears. |
| 120 | + |
| 121 | +## Additional resources |
| 122 | + |
| 123 | +- [Grit app proxy documentation](https://www.gritiam.com/appProxy.html) |
| 124 | + |
| 125 | +- [Configure the Grit IAM B2B2C solution with Azure AD B2C](partner-grit-iam.md) |
| 126 | + |
| 127 | +- [Edit Azure AD B2C Identity Experience Framework (IEF) XML with Grit Visual IEF Editor](partner-grit-editor.md) |
| 128 | + |
| 129 | +- [Configure Grit biometric authentication with Azure AD B2C](partner-grit-authentication.md) |
0 commit comments