Skip to content

Commit 776a68c

Browse files
authored
Merge pull request #209 from DecisionsDev/azuread-review
Azuread review
2 parents 2a2780b + 42c3a00 commit 776a68c

11 files changed

+97
-81
lines changed

authentication/AzureAD/README_WITH_CLIENT_SECRET.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
1. Create the *ODM application*.
2828

29-
In **Azure Active Directory** / **App registration**, click **New Registration**:
29+
In **Microsoft Entra Id** / **Manage** / **App registration**, click **New Registration**:
3030

3131
* Name: **ODM Application**
3232
* Supported account types / Who can use this application or access this API?: select `Accounts in this organizational directory only (Default Directory only - Single tenant)`
@@ -36,7 +36,7 @@
3636

3737
2. Retrieve Tenant and Client information.
3838

39-
In **Azure Active Directory** / **App Registration**, select **ODM Application** and click **Overview**:
39+
In **Microsoft Entra Id** / **Manage** / **App Registration**, select **ODM Application** and click **Overview**:
4040

4141
* Application (client) ID: **Client ID**. It will be referenced as `CLIENT_ID` in the next steps.
4242
* Directory (tenant) ID: **Your Tenant ID**. It will be referenced as `TENANT_ID` in the next steps.
@@ -45,7 +45,7 @@
4545

4646
3. Generate an OpenID client secret.
4747

48-
In **Azure Active Directory** / **App registrations**, select **ODM Application**:
48+
In **Microsoft Entra Id** / **Manage** / **App registrations**, select **ODM Application**:
4949

5050
* From the Overview page, click on the link Client credentials: **Add a certificate or secret** or on the **Manage / Certificates & secrets** tab
5151
* Click + New Client Secret
@@ -58,24 +58,24 @@
5858
5959
4. Add Claims.
6060

61-
In **Azure Active Directory** / **App registrations**, select **ODM Application**, and in **Manage / Token Configuration**:
61+
In **Microsoft Entra Id** / **Manage** / **App registrations**, select **ODM Application**, and in **Manage / Token Configuration**:
6262

63-
* Add Optional Email ID Claim
63+
* Add Optional **email** ID Claim
6464
* Click +Add optional claim
6565
* Select ID
66-
* Check Email
67-
* Click Add
68-
69-
* Add Optional Email Access Claim
70-
* Click +Add optional claim
71-
* Select Access
72-
* Check Email
66+
* Check **email**
7367
* Click Add
7468

7569
* Turn on Microsoft Graph email permission
7670
* Check Turn on the Microsoft Graph email permission
7771
* Click Add
7872

73+
* Add Optional **email** Access Claim
74+
* Click +Add optional claim
75+
* Select Access
76+
* Check **email**
77+
* Click Add
78+
7979
* Add Group Claim
8080
* Click +Add groups claim
8181
* Check Security Groups
@@ -85,19 +85,19 @@
8585

8686
To allow ODM rest-api to use the password flow with email as user identifier and the client-credentials flow with client_id as user identifier, we need to create a new claim named "identity" that will take the relevant value according to the flow:
8787

88-
In **Azure Active Directory** / **Enterprise applications**, select **ODM Application**, and in **Manage / Single sign-on**:
88+
In **Microsoft Entra Id** / **Manage** / **Enterprise applications**, select **ODM Application**, and in **Manage / Single sign-on**:
8989

9090
* Click Edit in the "Attributes & Claims" section
9191
* Click + Add new claim
92-
* Name: identity
92+
* Name: **identity**
9393
* Fill 2 Claim conditions in the exact following order:
9494
1. User Type: Any / Scoped Groups: 0 / Source: Attribute / Value: <CLIENT_ID>
9595
2. User Type: Members / Scoped Groups: 0 / Source: Attribute / Value: user.mail
9696
* Click Save
9797

9898
6. API Permissions.
9999

100-
In **Azure Active Directory** / **App Registration**, select **ODM Application**, and then click **API Permissions**.
100+
In **Microsoft Entra Id** / **Manage** / **App Registration**, select **ODM Application**, and then click **API Permissions**.
101101

102102
* Click Grant Admin Consent for Default Directory
103103

@@ -109,14 +109,21 @@
109109

110110
7. Manifest change.
111111

112-
In **Azure Active Directory** / **App Registration**, select **ODM Application**, and then click **Manifest**.
112+
In **Microsoft Entra Id** / **Manage** / **App Registration**, select **ODM Application**, and then click **Manifest**.
113+
114+
The Manifest feature (a JSON representation of an app registration) is currently in transition.
115+
[**AAD Graph app manifest**](https://learn.microsoft.com/en-us/entra/identity-platform/azure-active-directory-graph-app-manifest-deprecation) will be deprecated soon and not editable anymore starting 12/2/2024. It will be replaced by the **Microsoft Graph App Manifest**
113116

114117
As explained in [accessTokenAcceptedVersion attribute explanation](https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-app-manifest#accesstokenacceptedversion-attribute), change the value to 2.
115118

116119
ODM OpenID Liberty configuration needs version 2.0 for the issuerIdentifier. See the [openIdWebSecurity.xml](templates/openIdWebSecurity.xml) file.
117120

118121
It is also necessary to set **acceptMappedClaims** to true to manage claims. Without this setting, you get the exception **AADSTS50146: This application is required to be configured with an application-specific signing key. It is either not configured with one, or the key has expired or is not yet valid.** when requesting a token.
119122

123+
With **Microsoft Graph App Manifest**:
124+
* **acceptMappedClaims** is relocated as a property of the **api** attribute
125+
* **accessTokenAcceptedVersion** is relocated as a property of the **api** attribute and renamed **requestedAccessTokenVersion**
126+
120127
Then, click Save.
121128

122129
8. Check the configuration.
@@ -318,7 +325,7 @@
318325

319326
```shell
320327
kubectl create secret generic users-groups-synchro-secret \
321-
--from-file=sidecar-start.sh \
328+
--from-file=./output/sidecar-start.sh \
322329
--from-file=generate-user-group-mgt.sh
323330
```
324331
> **Note**
@@ -340,7 +347,7 @@
340347
```shell
341348
helm search repo ibm-odm-prod
342349
NAME CHART VERSION APP VERSION DESCRIPTION
343-
ibm-helm/ibm-odm-prod 24.0.0 9.0.0.0 IBM Operational Decision Manager
350+
ibm-helm/ibm-odm-prod 24.1.0 9.0.0.1 IBM Operational Decision Manager
344351
```
345352
346353
### Run the `helm install` command
@@ -449,7 +456,7 @@ You can now install the product. We will use the PostgreSQL internal database an
449456
- Decision Server Runtime redirect URI: `https://<INGRESS_ADDRESS>/DecisionService/openid/redirect/odm`
450457
- Rule Designer redirect URI: `https://127.0.0.1:9081/oidcCallback`
451458
452-
From the Azure console, in **Azure Active Directory** / **App Registrations** / **ODM Application**:
459+
From the Microsoft Azure console, in **Microsoft Entra Id** / **Manage** / **App Registrations** / **ODM Application**:
453460
454461
- Click the `Add a Redirect URI` link
455462
- Click `Add Platform`
@@ -507,11 +514,11 @@ To manage ODM runtime call on the next steps, we used the [Loan Validation Decis
507514

508515
Import the **Loan Validation Service** in Decision Center connected using *myodmuser*@YOURDOMAIN created at step 2
509516

510-
![Import project](../Keycloak/images/import_project.png)
517+
![Import project](images/import_project.png)
511518

512519
Deploy the **Loan Validation Service** production_deployment ruleapps using the **production deployment** deployment configuration in the Deployments>Configurations tab.
513520

514-
![Deploy project](../Keycloak/images/deploy_project.png)
521+
![Deploy project](images/deploy_project.png)
515522

516523
You can retrieve the payload.json from the ODM Decision Server Console or use [the provided payload](payload.json).
517524

@@ -520,7 +527,7 @@ As explained in the ODM on Certified Kubernetes documentation [Configuring user
520527
You can realize a basic authentication ODM runtime call the following way:
521528

522529
```shell
523-
$ curl -H "Content-Type: application/json" -k --data @payload.json \
530+
curl -H "Content-Type: application/json" -k --data @payload.json \
524531
-H "Authorization: Basic b2RtQWRtaW46b2RtQWRtaW4=" \
525532
https://<DS_RUNTIME_HOST>/DecisionService/rest/production_deployment/1.0/loan_validation_production/1.0
526533
```
@@ -530,15 +537,15 @@ Where b2RtQWRtaW46b2RtQWRtaW4= is the base64 encoding of the current username:pa
530537
But if you want to execute a bearer authentication ODM runtime call using the Client Credentials flow, you have to get a bearer access token:
531538

532539
```shell
533-
$ curl -k -X POST -H "Content-Type: application/x-www-form-urlencoded" \
540+
curl -k -X POST -H "Content-Type: application/x-www-form-urlencoded" \
534541
-d 'client_id=<CLIENT_ID>&scope=<CLIENT_ID>%2F.default&client_secret=<CLIENT_SECRET>&grant_type=client_credentials' \
535542
'https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/token'
536543
```
537544

538545
And use the retrieved access token in the following way:
539546

540547
```shell
541-
$ curl -H "Content-Type: application/json" -k --data @payload.json \
548+
curl -H "Content-Type: application/json" -k --data @payload.json \
542549
-H "Authorization: Bearer <ACCESS_TOKEN>" \
543550
https://<DS_RUNTIME_HOST>/DecisionService/rest/production_deployment/1.0/loan_validation_production/1.0
544551
```

0 commit comments

Comments
 (0)