mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-02 17:06:09 +00:00
A review of every Markdown file against the code found steps that would fail and statements that are no longer true: - RHEL computes set up by hand enabled only virtqemud: the storage, network and other host pages need their daemons' sockets too; - moving to a new machine migrated without /etc/default/webvirtcloud (a PostgreSQL panel would migrate the wrong database), and needed a node_id an older backup may lack; - a rollback left update.sh's marker of a stopped update, which the next update would have gone on with; - the manual installs' group and mode lines failed on hosts without one of the groups or without sqlite; RHEL's CodeReady Builder repository; - the NFS backup target was defined on the user's libvirt connection; - the off-site restore picked a backup by name, not time; - the features, the jobs list, the console token, the alert webhook (ntfy does not take it), the API's submission_key, WS_* in the update, the update's last failure, the doc/ API and app tables, permissions of templates, protected VMs, backups and the .vv file. An installer rerun kept WS_PORT in data/local_settings.py but pointed nginx at that run's answer: it now takes the kept port.
4.2 KiB
4.2 KiB
Users, Roles and Permissions
WebVirtCloud combines three kinds of access rights:
- Superuser (
is_superuser): full administration — computes, storage pools, networks, interfaces, nwfilters, secrets, app settings, users, and every VM. - Global permissions (Django permissions, set per user or group in the admin pages):
instances.view_instances— read-only auditor role: sees every VM in lists and detail pages, but cannot change them and cannot open their consoles.instances.clone_instances— may clone VMs (see the table for which ones).instances.snapshot_instances— may create, revert and delete snapshots of VMs they may change.instances.backup_instances— may back up the VMs they may change (see the table).instances.passwordless_console— the console page fills in the VNC password automatically, and the.vvfile holds it (ticked by default on the Users page's new-user form; a user made otherwise, such as from LDAP, does not get it).accounts.change_password— may change their own password.
- Per-VM ownership (an owner entry for a user on a VM, managed by a superuser on the VM's page) with three flags:
is_change,is_delete,is_vnc. An owner without flags may see, start and stop the VM and open its console.
| Action on a VM | Superuser | Owner | Owner flag / permission needed | view_instances only |
|---|---|---|---|---|
| See the VM (list, detail) | ✅ | ✅ | — | ✅ |
| Start, shut down, power cycle, force off | ✅ | ✅ | — | ❌ |
Open the console (noVNC or, when it is on, the serial console; .vv file for virt-viewer, VDI URL) |
✅ | ✅ | — | ❌ |
| Resize CPU/memory/disk, set root password, add SSH key, change title/description | ✅ | ✅ | is_change |
❌ |
| Change console settings (type, VNC password, keymap) | ✅ | ✅ | is_change and is_vnc; the listen address, and removing the password of a console that listens beyond localhost, are a superuser's; nobody's on a template |
❌ |
| Snapshots | ✅ | ✅ | is_change and instances.snapshot_instances |
❌ |
| Clone | ✅ | ✅ | is_change and instances.clone_instances (templates: viewing the template is enough) |
templates only, with instances.clone_instances |
| Delete the VM | ✅ | ✅ | is_delete |
❌ |
| Disks and media (add, attach, edit, detach, delete volumes; CD-ROM/ISO) | ✅ | ❌ | — | ❌ |
| Network interfaces, boot options, vCPU hotplug, autostart, guest agent, suspend/resume, migrate, raw XML, owners | ✅ | ❌ | — | ❌ |
Set tags (owners and view_instances see them) |
✅ | ❌ | — | ❌ |
| Backups: back up (within the backup quota), restore over the VM or as a new VM (within the VM quota), into and from targets open to VM owners | ✅ | ✅ | is_change and instances.backup_instances |
❌ |
| Delete a backup one took by hand (not a schedule's) on a target open to VM owners | ✅ | ✅ | instances.backup_instances (ownership not needed) |
❌ |
| Backup targets and schedules | ✅ | ❌ | — | ❌ |
Notes:
- Only superusers choose disk names and MAC addresses when cloning; for other users the server derives them.
is_staffgives no access to VMs and does not reveal console settings or VNC passwords by itself.- A VM an administrator paused stays paused for its owners: their power actions on it are refused.
- A protected VM (a superuser's setting on its Settings tab) is neither deleted nor restored over, by anyone, until the protection is turned off.
- A template VM is changed (resize, root password, SSH keys, title and description, snapshots) only by superusers and by staff owners with
is_change, and deleted only by superusers and staff owners withis_delete; other owners keep view, console and power (power on and power cycle of a template are refused with a warning). Cloning a template needs only view access andinstances.clone_instances. - On VM pages, users without ownership or
view_instancesget 404 (the VM's existence is not revealed), and users who can see a VM but lack the right for an action get 403. Superuser-only pages answer 403 to everyone else; the console page answers 403 both for a missing VM and for a VM the user may not open.