Permissions
The LooT permission model in brief and loot permission grant, to give or deny users and groups permissions on the tenant, on nodes and on other objects.
The permission model in brief#
LooT grants permissions to users and groups. The workbench manual describes the permission model in detail; this page covers what you need for the command.
Who receives permissions
- Users who are members of the tenant.
- Groups of the tenant. Groups can contain other groups. The built-in group Everyone (named
Jederin the installation) automatically contains all members of the tenant. The server rejects a deny for Everyone.
A user's effective permissions are their own plus those inherited from the groups they belong to.
The permissions on nodes and other objects
| Permission | Option for --rights | Meaning |
|---|---|---|
| Read | read | See the node, its values and its subtree |
| Write | write | Set values. Devices usually need only this permission. |
| Execute | execute | Trigger commands |
| Manage | manage | Change the structure: create, rename, move and delete nodes; change properties such as unit or description; grant permissions on the node |
| All | all | Read, Write, Execute and Manage together |
Permissions that exist only on the tenant
These permissions allow the recipient to create new things in the tenant or use functions. They have no effect on nodes.
| Permission | Option for --rights | Meaning |
|---|---|---|
| Create data sources | create-sources | Set up new data sources |
| Create components | create-components | Set up new component usages |
| Create scripts | create-scripts | Create new scripts |
| Publish time ranges | publish-timeranges | Share time ranges with all members of the tenant |
| Use forecasts | forecast | Use the forecasts of the AI analysis |
| Ask AI | chat | Ask a language model questions |
| Assign realtime | realtime | Mark nodes as realtime (Manage on the node is also needed) |
Denials and inheritance
- A permission on the tenant applies to all nodes of the tenant, one on a node to its whole subtree.
- Permissions can be allowed or denied. A denial takes precedence over every allowance, even if it sits higher in the tree.
- Links grant no permissions: access through a link needs permissions on the target.
- Tenant admins and system admins have all permissions without needing an entry.
loot permission grant#
loot permission grant is the only command of the loot permission group. It sets the permission entry of a user or a group: on the tenant if you name no target, otherwise on each target you name.
loot permission grant --tenant <tenant> (--group <name> | --user <name>) --rights <rights>
[--deny] [--skip-missing]
[--node <path>]… [--chart <name>]… [--dashboard <name>]… [--workflow <name>]…
[--source <name>]… [--component <name>]… [--script <name>]…| Option | Meaning |
|---|---|
--tenant <tenant> | Required. Name or id of the tenant |
--group <group> | Name of the tenant's group |
--user <user> | Member of the tenant, by display name or e-mail address. If the name matches several members, give the e-mail address. |
--rights <rights> | Required. Permissions, separated by commas: read, write, execute, manage, all, create-sources, create-components, create-scripts, publish-timeranges, forecast, chat, realtime |
--deny | Denies the permissions instead of allowing them |
--skip-missing | Skips named charts, dashboards, workflows, data sources, components and scripts that do not exist instead of aborting |
--node <path> | Node as a target, repeatable. The path may be relative to the tenant (Plant.Line1) if you give --tenant by name. |
--chart <name> | Saved chart as a target, repeatable; * means all visible charts of the tenant |
--dashboard <name> | Dashboard as a target, repeatable; * means all visible ones |
--workflow <name> | Workflow as a target, repeatable; * means all visible ones |
--source <name> | Data source as a target, repeatable; * means all visible ones |
--component <name> | Component usage as a target, repeatable; * means all visible ones |
--script <name> | Script as a target, repeatable; * means all visible ones |
Give exactly one of --group and --user. The target options can be mixed; without a target the entry applies to the tenant. The asterisk * applies to charts, dashboards, workflows, data sources, components and scripts, not to --node.
How the entry is set#
- For each target there is one allow entry and one deny entry per user or group.
loot permission grantreplaces an existing entry that has other permissions with the new permissions: permissions are set, not added. If the permissions are equal the command leaves the entry unchanged, so a script may repeat it any number of times. - For each target the command prints one line:
gesetzt(set),ersetzt(replaced) orunverändert(unchanged). - All targets are resolved before the first one is changed. A typo in the last name therefore leaves no half-set permissions behind. With
--skip-missingthe command skips missing named objects and reports them in its output. - The server decides which permissions a target accepts. It rejects unsuitable ones, for example
create-sourceson a node (the command reports the error with the target and exit code 1; targets already set stay set).
| Target | Possible permissions |
|---|---|
| Tenant | read, write, execute, manage, all and the tenant-only permissions |
| Node | read, write, execute, manage, all |
| Chart, dashboard, workflow, script | read, write, manage |
| Data source | read, manage |
| Component usage | read, execute, manage |
Examples#
A group may read in the whole tenant:
$ loot permission grant --tenant "Brewery" --group Operators --rights read
Tenant: gesetztA user may write values and trigger commands on a production line:
$ loot permission grant --tenant "Brewery" --user alice --rights read,write,execute --node Plant.Line1
Node 'Plant.Line1': gesetztIf the selection of permissions changes, the entry is replaced; repeating the same call changes nothing:
$ loot permission grant --tenant "Brewery" --user alice --rights read,write --node Plant.Line1
Node 'Plant.Line1': ersetzt
$ loot permission grant --tenant "Brewery" --user alice --rights read,write --node Plant.Line1
Node 'Plant.Line1': unverändertA group sees all charts and one particular dashboard and gets the permission to create scripts:
$ loot permission grant --tenant "Brewery" --group Analysts --rights read --chart "*" --dashboard "Line overview"
Chart 'Temperatures': gesetzt
Chart 'Throughput': gesetzt
Dashboard 'Line overview': gesetzt
$ loot permission grant --tenant "Brewery" --group Analysts --rights create-scripts
Tenant: gesetztA subtree stays closed to guests. A denial takes precedence over allowances:
$ loot permission grant --tenant "Brewery" --group Guests --rights read --deny --node Plant.Secret
Node 'Plant.Secret': gesetztPermissions for objects that do not exist in some tenants, without aborting:
$ loot permission grant --tenant "Brewery" --group Operators --rights read --dashboard "Line overview" --dashboard "Old board" --skip-missing
Dashboard 'Old board': übersprungen (gibt es im Tenant nicht)
Dashboard 'Line overview': gesetzt