Cannot change network of a VM when user hasn't got permission for old network

ahorner

Member
Dec 21, 2023
33
1
8
I have noticed an issue and would like to verify if this is intended behaviour.

I have given a user permission to reconfigure a VM, however the VM's NIC is currently configured for a vmbr that the user does not have permission for. They're able to access and use the VM without any trouble even in this state, but if they try to edit the VM's NIC to point it to a vmbr they do have access to, an error appears due to missing permission for the old vmbr:
1725562747128.png
As you can see, I am trying to save a VM's NIC with vmbr2000 (the old network, vmbr1000, is the one the user does not have access to)
 
I can partially understand it though, what if someone changes the VLAN on a network they don't have access, and now they're in a privileged network?

You would either need to force them to change adaptor as well, or allow those changes still, both wouldn't be a good solution, so just blocking both situation is probably the safest middle-ground (and adding a button/option for this "small" edge-case is probably more work then it's worth, and would open the door to possible security-risks).
 
Last edited:
I can partially understand it though, what if someone changes the VLAN on a network they don't have access, and now they're in a privileged network?

You would either need to force them to change adaptor as well, or allow those changes still, both wouldn't be a good solution, so just blocking both situation is probably the safest middle-ground.
Yes, but you also cannot save the old incorrect bridge regardless of whether you have changed the VLAN. The bridge field containing vmbr1000 shows as invalid, so the user is forced to change the bridge anyway if they want to change any other option.

1725566323528.png
This is to change it to a bridge they do have access to, which should be fine in my view. When they select a bridge they can access, no invalid fields are shown, the config is valid and should be saveable.