Privileges
Managing privileges
The privileges a user has determine which resources the user can access/modify and which parts of the frontend are accessible. Privileges can be configured on user groups, so the privileges of a user depend on the groups they are a member of.
Available privileges
Almost every endpoint that requires authentication also needs the user to have a certain privilege to authorize them to access or modify a resource. Below is a general overview of what you can access/modify with which privileges.
Each privilege groups certain aspects of Factry Historian together. Most come as a READ and a MANAGE privilege. Audit logs, logs and statistics only have a READ privilege, and measurement data only has a MANAGE privilege. The privilege names are listed under each heading.
Measurements
READ_MEASUREMENTS, MANAGE_MEASUREMENTS
- View/manage measurements and calculations
- Query time series data of the measurement
- View measurement logs
- View/manage measurement labels
- Export measurement data to parquet
It’s recommended to at a minimum also include read privileges for time series databases and collectors, otherwise the frontend might not work as expected.
From version 8.3, saving, testing, recalculating or resuming a calculation, and reading or updating its context, also needs READ_LOOKUP_TABLES, because a script can read any lookup table of the organization. This applies to every calculation script, also one without a lookup table input.
Collectors
READ_COLLECTORS, MANAGE_COLLECTORS
- View/manage collectors
- View collector logs
Time series databases
READ_TIMESERIES_DATABASES, MANAGE_TIMESERIES_DATABASES
- View/manage time series databases
- View available time series database types
External databases
READ_EXTERNAL_DATABASES, MANAGE_EXTERNAL_DATABASES
- View/manage external databases
From version 8.3, READ_EXTERNAL_DATABASES is also needed to configure, preview and run a lookup table sync.
Assets
READ_ASSETS, MANAGE_ASSETS
- View/manage assets
- View/manage asset properties
It’s recommended to at a minimum also include read privileges for event configurations, otherwise the frontend might not work as expected.
Events
READ_EVENTS, MANAGE_EVENTS
- View/manage events
- View/manage manual entries
Event configurations
READ_EVENT_CONFIGURATIONS, MANAGE_EVENT_CONFIGURATIONS
- View/manage event types
- View/manage event type properties
- View/manage event configurations
- View/manage event property configurations
From version 8.3, saving a calculated event property, or activating an event configuration that has one, also needs READ_LOOKUP_TABLES.
Organizations
READ_ORGANIZATIONS, MANAGE_ORGANIZATIONS
- View/manage organizations
Users
READ_USERS, MANAGE_USERS
- View/manage users
- View/manage user and service tokens
User groups
READ_USER_GROUPS, MANAGE_USER_GROUPS
- View/manage user groups
- View user group privileges
- View/manage user group membership
- View/manage authentication provider to user group mapping
Privileges
READ_PRIVILEGES, MANAGE_PRIVILEGES
- View available privileges
- Assign privileges to and remove privileges from user groups (MANAGE_PRIVILEGES)
From version 8.3, assigning or removing the privileges of a user group needs MANAGE_PRIVILEGES. MANAGE_USER_GROUPS alone is no longer enough.
Audit logs
READ_AUDIT_LOGS
- View audit logs
Audit logs can not be managed via the frontend nor via the API.
Logs
READ_LOGS
- View application logs
Logs can not be managed via the frontend.
Settings
READ_SETTINGS, MANAGE_SETTINGS
- View/manage authentication providers
- View/manage settings
- View/manage worker pools/tasks
Sinks
READ_SINKS, MANAGE_SINKS
- View/manage sinks
- View/manage forwarders
Task schedulers
READ_TASK_SCHEDULERS, MANAGE_TASK_SCHEDULERS
- View/manage task schedulers
Prototypes
READ_PROTOTYPES, MANAGE_PROTOTYPES
- View/manage prototypes
From version 8.3, saving a prototype with a calculation, or creating assets from it, also needs READ_LOOKUP_TABLES.
Manual entry forms
READ_MANUAL_ENTRY_FORMS, MANAGE_MANUAL_ENTRY_FORMS
- View/manage manual entry forms
Measurement data
MANAGE_MEASUREMENT_DATA
- Delete time series data, individually or in bulk
Lookup tables
Available from version 8.3 and later.
READ_LOOKUP_TABLES, MANAGE_LOOKUP_TABLES
- View lookup tables and their rows, and export them
- Create, change, import into and delete lookup tables (MANAGE_LOOKUP_TABLES)
READ_LOOKUP_TABLES is also needed to save, test, recalculate or resume a calculation, and to read or update its context. Configuring, previewing and running a lookup table sync also needs READ_EXTERNAL_DATABASES. See Lookup tables.
Statistics
READ_STATISTICS
- View the Home page and its server statistics
- View the server CPU figures on the calculation load view
Several privileges are checked against the root organization rather than the organization you are working in. Holding them in a non-root organization has no effect. These are MANAGE_SETTINGS (authentication providers and server wide settings), MANAGE_USERS for every user change (create, update, delete, password and tokens), READ_USERS for user tokens, READ_ORGANIZATIONS and MANAGE_ORGANIZATIONS, and READ_LOGS for reading all application logs.
Pre-defined sets of privileges
These pre-defined sets of privileges are used when creating the default groups for an organization.
Administrator
- Read and manage measurements
- Read and manage collectors
- Read and manage time series databases
- Read and manage assets
- Read and manage events
- Read and manage event configurations
- Read users
- Read and manage user groups
- Read and manage privileges
- Read audit logs
- Read and manage settings
- Read and manage external databases
- Read and manage sinks/forwarders
- Read and manage task schedulers
- Read and manage prototypes
- Read and manage manual entry forms
- Read and manage lookup tables
- Manage measurement data
- Read statistics
Manager
- Read and manage measurements
- Read and manage collectors
- Read and manage time series databases
- Read and manage assets
- Read and manage events
- Read and manage event configurations
- Read and manage external databases
- Read and manage sinks/forwarders
- Read and manage task schedulers
- Read and manage prototypes
- Read and manage manual entry forms
- Read and manage lookup tables
- Read statistics
Reader
- Read assets
- Read collectors
- Read event configurations
- Read events
- Read measurements
- Read time series databases
- Read manual entry forms
- Read external databases
- Read sinks
- Read task schedulers
- Read lookup tables
- Read statistics
Collector
- Read and manage measurements
- Read and manage collectors
The Collector group does not get READ_LOOKUP_TABLES.
Upgrading to version 8.3
Version 8.3 adds READ_LOOKUP_TABLES and MANAGE_LOOKUP_TABLES. The upgrade:
- Gives both to the Administrators and Managers groups, and READ_LOOKUP_TABLES to the Reader group.
- Gives READ_LOOKUP_TABLES to every user group (not collector groups) that holds MANAGE_MEASUREMENTS, MANAGE_EVENT_CONFIGURATIONS or MANAGE_PROTOTYPES, so existing script authors keep working.
A group created after the upgrade that writes calculation scripts needs READ_LOOKUP_TABLES added by hand.
A group that holds MANAGE_USER_GROUPS but not MANAGE_PRIVILEGES can no longer assign or remove group privileges. Add MANAGE_PRIVILEGES to that group if it still needs to.