Back to Engineering Blog
Systems Design 3 min read

Write-Only Backup Credentials, and the Owner Check That Blocked Them

Our hypervisors wrote backups with the backup server's superuser password. We replaced it with a token that can only create backups and cannot prune or forget them, proved the negative case, and fixed the backup-ownership error that appeared on the first run.

Jason NevillBy , Houston, TX
#Backups#ProxmoxBackupServer#LeastPrivilege#Immutability

Key Architectural Takeaways

  • Test the negative case: a write-only token must fail when it tries to delete a backup.
  • PBS ties each backup group to the identity that created it, so changing identities means changing group owners.
  • Use a temporary, single-use admin token for the one-off fix, and delete it immediately.

The gap

We checked how the two hypervisors authenticated to the backup servers. One used the backup server's raw superuser password, which has full control and bypasses ACLs entirely, so a compromise of that hypervisor would hand an attacker the whole backup server. The other used a token scoped to a single datastore, which was better and revocable, but its DatastoreAdmin role still includes prune and modify. The credential used for routine writes could also destroy existing backups.

The change

We created a dedicated pve-backup-writer user and a token with DatastoreBackup only, scoped to the specific datastore on each backup server. Then we tested both directions:

  • Positive: a real proxmox-backup-client backup with the new token succeeded.
  • Negative: a snapshot forget against the backup it had just written failed with permission check failed - missing Datastore.Modify|Datastore.Prune. We saw the refusal live, not just inferred it from the role name.

We backed up each node's storage config first and switched it with pvesm set.

The incident on the first backup

The first real backup after the switch failed: backup owner check failed (pve-backup-writer@pbs!pve-storage != root@pam). PBS ties each backup group to the identity that created it. All 16 existing groups on each datastore were owned by the old identity, so the new token could write new groups but not append to existing ones, which meant all of them.

The fix was done carefully, with the owner's go-ahead for the exact mechanism. A temporary, single-use admin token existed only to run proxmox-backup-client change-owner against all 16 groups on each datastore. Then it was deleted immediately on both servers and confirmed gone with user list-tokens. A second real backup on each datastore then succeeded, with correct incremental reuse (about 92% and 88%). We also deleted the old over-privileged token, so no standing credential of that kind remained.

Moving prune off the write path

Pruning moved to the backup servers themselves, so the hypervisors never need delete rights.

Takeaway

A backup credential that can delete backups is a second copy of your risk. Give writers write-only access, prove the refusal, and keep destructive rights on the side that is hardest to compromise.

Follow the build on LinkedIn or by RSS.

All Articles

Follow the build

Questions about the build, or spotted something we got wrong? Find us on LinkedIn and GitHub.