User Access Control
User Management With KeyCloak
Section titled “User Management With KeyCloak”KeyCloak is an un-opinionated and general purpose tool and allows many different general purpose entities. These entities can be mixed and matched to fit specific organizational structures.
WiMetrix uses KeyCloak to facilitate user authentication and authorization.
We enforce Role-Based Access Control (RBAC) by combining Roles, Groups, and Users.
Read on below to understand how everything works.
Terminology
Section titled “Terminology”A specific and narrow permission. Usually maps with an action to be performed
- Examples: (
order:po:get,packing:blueprint:delete,packing:pack_job:assign,spts:customer:get) - It is possible to create composite roles that combine several other roles into a super role
A user type or an organization role
- As the name suggest, groups combine many permissions(
Roles) under a single name - Assign one or many
Rolesto eachGroup
A user that belongs to the organization. Can be either an admin or a regular user
- Can be assigned one or more
Groups - A user with an assigned groups inherits all the
Rolesassigned to the group Rolescan also be mapped toUsersdirectly for fine-grained control- This should be avoided to keep access control flow simple
Admin User
Section titled “Admin User”Any User that has access to the admin portal. Admin users can add, update, and manage access for other users.
It is recommended to disallow Admin Users from signing in to applications. This keeps the separation between regular users and admins well-defined. The simplest way to achieve this is to not assign any
RoleorGroupto admin users
Access Scope
Section titled “Access Scope”Access scopes define fine-grained data access control by associating a user with specific entities
The different access scopes are defined below:
Sections: The sections the user can accessCompanies: The companies the user can access- Can be further divided into
Branches Branches: The branches the user can access- Can be further divided into
LinesandPack Stations Lines: The lines the user can accessPack Stations: The pack stations the user can access
- Can be further divided into
- Can be further divided into
Key Points about Access Scopes:
- Each user can be associated with one or more access scopes.
- Access scopes enable precise control over the data available to each user.
- A user can have access to multiple companies, branches, lines, sections, and pack stations as needed.
User Management
Section titled “User Management”To manage users via the REST API, user must have manage-users client role.
The role is assigned to the admin user group, and can be assigned to other groups as needed.
The users with this permission can add, update, or delete the users in SooperWizer web application.
- Navigate to the
Userstab in the sidebar- Existing users can be viewed, updated, and deleted
- New users can be created
- User details page shows the information and access for users
- View the user information and access by clicking on the
Detailsbutton from the user’s row in the table - Delete a user by clicking on the
Deletebutton from the user’s row in the table - Add a user by clicking the
Addbutton - Update a user by clicking on the
Editbutton from the user’s row in the table
Add / Update Flow
Section titled “Add / Update Flow”- Fill in user information
Username: Must be unique and cannot contain spacesEnabled: If unchecked, the user will not be able to loginFirst name: The first name of the userLast name(optional): The last name of the userPassword: The user’s password- The password and confirmation fields must match
- For new users, the password fields are required
- For existing users, password is updated if the password fields are filled in
- Assign groups to the user to give access to resources
- The user can be assigned to multiple groups
- Set the user’s access scopes
- Click the
Submitbutton to create the add/update users
Screenshots
Section titled “Screenshots”


