This article describes the database permissions required by the IGEL Universal Management Suite (UMS) database user. These permissions are required so that UMS can perform the database actions used in the relevant workflows, such as installation, update, and runtime operations.
Depending on the security requirements of the environment, it is possible to use either one database user for all UMS database workflows or two different database users:
-
One user for the installation or update UMS workflow
-
One user for running the UMS workflow
Using two users increases security by limiting the risk of accidental or malicious schema changes during normal operation.
Environment
IGEL UMS with one of the following External Databases:
-
Microsoft SQL Server
-
Oracle Database
-
PostgreSQL
UMS Database Workflow Definitions
UMS requires different database permissions depending on the workflow being executed. The database user must have the permissions required for the actions that UMS performs in the corresponding workflow.
|
Workflow |
Description |
|---|---|
|
Installation |
Initial creation of the UMS database schema and database objects |
|
Update |
Schema and object changes performed during a UMS update |
|
Runtime |
Normal UMS operation after installation or update |
|
Directory operations |
Runtime directory-related operations, depending on the database type |
|
Device naming convention reset |
Operations that reset or change the thin client naming counter |
Summary of Required Permissions by Database Type
Microsoft SQL Server
For Microsoft SQL Server, the permissions can be assigned based on database roles.
|
Workflow |
Required Role or Permission |
|---|---|
|
Installation, Update |
|
|
Runtime |
|
Oracle
For Oracle, the required privileges depend on whether the same user owns the UMS database objects.
|
Workflow |
Required Privilege |
|---|---|
|
Installation, Update |
|
|
Runtime |
|
PostgreSQL
For PostgreSQL, the following privileges are required.
|
Workflow |
Required Privilege |
|---|---|
|
Installation, Update |
|
|
Runtime |
|
How to Separate Roles for Installation/Update and Runtime
The IGEL UMS is designed to work with one database. If separate roles are required for installation/update and runtime, there are two possible approaches:
-
Create two datasource definitions in the UMS Administrator, one for each database user, and switch between them.
-
Create one datasource definition with one database user and change the permissions assigned to that user before and after installation or update tasks.
After the first activation of a datasource, the UMS Server starts immediately with this datasource. Switching the database role or datasource requires a restart of the UMS Server.
After a UMS update, database changes are performed by the UMS Server during startup. Therefore, the datasource or database permissions used for the update must be active when the UMS Server starts for the first time after the update.
In a two-role setup, additional GRANTs may be required when new database objects are created. After an update, permissions for newly created tables, sequences, views, or other objects may need to be granted manually to the runtime user.
Microsoft SQL Server Role Separation
Microsoft SQL Server allows two users to access the same schema. Therefore, two datasources can be configured in the UMS Administrator.
|
User |
Purpose |
Required Roles |
|---|---|---|
|
|
Installation and update |
|
|
|
Runtime |
|
Use ddl_user for installation. Before updating UMS, activate the datasource that uses ddl_user and keep it active throughout the update workflow.
After the first complete UMS startup following installation or update, the datasource using data_user can be activated for normal runtime operation.
Device Naming Convention Reset Workflow
If device names must be reset to start from 1 again, UMS needs to change the current value of a sequence. The runtime user might not have the required permissions for this operation. In this case, temporarily switch to ddl_user, perform the action, and then switch back to data_user.
Oracle Role Separation
In Oracle, users and schemas are closely related. A database user is normally identified by the schema that belongs to the user. If two users are used, at least one of them must be granted access to the database objects of the other user.
Option 1: One User with Temporarily Elevated Privileges
Option 2: Two Users
PostgreSQL Role Separation
PostgreSQL is similar to Oracle in that object ownership is relevant, but schema handling is less demanding.
|
User |
Purpose |
|---|---|
|
|
Owns and creates the UMS database objects |
|
|
Performs normal UMS runtime operations |
Create a user for schema operations, for example ddl_user.
GRANT CONNECT, CREATE ON DATABASE rmdb12_01 TO ddl_user;
GRANT USAGE, CREATE ON SCHEMA public TO ddl_user;
→ Use this user for UMS installation and UMS update workflows.
Create a second user for normal runtime operation, for example data_user.
GRANT CONNECT ON DATABASE rmdb12_01 TO data_user;
Log in as ddl_user and grant data_user the required permissions:
GRANT USAGE ON SCHEMA public TO data_user;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO data_user;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO data_user;
As with Oracle, permissions for newly created tables and sequences must be granted again after a UMS update. Run the following commands as ddl_user after the update:
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO data_user;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO data_user;
Device Naming Convention Reset Workflow
The data_user is not allowed to change the sequence used by the Device naming conventions. To perform this action, run UMS temporarily with ddl_user.
Details on Database Operations and Permissions
Tables
Constraints
Indexes
Triggers
Procedures
Sequences
Reading Data
Writing Data