.acl
Onesimus extension
Manage console ACLs (Onesimus).
Aliases: .profile
Synopsis
.acl list [console=<console>]
.acl set console=<console> [jobacl=<jobacl>[,...] ...]
[clientacl=<clientacl>[,...] ...] [storageacl=<storageacl>[,...] ...]
[scheduleacl=<scheduleacl>[,...] ...] [poolacl=<poolacl>[,...] ...]
[commandacl=<commandacl>[,...] ...]
[filesetacl=<filesetacl>[,...] ...]
[catalogacl=<catalogacl>[,...] ...] [whereacl=<whereacl>[,...] ...]
[pluginoptionsacl=<pluginoptionsacl>[,...] ...]
.acl delete console=<console> [jobacl[=<jobacl>[,...]] ...]
[clientacl[=<clientacl>[,...]] ...]
[storageacl[=<storageacl>[,...]] ...]
[scheduleacl[=<scheduleacl>[,...]] ...]
[poolacl[=<poolacl>[,...]] ...]
[commandacl[=<commandacl>[,...]] ...]
[filesetacl[=<filesetacl>[,...]] ...]
[catalogacl[=<catalogacl>[,...]] ...]
[whereacl[=<whereacl>[,...]] ...]
[pluginoptionsacl[=<pluginoptionsacl>[,...]] ...]
.acl clear console=<console>
.acl copy from=<from> to=<to>
Words without brackets are required, [ ] marks optional parts, a | b alternatives, ... a repeatable argument and [,...] a comma separated list.
Description
Shows and changes the catalog tier of the two-tier console ACLs. The ACL directives of the Console and Profile resources are the outer frame (changed in the editor); the catalog ACL can only restrict further. Effective is what both allow.
set, delete, clear and copy need the CommandACL .acl and configure. Entries are comma separated; commas inside {}, [] or () belong to the entry (regular expressions), a repeated key adds entries.
Subcommands
.acl list
File and catalog entries, effective result.
Shows per ACL type the file entries (first those of the console, then those of its profiles), the catalog entries and the effective result, plus the load state of the catalog ACL. list is also the default when no subcommand is given. Without console= the own console is shown, or all consoles for a console that may use configure; the ACLs of another console need configure. Catalog entries that only allow what the file ACL forbids are marked as having no effect.
.acl list [console=<console>]
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
console= | resource | from .consoles | Console name. |
The ACLs of the own console:
.acl list
The file, catalog and effective ACLs of another console:
.acl list console=operator
.acl set
Replace catalog entries of types.
Replaces the catalog list of the console for every ACL type given. Entries are evaluated like a Bareos list: the first matching entry decides, ! forbids, regular expressions and *all* work as in the file, and a name no entry matches is forbidden. The change takes effect at once. Needs the CommandACL .acl and configure.
The catalog ACL of another console may be changed freely, since it can never go beyond that console’s file ACL. On the own console only a narrowing change is allowed: a first list for a type without catalog entries, or a list made from the old one only by inserting ! entries and removing entries without !.
.acl set console=<console> [jobacl=<jobacl>[,...] ...]
[clientacl=<clientacl>[,...] ...] [storageacl=<storageacl>[,...] ...]
[scheduleacl=<scheduleacl>[,...] ...] [poolacl=<poolacl>[,...] ...]
[commandacl=<commandacl>[,...] ...]
[filesetacl=<filesetacl>[,...] ...]
[catalogacl=<catalogacl>[,...] ...] [whereacl=<whereacl>[,...] ...]
[pluginoptionsacl=<pluginoptionsacl>[,...] ...]
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
console= | resource | from .consoles | required | Console name. | |
jobacl= | string | repeatable, list | Catalog ACL entries (comma list, repeatable). | ||
clientacl= | string | repeatable, list | Catalog ACL entries (comma list, repeatable). | ||
storageacl= | string | repeatable, list | Catalog ACL entries (comma list, repeatable). | ||
scheduleacl= | string | repeatable, list | Catalog ACL entries (comma list, repeatable). | ||
poolacl= | string | repeatable, list | Catalog ACL entries (comma list, repeatable). | ||
commandacl= | string | repeatable, list | Catalog ACL entries (comma list, repeatable). | ||
filesetacl= | string | repeatable, list | Catalog ACL entries (comma list, repeatable). | ||
catalogacl= | string | repeatable, list | Catalog ACL entries (comma list, repeatable). | ||
whereacl= | string | repeatable, list | Catalog ACL entries (comma list, repeatable). | ||
pluginoptionsacl= | string | repeatable, list | Catalog ACL entries (comma list, repeatable). |
Restrict a console to some clients:
.acl set console=ops clientacl=bareos-fd,!old-fd
.acl delete
Delete catalog entries.
Removes the given entries from the catalog ACL of the console; a type key without a value removes the whole catalog list of that type, which then no longer restricts. An entry the catalog ACL does not have is an error and nothing changes. Works also for a console that is no longer configured but still has catalog entries. Needs the CommandACL .acl and configure; on the own console only removing entries without ! is allowed.
.acl delete console=<console> [jobacl[=<jobacl>[,...]] ...]
[clientacl[=<clientacl>[,...]] ...]
[storageacl[=<storageacl>[,...]] ...]
[scheduleacl[=<scheduleacl>[,...]] ...]
[poolacl[=<poolacl>[,...]] ...]
[commandacl[=<commandacl>[,...]] ...]
[filesetacl[=<filesetacl>[,...]] ...]
[catalogacl[=<catalogacl>[,...]] ...]
[whereacl[=<whereacl>[,...]] ...]
[pluginoptionsacl[=<pluginoptionsacl>[,...]] ...]
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
console= | resource | from .consoles | required | Console name. | |
jobacl= | string | repeatable, list, value optional | Entries to delete; without value every entry of the type. | ||
clientacl= | string | repeatable, list, value optional | Entries to delete; without value every entry of the type. | ||
storageacl= | string | repeatable, list, value optional | Entries to delete; without value every entry of the type. | ||
scheduleacl= | string | repeatable, list, value optional | Entries to delete; without value every entry of the type. | ||
poolacl= | string | repeatable, list, value optional | Entries to delete; without value every entry of the type. | ||
commandacl= | string | repeatable, list, value optional | Entries to delete; without value every entry of the type. | ||
filesetacl= | string | repeatable, list, value optional | Entries to delete; without value every entry of the type. | ||
catalogacl= | string | repeatable, list, value optional | Entries to delete; without value every entry of the type. | ||
whereacl= | string | repeatable, list, value optional | Entries to delete; without value every entry of the type. | ||
pluginoptionsacl= | string | repeatable, list, value optional | Entries to delete; without value every entry of the type. |
Remove one catalog entry:
.acl delete console=ops commandacl=status
Remove the whole catalog pool list:
.acl delete console=ops poolacl
.acl clear
Delete every catalog entry of a console.
Removes all catalog ACL entries of the console, so only its file ACL applies again. Works also for a console that is no longer configured. Needs the CommandACL .acl and configure and is refused on the own console, since it could widen the rights.
.acl clear console=<console>
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
console= | resource | from .consoles | required | Console name. |
Drop all catalog restrictions of a console:
.acl clear console=ops
.acl copy
Copy the catalog entries of a console.
Gives the console to= the catalog ACL lists of the console from=. Types that from= has no catalog entries for lose their entries at to=. The file ACLs of both consoles stay as they are. Needs the CommandACL .acl and configure.
.acl copy from=<from> to=<to>
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
from= | resource | from .consoles | required | Source console. | |
to= | resource | from .consoles | required | Target console. |
Apply the catalog restrictions of ops to gui-anna:
.acl copy from=ops to=gui-anna
Examples
File and catalog ACL of ops:
.acl list console=ops
Restrict ops:
.acl set console=ops jobacl=Backup-*,Restore commandacl=status,list
Remove the catalog JobACL entries:
.acl delete console=ops jobacl
Remove all catalog ACL entries of a console:
.acl clear console=ops
Give a console the catalog ACL lists of another:
.acl copy from=ops to=operator