]> git.proxmox.com Git - pve-access-control.git/commit
add Sys.AccessNetwork privilege
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 19 Feb 2024 15:25:51 +0000 (16:25 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Feb 2024 14:34:47 +0000 (15:34 +0100)
commit36c18144def351b0f1b60780dc841ea8970ca1c4
tree4875f0358c34563dc61e845a445069f1a9b8220c
parent742a7b6cbd2f1052ca5f5f1fc2a6a62a7d95310e
add Sys.AccessNetwork privilege

We have some API endpoints that can access the network from the POV of
a Proxmox VE node, like e.g., the one for downloading a template/ISO
image directly to a PVE storage from an HTTP URL, and the matching
query-url-metadata that makes this functionality much more convenient
to use in the UI. But the downside of such calls is naturally that
they basically allow to scan the whole network via HTTP URLs, and
potentially even download some image that the user should not have
access to and adding to a VM that the user controls.

Due to that we limited the exposure of those API endpoints to
Sys.Modify on / (in addition to e.g. basic storage privs) for the
initial addition of the feature, as we were not sure about user
adoption and if a separate privilege could be justified.

Since we got a handful requests like #5254 this justification is now
met, so add a 'Sys.AccessNetwork' privilege.
That name should make it clear that having that privilege will allow
access to the network and the sys(tem) prefix should underline that
it's about the host systems network. Add it such, that it will only be
available for the most powerful of our built-in special roles, namely
the Administration one, besides naturally the all-powerful root@pam
special user.

Admins can then e.g. create new roles that include Sys.AccessNetwork
and Datastore.AllocateTemplate which can then be used for allowing
automation to download images while adhering to the Least Privilege
Principle.

Buglink: https://bugzilla.proxmox.com/show_bug.cgi?id=5254
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/AccessControl.pm
src/test/perm-test1.pl