Skip to content

Commit 3a3eff6

Browse files
committed
regenerate zip file
1 parent 5b7bce8 commit 3a3eff6

File tree

6 files changed

+56
-32
lines changed

6 files changed

+56
-32
lines changed

authentication/AzureAD/README_WITH_CLIENT_SECRET.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,22 @@
6060

6161
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
@@ -89,7 +89,7 @@
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
@@ -111,12 +111,19 @@
111111

112112
In **Microsoft Entra Id** / **Manage** / **App Registration**, select **ODM Application**, and then click **Manifest**.
113113

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**
116+
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
@@ -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
```

authentication/AzureAD/README_WITH_PRIVATE_KEY_JWT.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,20 @@ For additional information regarding the implement in Liberty, please refer to t
118118

119119
In **Microsoft Entra Id** / **Manage** / **App Registration**, select **ODM Application**, and then click **Manifest**.
120120

121-
As explained in [accessTokenAcceptedVersion attribute explanation](https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-app-manifest#accesstokenacceptedversion-attribute), change the value of **accessTokenAcceptedVersion** to `2`.
121+
The Manifest feature (a JSON representation of an app registration) is currently in transition.
122+
[**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**
123+
124+
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.
122125

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

125-
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.
128+
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.
129+
130+
With **Microsoft Graph App Manifest**:
131+
* **acceptMappedClaims** is relocated as a property of the **api** attribute
132+
* **accessTokenAcceptedVersion** is relocated as a property of the **api** attribute and renamed **requestedAccessTokenVersion**
126133

127-
Then, click Save.
134+
Then, click Save.
128135

129136
# Deploy ODM on a container configured with Microsoft Entra ID (Part 2)
130137

666 Bytes
Binary file not shown.

authentication/AzureAD/generateTemplate.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ Options:
2828
2929
-g : AZUREAD ODM Group ID
3030
-i : Client ID
31-
-n : AZUREAD domain (AZUREAD server name)
31+
-n : Tenant ID
3232
-x : Cient Secret
3333
-a : Allow others domains (Optional)
34-
Usage example: $0 -i AzureADClientId -x AzureADClientSecret -n <Application ID (GUID)> -g <GROUP ID (GUID)> [-a <domain name>]"
34+
Usage example: $0 -i AzureADClientId -x AzureADClientSecret -n AzureADTenantId -g <GROUP ID (GUID)> [-a <domain name>]"
3535
EOF
3636
}
3737

3838
while getopts "x:i:n:s:g:ha:" option; do
3939
case "${option}" in
4040
g) AZUREAD_ODM_GROUP_ID=${OPTARG};;
4141
i) AZUREAD_CLIENT_ID=${OPTARG};;
42-
n) AZUREAD_SERVER_NAME=${OPTARG};;
42+
n) AZUREAD_TENANT_ID=${OPTARG};;
4343
x) AZUREAD_CLIENT_SECRET=${OPTARG};;
4444
a) ALLOW_DOMAIN=${OPTARG};;
4545
h) usage; exit 0;;
@@ -55,17 +55,17 @@ if [[ -z ${AZUREAD_CLIENT_ID} ]]; then
5555
echo "AZUREAD_CLIENT_ID has to be provided, either as in environment or with -i."
5656
exit 1
5757
fi
58-
if [[ -z ${AZUREAD_SERVER_NAME} ]]; then
59-
echo "AZUREAD_SERVER_NAME has to be provided, either as in environment or with -n."
58+
if [[ -z ${AZUREAD_TENANT_ID} ]]; then
59+
echo "AZUREAD_TENANT_ID has to be provided, either as in environment or with -n."
6060
exit 1
6161
fi
6262
if [[ -z ${AZUREAD_CLIENT_SECRET} ]]; then
6363
echo "AZUREAD_CLIENT_SECRET has to be provided, either as in environment or with -x."
6464
exit 1
6565
fi
6666

67-
if [[ ${AZUREAD_SERVER_NAME} != "https://.*" ]]; then
68-
AZUREAD_SERVER_URL=https://login.microsoftonline.com/${AZUREAD_SERVER_NAME}
67+
if [[ ${AZUREAD_TENANT_ID} != "https://.*" ]]; then
68+
AZUREAD_SERVER_URL=https://login.microsoftonline.com/${AZUREAD_TENANT_ID}
6969
else
7070
AZUREAD_SERVER_URL=${AZUREAD_SERVER_NAME}
7171
fi
@@ -76,6 +76,7 @@ sed -i.bak 's|AZUREAD_CLIENT_ID|'$AZUREAD_CLIENT_ID'|g' $OUTPUT_DIR/*
7676
sed -i.bak 's|AZUREAD_CLIENT_SECRET|'$AZUREAD_CLIENT_SECRET'|g' $OUTPUT_DIR/*
7777
sed -i.bak 's|AZUREAD_ODM_GROUP_ID|'$AZUREAD_ODM_GROUP_ID'|g' $OUTPUT_DIR/*
7878
sed -i.bak 's|AZUREAD_SERVER_URL|'$AZUREAD_SERVER_URL'|g' $OUTPUT_DIR/*
79+
sed -i.bak 's|AZUREAD_TENANT_ID|'$AZUREAD_TENANT_ID'|g' $OUTPUT_DIR/*
7980
# Claim replacement
8081
sed -i.bak 's|AZUREAD_CLAIM_GROUPS|'$AZUREAD_CLAIM_GROUPS'|g' $OUTPUT_DIR/*
8182
sed -i.bak 's|AZUREAD_CLAIM_LOGIN|'$AZUREAD_CLAIM_LOGIN'|g' $OUTPUT_DIR/*

authentication/AzureAD/generateTemplateForPrivateKeyJWT.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ Options:
2828
2929
-g : AZUREAD ODM Group ID
3030
-i : Client ID
31-
-n : AZUREAD domain (AZUREAD server name)
31+
-n : Tenant ID
3232
-a : Allow others domains (Optional)
33-
Usage example: $0 -i AzureADClientId -n <Application ID (GUID)> -g <GROUP ID (GUID)> [-a <domain name>]"
33+
Usage example: $0 -i AzureADClientId -n TenantId -g <GROUP ID (GUID)> [-a <domain name>]"
3434
EOF
3535
}
3636

3737
while getopts "x:i:n:s:g:ha:" option; do
3838
case "${option}" in
3939
g) AZUREAD_ODM_GROUP_ID=${OPTARG};;
4040
i) AZUREAD_CLIENT_ID=${OPTARG};;
41-
n) AZUREAD_SERVER_NAME=${OPTARG};;
41+
n) AZUREAD_TENANT_ID=${OPTARG};;
4242
a) ALLOW_DOMAIN=${OPTARG};;
4343
h) usage; exit 0;;
4444
*) usage; exit 1;;
@@ -53,22 +53,23 @@ if [[ -z ${AZUREAD_CLIENT_ID} ]]; then
5353
echo "AZUREAD_CLIENT_ID has to be provided, either as in environment or with -i."
5454
exit 1
5555
fi
56-
if [[ -z ${AZUREAD_SERVER_NAME} ]]; then
57-
echo "AZUREAD_SERVER_NAME has to be provided, either as in environment or with -n."
56+
if [[ -z ${AZUREAD_TENANT_ID} ]]; then
57+
echo "AZUREAD_TENANT_ID has to be provided, either as in environment or with -n."
5858
exit 1
5959
fi
6060

61-
if [[ ${AZUREAD_SERVER_NAME} != "https://.*" ]]; then
62-
AZUREAD_SERVER_URL=https://login.microsoftonline.com/${AZUREAD_SERVER_NAME}
61+
if [[ ${AZUREAD_TENANT_ID} != "https://.*" ]]; then
62+
AZUREAD_SERVER_URL=https://login.microsoftonline.com/${AZUREAD_TENANT_ID}
6363
else
64-
AZUREAD_SERVER_URL=${AZUREAD_SERVER_NAME}
64+
AZUREAD_SERVER_URL=${AZUREAD_TENANT_ID}
6565
fi
6666

6767
mkdir -p $OUTPUT_DIR && cp $TEMPLATE_DIR/* $OUTPUT_DIR
6868
echo "Generating files for AZUREAD"
6969
sed -i.bak 's|AZUREAD_CLIENT_ID|'$AZUREAD_CLIENT_ID'|g' $OUTPUT_DIR/*
7070
sed -i.bak 's|AZUREAD_ODM_GROUP_ID|'$AZUREAD_ODM_GROUP_ID'|g' $OUTPUT_DIR/*
7171
sed -i.bak 's|AZUREAD_SERVER_URL|'$AZUREAD_SERVER_URL'|g' $OUTPUT_DIR/*
72+
sed -i.bak 's|AZUREAD_TENANT_ID|'$AZUREAD_TENANT_ID'|g' $OUTPUT_DIR/*
7273
# Claim replacement
7374
sed -i.bak 's|AZUREAD_CLAIM_GROUPS|'$AZUREAD_CLAIM_GROUPS'|g' $OUTPUT_DIR/*
7475
sed -i.bak 's|AZUREAD_CLAIM_LOGIN|'$AZUREAD_CLAIM_LOGIN'|g' $OUTPUT_DIR/*
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
while true
4+
do
5+
echo "synchronize groups and users every minute"
6+
/tmp/sidecarconf/generate-user-group-mgt.sh -i AZUREAD_CLIENT_ID -x AZUREAD_CLIENT_SECRET -t AZUREAD_TENANT_ID -v
7+
sleep 60
8+
done

0 commit comments

Comments
 (0)