Skip to content

Commit ec22a5a

Browse files
author
Frederic Mercier
committed
scim review
1 parent c568c13 commit ec22a5a

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

authentication/Keycloak/README_FINE_GRAIN_PERMISSION.md

+19-20
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ODM Decision Center allows to [manage users and groups from the Business console
3131
The Groups and Users import can be done using an LDAP connection.
3232
But, if the openId server also provides a SCIM server, then it can also be managed using a SCIM connection.
3333

34-
Keycloak server doesn't provide a SCIM server by default. But, it's possible to manage it using the following opensource contribution [https://github.com/Captain-P-Goldfish/scim-for-keycloak](https://github.com/Captain-P-Goldfish/scim-for-keycloak).
34+
Keycloak does not provide a SCIM server off the shelf. But this feature can be added using the following open-source contribution: [https://github.com/Captain-P-Goldfish/scim-for-keycloak](https://github.com/Captain-P-Goldfish/scim-for-keycloak).
3535
As the project [https://scim-for-keycloak.de/](https://scim-for-keycloak.de) will become Enterprise ready soon, this tutorial was performed using the last available open source version : kc-20-b1 for Keycloak 20.0.5.
3636

3737
# Deploy on OpenShift a custom Keycloak service with a SCIM Server
@@ -101,6 +101,8 @@ As the project [https://scim-for-keycloak.de/](https://scim-for-keycloak.de) wil
101101
value: '${KEYCLOAK_ADMIN_PASSWORD}'
102102
- name: KC_PROXY
103103
value: 'edge'
104+
- name: KC_PROXY_HEADERS
105+
value: 'forwarded'
104106
image: image-registry.openshift-image-registry.svc:5000/<my-keycloak-project>/keycloak-scim:latest
105107
...
106108
```
@@ -165,7 +167,7 @@ Where:
165167
* Vendor: "Red Hat Directory Server"
166168

167169
* Connection and authentication settings
168-
* Connection URL should be: ldap://ldap-service.\<OPENLDAP_PROJECT>.svc:389 (when OPENLDAP_PROJECT is the project in which OpenLdap has been deployed)
170+
* Connection URL should be: ldap://ldap-service.\<OPENLDAP_PROJECT>.svc:389 (where OPENLDAP_PROJECT is the project in which OpenLdap has been deployed)
169171
* Bind type: simple
170172
* Bind DN: cn=admin,dc=example,dc=org
171173
* Bind credentials: xNxICc74qG24x3GoW03n
@@ -209,7 +211,7 @@ Where:
209211

210212
![OpenLdap Users Import](images/import_openldap_users.png)
211213

212-
Now let's import groups.
214+
Now let us import groups.
213215

214216
- In **User federation**, click **openldap**
215217
- Click on the "Mappers" tab
@@ -271,11 +273,10 @@ Where:
271273

272274
By default, the SCIM Groups and Users Endpoints require authentication.
273275

276+
Now, let us configure these endpoints to authorize authenticated users that have the rtsAdministrators role. In the ODM client application, we will use the client_credentials flow using the "service-account-odm" service account having assigned the rtsAdministrators role. We just have to configure authorization for the "Get" endpoint as the ODM SCIM Import is a read only mode and doesn't need the other endpoints (Create, Update, Delete).
274277

275278
![SCIM Resources Tab](images/scim_resources.png)
276279

277-
Now, let's configure these endpoints to authorize authenticated users that have the rtsAdministrators role. In the ODM client application, we will use the client_credentials flow using the "service-account-odm" service account having assigned the rtsAdministrators role. We just have to configure authorization for the "Get" endpoint as the ODM SCIM Import is a read only mode and doesn't need the other endpoints (Create, Update, Delete).
278-
279280
- Select the **Resource Type** tab
280281
- Click **Group** inside the table
281282
- Select the **Authorization** sub-tab
@@ -363,7 +364,7 @@ The first step is to declare the groups of users that will be Decision Center Ad
363364

364365
![Assign Admin Roles](images/assign_rtsadministrators_role.png)
365366

366-
Let's also assign the **rtsUsers** role to the **TaskAuditors** and **TaskUsers** groups. If you do not do this, users are not authorized to login into the Business Console.
367+
Let us also assign the **rtsUsers** role to the **TaskAuditors** and **TaskUsers** groups. If you do not do this, users are not authorized to login into the Business Console.
367368

368369
- Select the **Manage > Groups** Tab
369370
- Double-click on **TaskAuditors**
@@ -382,7 +383,7 @@ Let's also assign the **rtsUsers** role to the **TaskAuditors** and **TaskUsers*
382383

383384
- Log into the ODM Decision Center Business Console using the `cp4admin` user
384385
- Select the **LIBRARY** tab
385-
- Import the [Loan Validation Service](https://github.com/DecisionsDev/odm-for-container-getting-started/blob/master/Loan%20Validation%20Service.zip) and [Miniloan Service](https://github.com/DecisionsDev/odm-for-container-getting-started/blob/master/Miniloan%20Service.zip) projects
386+
- Import the [Loan Validation Service](https://github.com/DecisionsDev/odm-for-container-getting-started/blob/master/Loan%20Validation%20Service.zip) and [Miniloan Service](https://github.com/DecisionsDev/odm-for-container-getting-started/blob/master/Miniloan%20Service.zip) projects if there are not already there.
386387

387388
![Load Projects](images/load_projects.png)
388389

@@ -392,7 +393,7 @@ Let's also assign the **rtsUsers** role to the **TaskAuditors** and **TaskUsers*
392393
- Select the **Connection Settings** sub-tab
393394
- Check the KEYCLOAK_SCIM connection status is green
394395
- Select the **Groups** sub-tab
395-
- Click the **Import Groups from directories** button
396+
- Click the **Import Groups from directories** icon button
396397
- Select the **TaskAuditors** and **TaskUsers** groups
397398
- Click on the **Import groups and users** button
398399

@@ -401,14 +402,14 @@ Let's also assign the **rtsUsers** role to the **TaskAuditors** and **TaskUsers*
401402
## Set the project security
402403

403404
- Select the **Project Security** sub-tab
404-
- Click on the **Edit decision service security** of the "Loan Validation Service" project
405+
- Click on the pen icon next to the "Loan Validation Service" project (the text **Edit decision service security** gets displayed when hovering the mouse pointer over the icon)
405406
- Below the Security section, select **Enforce Security**
406407
- Below the Groups section, select the **TaskAuditors** group
407408
- Click the **Done** button
408409

409410
![Set Loan Validation Service Security](images/set_loan_validation_service_security.png)
410411

411-
- Click the **Edit decision service security** of the "Miniloan Service" project
412+
- Click the the pen icon next to the "Miniloan Service" project (the text **Edit decision service security** gets displayed when hovering the mouse pointer over the icon)
412413
- Below the Security section, select **Enforce Security**
413414
- Below the Groups section, select the **TaskUsers** group
414415
- Click the **Done** button
@@ -421,7 +422,7 @@ Let's also assign the **rtsUsers** role to the **TaskAuditors** and **TaskUsers*
421422
- Click the "Log out" link
422423
- Click the Keycloak Logout button
423424

424-
- Login with `user1`. Check that the **ADMINISTRATION** tab is not available
425+
- Log in with `user1`. Check that the **ADMINISTRATION** tab is not available
425426
- Click on **LIBRARY** tab, only the "Miniloan Service" project must be available
426427
- Click on top-right `user1` link
427428
- Select "Profile" link
@@ -439,13 +440,11 @@ Let's also assign the **rtsUsers** role to the **TaskAuditors** and **TaskUsers*
439440

440441
# Synchronize Decision Center when updating Keycloak
441442

442-
During the life of a project, common situation can happen like :
443-
- a user is moving from a group to an other.
444-
- a new user join a group
445-
- a user left a group
446-
- a user change of group
447-
- ...
443+
During the life of a project, the following can happen :
444+
- a user moves from a group to an other,
445+
- a user leaves a group,
446+
- a new user joins a group, ...
447+
448+
All these changes are performed using the Keycloak dashboard and then reflected inside Decision Center, either manually using the Decision Center Synchronize button or using the automatic synchronization (scheduled every 2 hours by default).
448449

449-
All these operations are done using the Keycloak dashboard and are reflected on Decision Center. It can be done manually using the Decision Center Synchronize button or using the automatic synchronization happening by default every 2 hours.
450-
451-
You can change the frequency using the Decision Center JVM option: `-Dcom.ibm.rules.decisioncenter.ldap.sync.refresh.period=60000`. The value is expressed in milliseconds.
450+
You can read more about configuring the automatic synchronization in the documentation page [Importing users and groups from LDAP directories](https://www.ibm.com/docs/en/odm/9.5.0?topic=ldap-importing-users-groups-from-directories).

0 commit comments

Comments
 (0)