public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [QUESTION] pve-storage: intended Datastore.Audit visibility of prunebackups metadata
@ 2026-11-02  3:14 肖 宇良
  2026-11-03 15:17 ` Fiona Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: 肖 宇良 @ 2026-11-02  3:14 UTC (permalink / raw)
  To: pve-devel@lists.proxmox.com

Hello,
I would like to clarify the intended permission semantics of the prunebackups dry-run API.
Tested environment:

  *
Proxmox VE 9.2.21
  *
Proxmox Backup Server storage 4.2.8-1
  *
User B with PVEVMUser on its own pool and PVEDatastoreUser on the storage; no permission on VM 124, which belongs to another pool

Observed behavior:

  1.
As B, GET /nodes/<node>/storage/<storage>/prunebackups?prune-backups=keep-last%3D1 returns backups of all five guests on the storage, including VM 124, with volid, vmid, ctime and the keep/remove mark.
  2.
Adding &type=qemu&vmid=124 also returns both backups of VM 124.
  3.
GET /nodes/<node>/storage/<storage>/content?content=backup&vmid=124 returns no entries for the same user. The same content request without vmid also returns no entries.
  4.
GET /nodes/<node>/storage/<storage>/content/<volid> returns:
     *
Permission check failed (/vms/124, VM.Backup)
  5.
As the owner of VM 124, the content listing returns both backups.

The prunebackups API explicitly permits Datastore.Audit or Datastore.AllocateSpace and does not apply check_volume_access() to its result. The content API currently does apply that per-volume check.
The original prunebackups API discussion introduced the Datastore.Audit/Datastore.AllocateSpace permission check together with the volid, ctime, mark and vmid response fields:
https://lore.proxmox.com/pve-devel/ae57fdf5-c43a-f828-0d47-8e7aceb5ea62@proxmox.com/T/
In January 2023 it was explained that Datastore.Audit alone only permits knowing about the storage, and that listing backup archives additionally requires the per-volume check: Datastore.AllocateSpace on the storage plus VM.Backup on the owning guest:
https://lore.proxmox.com/pve-devel/1672907478.qzv3ze8grn.astroid@yuna.none/T/
A July 2025 patch for bug #5492 proposed letting Datastore.Audit users list a restricted set of backup metadata for monitoring. The thread was still discussing which fields to retain, and the content API still applies check_volume_access() in Proxmox VE 9.2.21:
https://lore.proxmox.com/pve-devel/1753881023.tvgbrwck0i.astroid@yuna.none/T/
Could you clarify whether the current prunebackups behavior is intentional?

  *
If yes, would it make sense to document that Datastore.Audit includes visibility of backup IDs and timestamps through the prune preview?
  *
If not, should the dry-run result apply the same per-volume filtering as the content API?

This is a permission-model and API-consistency question. The behavior was observed only with disposable users and backups in a private lab.
Regards,
Yuliang Xiao

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-03 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02  3:14 [QUESTION] pve-storage: intended Datastore.Audit visibility of prunebackups metadata 肖 宇良
2026-11-03 15:17 ` Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal