|
| 1 | +# Azure Entra ID integration |
| 2 | + |
| 3 | +This document describes the steps required to integrate the **Zero Trust Validated Pattern** (ZTVP) with **Azure Entra ID**, trusting this service as the Identity Provider for the following components: |
| 4 | + |
| 5 | +* Qtodo demo application |
| 6 | + |
| 7 | +> [!WARNING] |
| 8 | +> The integration of Azure Entra ID into the pattern is still **in progress** and does not cover all components. This document describes those that are supported. For components not supported by Entra ID, **Red Hat Build of Keycloak (RHBK)** will continue to be used as the default OIDC. |
| 9 | +
|
| 10 | +## Configuration |
| 11 | + |
| 12 | +To configure the components we will need access to Azure Portal with permissions to create App Registrations and a Microsoft Entra ID tenant. |
| 13 | + |
| 14 | +### Qtodo |
| 15 | + |
| 16 | +#### Azure setup |
| 17 | + |
| 18 | +1. Go to [Azure Portal](https://portal.azure.com) |
| 19 | +2. Navigate to **Microsoft Entra ID** |
| 20 | +3. Click **App registrations** in the left menu |
| 21 | +4. Click **New registration** |
| 22 | +5. Fill in the details: |
| 23 | + * **Name**: `qtodo` |
| 24 | + * **Supported account types**: Choose based on your needs |
| 25 | + * **Single tenant**: Only users in your organization |
| 26 | + * **Multi-tenant**: Users from any organization |
| 27 | + * **Redirect URI**: Add the URL of the qtodo application here (for example `https://qtodo-qtodo.apps.ztvp.example.com`)/ |
| 28 | +6. Click **Register** |
| 29 | + |
| 30 | +After the creation, you will see the _Overview_ page: |
| 31 | + |
| 32 | +* **Application (client) ID**: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |
| 33 | +* **Directory (tenant) ID**: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |
| 34 | + |
| 35 | +**Save these values** - you will need them later. |
| 36 | + |
| 37 | +Let's create a new secret for our app: |
| 38 | + |
| 39 | +1. Click **Certificates & secrets** in the left menu |
| 40 | +2. Click **New client secret** |
| 41 | +3. Add a description: `qtodo secret` |
| 42 | +4. Choose expiration: 6 months, 12 months, 24 months, or custom |
| 43 | +5. Click **Add** |
| 44 | +6. **IMPORTANT**: Copy the **Value** immediately - it will not be shown again |
| 45 | + |
| 46 | +**Save this value securely** - We will need to add this secret to the Hashicorp Vault in the OpenShift cluster. |
| 47 | + |
| 48 | +#### ZTVP setup |
| 49 | + |
| 50 | +In the `values-secret.yaml` file, we add a new entry with the secret we generated in the Azure portal. For example: |
| 51 | + |
| 52 | +```yaml |
| 53 | + - name: qtodo-oidc-entraid |
| 54 | + vaultPrefixes: |
| 55 | + - apps/qtodo |
| 56 | + fields: |
| 57 | + - name: client-secret |
| 58 | + path: ~/.azure/ztvp-qtodo-entraid-secret |
| 59 | +``` |
| 60 | +
|
| 61 | +In the `values-hub.yaml file`, we add the following configuration for the qtodo application: |
| 62 | + |
| 63 | +```yaml |
| 64 | + qtodo: |
| 65 | + overrides: |
| 66 | + - name: app.oidc.authServerUrl |
| 67 | + value: https://login.microsoftonline.com/<YOUR_TENANT_ID>/v2.0 |
| 68 | + - name: app.oidc.clientId |
| 69 | + value: <YOUR_CLIENT_ID> |
| 70 | + - name: app.oidc.clientSecret.enabled |
| 71 | + value: true |
| 72 | + - name: app.oidc.clientSecret.vaultPath |
| 73 | + value: secret/data/apps/qtodo/qtodo-oidc-entraid |
| 74 | +``` |
0 commit comments