Configuring KeyCloak
Single sign-on service in Salt.Box is provided by KeyCloak identity and access management sowtware.
KeyCloak is a free software released under the Apache License 2.0 license.
Signing in
Log in to the web interface of the identity and access management subsystem at:
https://<address_of_Salt.Box_server>/auth/keycloak/
If Salt.Box is deployed in Docker, use the password for the admin account saved in the file
/secrets/keycloak-admin-password located in the project folder Fig. 1.
![]() |
|---|
Creating a realm
The admin account belongs to the default Keycloak realm named Master.
For security reasons, it is not recommended to create Salt.Box users in this realm.
Open the list of realms Fig. 2 [1] and click the create_realm_btn button to create a new realm.
Specify a realm name, for example, salt.box, as in Fig. 3, and click the Create button.
The new realm will be created.
![]() |
|---|
![]() |
|---|
Creating a client
-
Select the Clients menu item of the
KeyCloakmain menu Fig. 4.
The Keycloak client is thesaltbox_coreweb application, which is part ofSalt.Box.
Register this application inKeyCloakby clicking theCreate Clientbutton Fig. 4 [1] to open the client creation dialog.
Figure 4. Clients page
-
On the General settings tab Fig. 5, set the parameters as follows:
Key Value Comment Client type OpenID ConnectClient ID saltbox_corerequired Name client_saltbox_coreany name then click
Next.
Figure 5. Creating a client: General settings tab
-
Check these boxes on the Capability config tab Fig. 6:
Key Value Standard flow ✓ Direct access grants ✓ then click
Next.
Figure 6. Creating a client: Capability config tab
-
Do not change parameters on the Login Settings tab Fig. 7, then click
Save.
A newKeyCloakclient will be created.
Figure 7. Creating a client: Login settings tab
Creating a client role
Salt.Box grants permissions of managing collections to users with the collections_admin role.
Create this role for saltbox_core client in salt.box realm.
Follow the steps below.
-
On the Clients page, open the newly created client saltbox_core and go to the Roles tab.
ClickCreate roleFig. 8.
Figure 8. Launching the Salt.Box client installation
-
Enter the role parameters as follows in the role creation dialog Fig. 9:
Key Value Comment Role name collections_adminrequired Description any description string then click
Save.
Figure 9. Create role dialog box
Just created role can then be assigned to any user Salt.Box: see Assigning a role to a user.
You can also ask the software developer about the names and purposes of other built-in Salt.Box roles and the notation rules for accessing Salt.Box resources.
Creating a user
-
Enter the new user details and create it:
-
Select the Users menu item of the
KeyCloakmain menu Fig. 10.
ClickAdd userbutton above the Users table Fig. 10 [1].
Figure 10. User account management page
-
Enter user's data in the Create user dialog Fig. 11:
Key Value Comment Username userrequired Email First name Last name
Figure 11. Entering user's data
-
Specify, if necessary, any additional actions required with the user account, such as a mandatory password change upon the user's first login Fig. 12.
TheUpdate Passwordtile will appear in the user creation window Fig. 11 [1].
Figure 12. Adding required user actions
-
Click
CreateFig. 11.A new user will be created, and the User details window will be displayed Fig. 13.
-
-
Set a password for the user you just created.
Assigning a role to a user
Now assign the previously created collections_admin role (see Creating a client role) to user account to grant it permissions of managing collections.
-
On the Users page, open the newly created
useraccount and go to the Role mapping tab.
ClickAssign roleFig. 15.
Figure 15. Role mapping tab
-
Enter
collections_adminin search field, clickarrow-rightbutton Fig. 16 [1].
Figure 16. Role mapping tab
-
Check the box next to the
collections_adminrole entry associated with thesaltbox_coreclient Fig. 16 [2]. -
Click
AssignFig. 16 [3].
Thecollections_adminrole will be assigned to theuseraccount.
userwill now be able to see the root collection objects.
More information
For more information about configuring KeyCloak please visit:
KeyCloak Documentation




