[pve-devel] [PATCH access-control 1/9] add VM.Replicate privilege
Fiona Ebner
f.ebner at proxmox.com
Fri Jul 18 11:30:07 CEST 2025
Currently, guest replication is guarded with Datastore.Allocate on
'/storage', which is rather surprising. One could require
Datastore.AllocateSpace on all involved storages, but having a
dedicated privilege like for other VM operations like migration and
snapshot seems to be more natural.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
src/PVE/AccessControl.pm | 1 +
src/test/perm-test1.pl | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/PVE/AccessControl.pm b/src/PVE/AccessControl.pm
index e48e647..6c5a13f 100644
--- a/src/PVE/AccessControl.pm
+++ b/src/PVE/AccessControl.pm
@@ -1061,6 +1061,7 @@ my $privgroups = {
'VM.Clone',
'VM.GuestAgent.Unrestricted',
'VM.Migrate',
+ 'VM.Replicate',
'VM.Snapshot',
'VM.Snapshot.Rollback',
],
diff --git a/src/test/perm-test1.pl b/src/test/perm-test1.pl
index 50b46e2..d323447 100755
--- a/src/test/perm-test1.pl
+++ b/src/test/perm-test1.pl
@@ -66,8 +66,8 @@ check_permission(
. 'VM.Allocate,VM.Audit,VM.Backup,VM.Clone,VM.Config.CDROM,VM.Config.CPU,VM.Config.Cloudinit,'
. 'VM.Config.Disk,VM.Config.HWType,VM.Config.Memory,VM.Config.Network,VM.Config.Options,'
. 'VM.Console,VM.GuestAgent.Audit,VM.GuestAgent.FileRead,VM.GuestAgent.FileSystemMgmt,'
- . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Snapshot,'
- . 'VM.Snapshot.Rollback',
+ . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Replicate,'
+ . 'VM.Snapshot,VM.Snapshot.Rollback',
);
# Administrator -> Permissions.Modify!
check_permission(
@@ -86,8 +86,8 @@ check_permission(
. 'VM.Allocate,VM.Audit,VM.Backup,VM.Clone,VM.Config.CDROM,VM.Config.CPU,VM.Config.Cloudinit,'
. 'VM.Config.Disk,VM.Config.HWType,VM.Config.Memory,VM.Config.Network,VM.Config.Options,'
. 'VM.Console,VM.GuestAgent.Audit,VM.GuestAgent.FileRead,VM.GuestAgent.FileSystemMgmt,'
- . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Snapshot,'
- . 'VM.Snapshot.Rollback',
+ . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Replicate,'
+ . 'VM.Snapshot,VM.Snapshot.Rollback',
);
check_roles('max at pve', '/vms/200', 'storage_manager');
--
2.47.2
More information about the pve-devel
mailing list