Branch | Travis CI Status |
---|---|
master |
It is a full SCIM implementation that is easily integrated into keycloak and is also easily configurable within the web admin console.
It grants you interoperable User, Group and Role provisioning by using a defined standard for resource managing:
See:
An example is user and group synchronizing with Microsoft Azure AD. A manual that describes how to do this can be found in the wiki:
Use with Microsoft Azure AD Thanks to Raffael Grob for providing this manual.
version | supported | scim-for-keycloak version |
---|---|---|
lower | ❌ | - |
9.0.x | ❌ | You may find an older working version at https://github.com/Captain-P-Goldfish/SCIM-SDK |
10.0.x | ❌ | You may find an older working version at https://github.com/Captain-P-Goldfish/SCIM-SDK |
11.0.x | ✔️ | kc-11.b${buildnumber} |
12.0.x | ✔️ | kc-12.b${buildnumber} |
This project will use the following versioning pattern
kc-${keycloak.version}-b${project.incremental.version}
Releases will be only tagged in git and not be uploaded to any repository. Please build the necessary artifacts with the following description yourself.
You need a git, JDK and maven installation on your computer
Checkout the git tag that you want to build:
- list all available tags:
git tag -l *
- checkout the tag you want to build
git checkout tags/${tag-name}
- build with maven
cd ${SCIM_FOR_KEYCLOAK_HOME}
mvn clean package -DskipTests
- find the scim-for-keycloak artifact in:
scim-for-keycloak/scim-for-keycloak-deployment/target/scim-for-keycloak-kc-${keycloak.version}-b${project.incremental.version}.ear
Copy the built artifact into the directory ${keycloak.home}/standalone/deployments
of a keycloak server.
NOTE: If the server is running during deployment you need to restart it!
- Deploy the
scim-for-keycloak.ear
file into your server. If the server is currently running you need to restart it! - Now open the web admin console of keycloak open the realm settings and select the
Themes
tab and select thescim
theme for the admin console. Now reload the browser page and theSCIM
menu link should be visible.
- Select the
SCIM
link and you should see the following view:
- You can disable SCIM for each realm separately and the
ServiceProvider
configurations as defined in RFC7643 - You may restrict access to the SCIM-endpoints for each separate realm by allowing users only access if they have been
identified by a specific client. If no clients are selected any client is authorized to access the SCIM endpoints:
- You get an overview for all registered
ResourceTypes
and may configure them separately.
You may have noticed that a 3rdResourceType
with nameRealmRole
is present that is not defined by RFC7643. ThisResourceType
is a custom endpoint that acts as showcase to demonstrate how easy it is to extend the API with new endpoints. This endpoint provides support for adding newRealmRoles
and associate them with eitherGroups
orUsers
. - Each endpoint provides several settings that can be configured:
You'll be able to change the description of an endpoint, disable a specificResourceType
or just prevent that new resources are created, deleted, updated or read. - You can turn off the requirement for authentication on each
ResourceType
but not for specificResourceType
-endpoints. - You'll be able to set required roles for each
ResourceType
and eachResourceType
-endpoint [create, get , list, update, delete]
The role settings are of course only respected if authentication is enabled.
- I didn't find a really good way in storing multi-valued-complex structures in the user-attributes table so I stored
such data structures in pure json in this table. Please note that the values in the screenshot are simply
auto-generated test-values.
- User loading and filtering is not implemented on database level meaning that a "list-Users"-request will currently retrieve all Users of the used realm from the database. Filtering, sorting and limiting of the returned entries will be done on API level by the SCIM-SDK. (personal tests have shown that this is still pretty fast with at least 5000 Users. I never tried more)
In some cases you might want to have several administration users that will only be able to configure the SCIM environment of a single realm. In such a case the user must have specific roles that will grant access to configure the SCIM environment. If the user does not have the corresponding role the "SCIM"-menu entry will not be visible to this user.
NOTE: Do not get confused with the roles here. These roles are only for accessing the management in the keycloak web admin console. These roles have nothing to do with accessing the SCIM-endpoints.
Two different roles are required to access the "SCIM"-menu.
- view-realm (allows the user to see the "SCIM"-menu item on the left)
- scim-admin (allows the user to modify the SCIM configuration)
The "scim-admin" role exists several times for several clients.
-
For each realm that is created a new "master-client" for this realm is added to the "master" realm. Each of these clients will get the "scim-admin" role that is needed for users from the "master" realm to access the "SCIM"-menu. So if you create a realm with name "test" you will be able to find a client with name "test-realm" within the clients section of the "master" realm. The "scim-admin" role of this client is needed to modify the data of the SCIM environment in the "test" realm for users of realm "master".
-
If a new realm "test" is created you should be able to find a client in the clients section of realm "test" with name "realm-management". This client should have the client-role "scim-admin". Grant this role to users of realm "test" to grant access to the SCIM configuration for this realm.
-
The last case is the SCIM configuration for realm "master". This works analogous to 2. But for realm "master" the name of the "master-client" is "master-realm" instead of "realm-management".
So in total we got 2 different cases:
- users of realm "master" are able to get access to SCIM configurations of several realms.
- users of other realms can only access the SCIM configuration of their own realm.