proxmox_backup: check and report the server's TLS certificate (CertificateCheck) #60

Open
opened 2026-11-03 05:00:11 +00:00 by christianmanivong · 1 comment
Owner

Priority: P3 (important, not urgent): the backup server connects with verification off on a self-signed certificate, and netOrk's certificate store learns nothing about it.

ProxmoxBackupDriver (and ProxmoxDriver) ignore optional_args["tls_fingerprints"] and tls_certificate_observer (napalm-device-types tls_certificates, procurve#17). With verify_ssl off a wrong host gets the API token, and netOrk keeps no TLS fingerprint for the device.

Seen on 2026-11-03 (NetOrk/netork#1919): a PVE pbs storage pins the PBS's fingerprint, but netOrk has no TLS key for the proxmox_backup device to compare it with, so netOrk ties the storage to the server by host and port instead.

What

Use CertificateCheck in ProxmoxBase.open(): verify_server before the first request when verify_ssl is off, pin on the requests session proxmoxer uses, observations to the observer. Both products share the base, so PVE gets it too.

Test-First

  • a known fingerprint and another certificate → TlsCertificateMismatch before any request with the token
  • no fingerprint → first use accepted and reported to the observer
  • neither argument → connects as today
Priority: P3 (important, not urgent): the backup server connects with verification off on a self-signed certificate, and netOrk's certificate store learns nothing about it. `ProxmoxBackupDriver` (and `ProxmoxDriver`) ignore `optional_args["tls_fingerprints"]` and `tls_certificate_observer` (napalm-device-types `tls_certificates`, procurve#17). With `verify_ssl` off a wrong host gets the API token, and netOrk keeps no TLS fingerprint for the device. Seen on 2026-11-03 (NetOrk/netork#1919): a PVE `pbs` storage pins the PBS's fingerprint, but netOrk has no TLS key for the `proxmox_backup` device to compare it with, so netOrk ties the storage to the server by host and port instead. ## What Use `CertificateCheck` in `ProxmoxBase.open()`: `verify_server` before the first request when `verify_ssl` is off, `pin` on the requests session proxmoxer uses, observations to the observer. Both products share the base, so PVE gets it too. ## Test-First - [ ] a known fingerprint and another certificate → `TlsCertificateMismatch` before any request with the token - [ ] no fingerprint → first use accepted and reported to the observer - [ ] neither argument → connects as today
christianmanivong added the
prio
P3
enhancement
labels 2026-11-03 05:00:11 +00:00
Author
Owner

From a comparison with Proxmox Datacenter Manager (PDM 1.1.10 of 2026-11-14, source read at git e5347a49).

PDM pins by default. A certificate the system trust store accepts is trusted; otherwise PDM pins the SHA-256 fingerprint accepted when the remote is added (trust on first use via POST /pve/probe-tls). Since 1.0.6/1.1 it can re-probe and re-pin per node (POST /remotes/remote/{id}/probe-certificate, a "Check Certificate" dialog), described as "a stop-gap until all Proxmox products support staged certificate rotation" (docs/remotes.rst, server/src/connection.rs).

netOrk talks to PVE and PBS with verification off by design (netork/core/assessment/tls_cert.py:3-6), and with an API token that is usually admin-equivalent. So this issue is the difference between netOrk and the reference product on a credential-exposure path.

Suggestion, for Christian to decide: raise this from P3 to P2. The re-probe flow, for a node whose self-signed certificate was regenerated (for example by pvenode cert create --overwrite during netOrk's own set_hostname, system_mixin.py:385-489), would fit netOrk's existing TLS-fingerprint trust UI.

Related: NetOrk/netork#2649 (cluster as one connection; PDM pins per node URL).

From a comparison with Proxmox Datacenter Manager (PDM 1.1.10 of 2026-11-14, source read at git `e5347a49`). PDM pins by default. A certificate the system trust store accepts is trusted; otherwise PDM **pins the SHA-256 fingerprint accepted when the remote is added** (trust on first use via `POST /pve/probe-tls`). Since 1.0.6/1.1 it can re-probe and re-pin per node (`POST /remotes/remote/{id}/probe-certificate`, a "Check Certificate" dialog), described as "a stop-gap until all Proxmox products support staged certificate rotation" ([`docs/remotes.rst`](https://git.proxmox.com/?p=proxmox-datacenter-manager.git;a=blob;f=docs/remotes.rst;hb=e5347a49), [`server/src/connection.rs`](https://git.proxmox.com/?p=proxmox-datacenter-manager.git;a=blob;f=server/src/connection.rs;hb=e5347a49)). netOrk talks to PVE and PBS with verification off by design (`netork/core/assessment/tls_cert.py:3-6`), and with an API token that is usually admin-equivalent. So this issue is the difference between netOrk and the reference product on a credential-exposure path. **Suggestion, for Christian to decide:** raise this from P3 to **P2**. The re-probe flow, for a node whose self-signed certificate was regenerated (for example by `pvenode cert create --overwrite` during netOrk's own `set_hostname`, `system_mixin.py:385-489`), would fit netOrk's existing TLS-fingerprint trust UI. Related: NetOrk/netork#2649 (cluster as one connection; PDM pins per node URL).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-proxmox#60