Control-panel roles and logins
Every Octopus instance runs its own Ægir control panel (Hostmaster), and every
login to that panel carries one or more roles. The roles, and the permission
each one holds, are not something the instance decides for itself: they are a
Features export shipped by BOA in the hosting_custom_settings module, and the
export is re-applied on every install and upgrade pass and once a night. This page
is the operator reference for that matrix — where it comes from, what each role
grants, how the tenant's own login is built, how a login comes to see a site, the
backup-download gate, and the procedure for giving a tenant's colleague a panel
login of their own. The tenant-facing version is
logins and roles.
Where the matrix comes from, and why it cannot be edited on the box
hosting_custom_settings (package Features, enabled on every instance) exports
eight roles and 232 permissions, and those permissions are granted across ten
roles: the eight it creates, plus Drupal's own authenticated user and
anonymous user, which every site already has. drush8 @hostmaster fr hosting_custom_settings -y re-asserts it on three occasions:
- in the nightly maintenance (
night/10-account.sh), followed by two cache clears; - on every Octopus install pass and on every upgrade pass, after the module set
is enabled (
satellite.sh.inc).
So a permission ticked or a role created by hand at admin/people/permissions is
gone by the next morning, and a fresh instance carries the identical matrix from
its first pass. This is deliberate: the matrix is a security boundary shared by the
whole fleet, and the way to change it is a change to the export in the
hosting_custom_settings fork, shipped with BOA — not an edit on one box. Custom
per-tenant roles are not supported.
The export also stays honest on a box where some CMS modules are dark: the module
strips from the comparison every permission whose owning module is disabled
(hook_user_default_permissions_alter and hook_system_info_alter), so drush8 @hostmaster fl reports the feature as Default whether or not the Backdrop,
Grav and Textpattern modules are on. And because Features reverts the permission
component before the role component, the module re-runs the permission rebuild
once more after a pass that walked both (hook_features_post_restore), so a role
that the export introduces is created with its grants in one pass rather than
empty until the next night.
The roles
| Role | Grants | Held by default | What it is for |
|---|---|---|---|
root |
153 | nobody | The full set, including administer permissions, administer users, administer nodes and bypass node access. Exported so that the matrix is complete; no login on an instance carries it unless an operator assigns it. |
administrator |
51 | uid 1 (admin), the instance's first account |
The stock Drupal 7 administrator role. Site and platform administration (administer sites, administer platforms, create/edit/delete for both, Clone, Migrate, the CMS tasks, Export and Get on the Backups tab). uid 1 is the host's account and is never handed out; it is reached with drush8 @hostmaster uli. |
admin |
118 | the tenant's own login | The instance owner: everything a tenant can do — every site task including Delete, every Backups-tab button, platforms, Clients, administer users, administer clients, administer sites, administer platforms, administer tasks (cancel any task on the instance, re-run any), edit client users. Not administer permissions. |
aegir account manager |
49 | the tenant's own login | Client administration: administer clients, create client, edit client users, edit client uname, access user profiles, the site and platform bulk actions, cron intervals. It does carry the Backdrop, Grav, Textpattern and Git create … task permissions and the dlock/dunlock pair, but neither view site nor view platform, so hosting_task_menu_access refuses every one of them on the node. |
aegir client |
66 | the tenant's own login; a colleague's login on request | Every site task on the sites of the Clients the login is attached to, the Backups tab in full, download site backups, create login-reset task. No view platform, no create delete task, no administer tasks. |
aegir site operator |
37 | a colleague's login on request | The client set without Backup, Restore, backup Delete, Export/Get, Reset password, Delete Site and the Git, leftover and CMS tasks; with view platform added. |
aegir platform manager |
37 | nobody | Platform operations: administer platforms, create/edit/delete platform, create dlock task, create dunlock task, view locked platforms, the platform Git tasks, leftover import and purge, migration source, the CMS tasks. No site permission, no view task. |
aegir administrator |
61 | nobody | Hosting configuration: administer hosting, administer hosting features, administer hosting queues, administer hosting settings, access hosting wizard, Clients and their users, the bulk actions. No view site, no view platform. |
authenticated user |
9 | every login | access content, access disabled sites, edit own account, change own e-mail, change own password, configure site cron interval, view package, view own unpublished content, access overlay. A login with nothing but this role sees no site. |
anonymous user |
2 | — | access content, access disabled sites; nothing that touches hosting. |
Counts are the export's on a box with every CMS module enabled; on a box where the
Backdrop, Grav or Textpattern modules are dark, their task permissions are absent
from both sides of the comparison, so the numbers a role-list shows are lower for
the roles that hold them and the feature still reads Default. aegir site operator
holds none of them, so its 37 is the count on every box.
To read a role's grants on a box, as the instance user (or through su from root,
the pattern used throughout this page):
su -s /bin/bash - o1 -c "cd /data/disk/o1 && drush8 @hostmaster rls 'aegir site operator'"
role-list (rls) lists every role without an argument, one role's permissions
with a role name, and the roles holding a permission with --filter=<permission>.
aegir client in full
The tenant's own login holds it, and a colleague's login may hold it alone. Grouped by what the panel shows:
| Area | Permissions |
|---|---|
| Sites | view site, create site, edit site, delete site (a node operation the client feature never consults — Delete Site itself is the delete task), access disabled sites, view client, edit own client (the client node's author only), view package, view revisions, access content |
| Site tasks | create verify task, create backup task, create backup-delete task, create restore task, create disable task, create enable task, create login-reset task, create clone task, create migrate task, create migrate_source task, create flush_cache task, create rebuild_registry task, create update task (Run db updates), create utf8mb4_convert task, create site_health_check task |
| Git and leftovers | create git-pull task, create site git-checkout task, create site git-commit task, create site git-tag task, create leftover_import task, create leftover_purge task |
| CMS conversions | create backdrop_upgrade task, create backdrop_d6_upgrade task, create backdrop_cutover task, create grav_upgrade task, create grav_copy_upgrade task, create grav_cutover task, create grav_rename task, create txp_upgrade task, create txp_cutover task, create txp_rename task |
| Backups tab | download site backups (Export and Get), with Delete and Restore riding on create backup-delete task and create restore task |
| Tasks | view task, view own tasks, access task logs, cancel own tasks, retry failed tasks, update status of tasks |
| Site settings | create site aliases, create ssl certificate, configure site cron interval, configure site CiviCRM cron intervals |
| Bulk actions | execute hosting_site_verify_action, _backup_action, _disable_action, _enable_action, _flush_cache_action, _rebuild_registry_action, _utf8mb4_convert_action; execute hosting_platform_verify_action, _lock_action, _unlock_action, _dlock_action, _dunlock_action, _delete_action |
| Own account | edit own account |
Two of those grants read wider than they are. The platform bulk actions are inert
without view platform, because the Platforms list — the only place they are
offered — is refused to the role; and the site bulk-operations form is hidden by
hosting_site_views_pre_build from everyone without administer sites, so a
client-role login never sees it either. Task control, on the other hand, is exactly
as wide as it reads: cancel own tasks and retry failed tasks cover every task of
a type the login may create, on every site it can view — a task the account owner
queued included — and nothing on any other Client's site.
What the role does not hold: create delete task (admin and root only — Delete
Site is the one task no colleague login can queue), administer tasks (admin and
root only — it puts every task node on the instance in the login's reach through
the hosting task realm, cancels any task, and re-runs one whatever its type),
view platform, create platform, edit platform, delete platform,
create dlock task, create dunlock task, create client, edit client users,
administer users, administer sites, administer platforms, administer clients.
aegir site operator in full
Granted (37):
| Area | Permissions |
|---|---|
| Sites and platforms | view site, create site, edit site, view platform, view client, view package, access disabled sites, access content, view revisions |
| Site tasks | create verify task, create clone task, create migrate task, create migrate_source task, create flush_cache task, create rebuild_registry task, create update task, create utf8mb4_convert task, create site_health_check task, create disable task, create enable task |
| Tasks | view task, view own tasks, access task logs, cancel own tasks, retry failed tasks, update status of tasks |
| Site settings | create site aliases, create ssl certificate, configure site cron interval, configure site CiviCRM cron intervals |
| Bulk actions (the granted tasks only) | execute hosting_site_verify_action, _flush_cache_action, _rebuild_registry_action, _utf8mb4_convert_action, _disable_action, _enable_action |
| Own account | edit own account |
Withheld from the client set, and why:
| Withheld | Why |
|---|---|
create backup task, create backup-delete task, create restore task, execute hosting_site_backup_action |
A backup archive carries the full classic dump; the task, the bulk action and the Backups-tab buttons go together. |
download site backups |
The Export and Get routes of the Backups tab — a database copy leaving the panel. |
create login-reset task |
The one-time uid-1 login link, i.e. the site's administrator. |
delete site |
Ruled out; inert under the client feature anyway, withheld so the export reads as intended. |
edit own client |
Applies only to the client node's author, never to an attached team user. |
| The Git, leftover and CMS-conversion tasks, the platform bulk actions | Not in the ruled set; each is a one-line addition to the export if ever wanted. |
Verified on a box: with the role and client membership alone, the site page offers
Verify, Clone, Migrate, Flush all caches and the other granted tasks and no Backup,
Restore, Reset password or Delete button; hosting_confirm/<nid>/site_login-reset
and hosting_confirm/<nid>/site_backup answer 403; the Backups tab lists the
backups with no Get, Export, Delete or Restore button and no Create a new backup
link, and node/<nid>/backup/export/<bid>, /download/<bid>, /delete/<bid> and
/restore/<bid> answer 403; a Reset password task queued by a client-role login
leaves the operator seeing Go to <site> where the client sees Log in to <site>.
How the tenant's own login is built
On the instance's first pass (_LOCAL_STATUS=INIT), satellite.sh.inc:
- Creates the tenant's Client node (title
Octopus<random>,email=_CLIENT_EMAIL) and records it ashosting_default_client. Because BOA setshosting_client_register_user 1, saving a client node with an email creates a panel user for that address with theaegir clientrole and a random password;hosting_client_send_welcomeis0, so nothing is mailed. - Renames that user to
<oN>.ftpand sets its password to the shell password (_satellite_set_client_login), so the welcome email states one credential pair for both worlds. Matched by_CLIENT_EMAIL,uid > 1guard. - Adds the roles
admin,aegir account managerandaegir clientto the same user (urolby--mail), and seeds theuserprotecttable: theuid 0defaults protect every account that has no row of its own against edit and cancel by other accounts (up_edit=1,up_cancel=1), and the tenant's own account gets a row of its own —up_status,up_rolesandup_cancelset,up_editnot.
The result, readable on any instance:
su -s /bin/bash - o1 -c "cd /data/disk/o1 && drush8 @hostmaster sqlq \"select u.uid, u.name, group_concat(r.name) from users u left join users_roles ur on ur.uid=u.uid left join role r on r.rid=ur.rid where u.uid>0 group by u.uid\""
Expect uid 1 admin with administrator, and uid 2 <oN>.ftp with aegir client,aegir account manager,admin. Both are attached to a client in
hosting_client_user: uid 1 to client 1 (admin), the tenant to the default
client.
Two consequences worth knowing when a tenant asks:
- The tenant's login holds
administer users, so it can open the People list and add a user there — but the Roles field on the account form needsadminister permissions, which no exported role butrootholds, so the new user gets onlyauthenticated userand sees nothing; and theuserprotectdefaults keep the tenant from editing or cancelling any other account. Creating a login that does something is therefore always the operator's step (below). - The tenant can create further Clients. Creating one with an email address creates
a client-role user for it (random, unusable password, no mail), which the tenant
cannot then edit; the operator finishes it with
upwd, or creates the login outright.
How a login comes to see a site
Under the client feature, hosting_site_node_access and
hosting_platform_node_access return IGNORE for every operation but create, and
node access is decided by grants (hosting_client.access.inc):
- Membership is the
hosting_client_usertable — the Allowed users list on a Client's edit form. A user may be attached to several Clients. - Sites and clients carry a grant in the realm
hosting site/hosting clientwithgid= the client nid; tasks inherit their parent's. A login holdingview sitegets the gids of the Clients it is attached to; a login holdingadminister sitesgets gid 1, i.e. every site. Soview sitealone shows nothing until the user is attached to a Client, and attaching a user to a Client is what puts that Client's sites in front of it. - Platforms carry a grant per Client named in the platform's client access list
(
hosting_platform_client_access, the Clients tab on a platform node) plus the admin grant. A platform with an empty list is offered to every Client on the site form (p.pid IS NULLin the accessible-platforms query), but its own page and the Platforms list show it only to logins holdingadminister platforms. A site-operator login therefore lists the platforms whose client access names its Client, and can still create a site on any platform open to all. - Task pages and logs need
access task logsand view access on the task's node (hosting_task_log_access); a task on a site outside the login's Clients is refused by nid. Queueing a task on a site needscreate <type> taskand view access on the site (the site branch ofhosting_task_menu_access). Retrying (hosting_task_retry_access) needsretry failed tasks,create <type> taskfor the task's own type, and view access on the node the task ran on — the retry form carries the task nid as a hidden value, so a nid on another Client's site, or of a type the login could not queue, is refused; a site-operator login cannot re-run a backup or login-reset task, a client-role login can re-run any task on its Clients' sites, whoever queued it. Cancelling (hosting_task_cancel_access) follows the same triple withcancel own tasks.administer tasks— admin and root only — short-circuits both: it cancels any queued task on the instance and re-runs a task whatever its type, which is why no tenant-facing role carries it. - Every queued task records the login behind it in
hosting_task.queued_by; the task page prints Queued by and the task lists carry the column.
The backup-download gate
hosting_site_backup_manager gates its routes by node_access('view') alone and
creates its export tasks directly, so any login able to view a site could take its
archive. hosting_custom_settings defines the permission download site backups
(restrict access set) and re-points the routes in hook_menu_alter:
| Route | Access |
|---|---|
node/%node/backup/export/% |
download site backups and view on the site |
node/%node/backup/download/% |
download site backups and view on the site |
node/%node/backup/delete/% |
create backup-delete task and view on the site |
node/%node/backup/restore/% |
create restore task and view on the site |
download site backups is granted to admin, administrator, aegir client and
root, and withheld from aegir site operator. administrator holds neither
create backup-delete task nor create restore task, so the Backups tab's Delete
and Restore answer 403 for it — the same answer the site page gives it. The tab
(node/%node/backups) and its AJAX refresh list every backup for anyone who can
view the site; the two page callbacks are wrapped so the buttons of denied
actions, and the Create a new backup link without create backup task, are not
rendered. The access callbacks are the boundary; the stripping is presentation.
Giving a tenant's colleague a panel login
The tenant asks for a login, names the person, the role — Client or Site
operator — and the Client the person works under. As root, with the instance user
o1 and the new login jane:
-
Create the user with a password of your choosing (the panel's self-service reset link is switched off, so this is the password the person gets):
SHsu -s /bin/bash - o1 -c "cd /data/disk/o1 && drush8 @hostmaster ucrt jane [email protected] --password='<password>'" -
Give it the role — one of the two:
SHsu -s /bin/bash - o1 -c "cd /data/disk/o1 && drush8 @hostmaster urol 'aegir site operator' jane"SHsu -s /bin/bash - o1 -c "cd /data/disk/o1 && drush8 @hostmaster urol 'aegir client' jane" -
Attach it to the Client. The tenant can do this in the panel — the Client's edit form, Associate a user to this Client — with their own login, which holds
edit client users. From the shell, find the client node and insert the membership row (the same statement the panel writes):SHsu -s /bin/bash - o1 -c "cd /data/disk/o1 && drush8 @hostmaster sqlq \"select nid, title from node where type='client'\""SHsu -s /bin/bash - o1 -c "cd /data/disk/o1 && drush8 @hostmaster sqlq \"insert ignore into hosting_client_user (user, client) values (<uid>, <client nid>)\""The uid is in the
userstable (select uid from users where name='jane'). -
Check it before handing the password over:
SHsu -s /bin/bash - o1 -c "cd /data/disk/o1 && drush8 @hostmaster uli --name=jane --no-browser"Open the link: the Sites list shows the Client's sites and no others; for a site operator the site page has no Backup, Restore, Reset password or Delete button and the Backups tab no Get, Export, Delete or Restore.
-
Hand it over through the tenant, by whatever channel they use for passwords. The person changes the password on their own account page; it never expires.
Later changes, all as the instance user through the same su pattern:
| Need | Command |
|---|---|
| Switch the role | drush8 @hostmaster urrol 'aegir site operator' jane then drush8 @hostmaster urol 'aegir client' jane (or the other way round) |
| Reset the password | drush8 @hostmaster upwd jane --password='<password>' |
| Suspend the login | drush8 @hostmaster ublk jane (and uublk to lift it) |
| Detach from a Client | the tenant's own login, the Remove column on the Client's edit form; or delete from hosting_client_user where user=<uid> and client=<client nid> through sqlq |
| Remove the login | drush8 @hostmaster ucan jane — the tasks it queued keep its name in Queued by |
Never give a colleague login the admin role to save time: it carries administer users, create delete task and the platform operations, and the tenant's own login
already holds it. Never hand out uid 1.
Which shell account matches which role
Panel roles and shell accounts are separate systems that meet at the Client:
the two shell accounts a tenant can give an outsider are built from the Client that
owns the sites (manage_ltd_users.sh), not from any panel login. Match them by the
power they carry:
| Panel role | Matching shell account | Why |
|---|---|---|
aegir client |
oN.<client> (files and themes), or oN.<client>-dev where the tenant asks for it |
The role already hands out the database (Backup, Export) and the admin login (Reset password); Drush in the developer account adds nothing the panel does not give. |
aegir site operator |
oN.<client> at most |
The role is defined by withholding a database copy and an admin login; oN.<client>-dev carries Drush, which is both, and would undo the role through the shell. Refuse the developer account for such a person, or have the tenant give them the Client role first. |
| the tenant's own login | oN.ftp |
The owner's shell; never shared. |
The developer account's own page carries the same rule under Before you start: platform developer account.
Verifying the matrix on a box
The same checks the delivery proof runs, as the instance user:
drush8 @hostmaster fl | grep -i custom_settings
drush8 @hostmaster sqlq "select count(*) from role where name='aegir site operator'"
drush8 @hostmaster sqlq "select count(*) from role_permission rp join role r on r.rid=rp.rid where r.name='aegir site operator'"
drush8 @hostmaster sqlq "select group_concat(r.name order by r.name) from role_permission rp join role r on r.rid=rp.rid where rp.permission='download site backups'"
Expect Default, 1, 37 and admin,administrator,aegir client,root. The
site-operator set holds no Backdrop, Grav or Textpattern permission, so 37 is its
count on every box, dark CMS modules or not: a lower number is the export not
landing, never a dark module. A feature reading Overridden means a hand edit is
pending its revert: drush8 @hostmaster fr hosting_custom_settings -y re-applies
the export at once.
Related
- Logins and roles — the tenant-facing page.
- Platform developer account — the operator procedure for
oN.<client>-dev. - Shell extras — the ordinary per-Client sub-account.
- lshell + manage_ltd_users — the restricted shell and the worker behind every tenant account.
- Hosting module suite — the modules whose permissions the export covers.