all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH common,qemu-server,network,manager 0/10] mark secrets in schemas and redact them from the system report
Date: Sun,  1 Nov 2026 22:34:49 +0100	[thread overview]
Message-ID: <20261101213835.353604-1-t.lamprecht@proxmox.com> (raw)

The system report only requires Sys.Audit, but contains all guest configs
and the SDN configs verbatim. So it includes cloud-init passwords, in plain
text for Windows guests, and the API tokens of SDN IPAM and DNS
integrations. A report is often sent to support by someone who does not
own these credentials, for example a hosting provider renting out VMs.

This series adds a 'sensitive' flag for schema properties and uses it to
redact the report:

 - pve-common gets the flag, and helpers that replace the values of
   flagged properties in the raw text of key/value and section config
   files. Working on the raw text keeps invalid lines visible, which are
   often what support needs to see.
 - qemu-server flags the cloud-init password, and no longer shows it in
   the warning about an unparsable config line. pve-network flags the
   IPAM and DNS tokens.
 - The report redacts guest, storage and SDN IPAM/DNS configs through
   their schemas. In the whole report it also replaces passwords in URLs
   and values whose name suggests a credential, like mount options and
   container environment variables. The pvereport man page lists what
   gets redacted and where credentials can remain.

The flag only declares a value as secret; it changes neither validation
nor how values are stored. It can later also drive generic masking of API
output and task logs.

If it looks alright in general I can then add support for this also on
the rust side, partially prepared here already locally. And we can then
also leverage this more, like midterm also do a slightly more elaborate
secret-store concept with the biggest benefit being an unified API and
potentially different backends (pmxcfs, simple file store) and (at rest)
encryption and so on.

Repo (build-)dependencies:
 qemu-server, pve-network, pve-manager -> pve-common
The report change only has an effect with the qemu-server and pve-network
patches applied.

pve-common:

Thomas Lamprecht (4):
  section config: do not add isolated property lists on lookups
  schema: allow marking properties as sensitive
  schema: add helpers to redact sensitive values
  section config: add redaction of sensitive values in raw configs

 src/PVE/JSONSchema.pm                         |  51 ++++++
 src/PVE/SectionConfig.pm                      |  51 +++++-
 test/json-schema-test.pl                      | 148 ++++++++++++++++++
 .../section_config_property_isolation_test.pl |  52 ++++++
 test/section_config_test.pl                   |  40 +++++
 5 files changed, 341 insertions(+), 1 deletion(-)

qemu-server:

Thomas Lamprecht (2):
  cloud-init: mark the password as sensitive
  config: hide sensitive values of unparsable lines in warnings

 src/PVE/QemuServer.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

pve-network:

Thomas Lamprecht (1):
  sdn: ipam, dns: mark API tokens as sensitive

 src/PVE/Network/SDN/Dns/PowerdnsPlugin.pm  | 1 +
 src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 1 +
 2 files changed, 2 insertions(+)

pve-manager:

Thomas Lamprecht (3):
  report: redact sensitive values from guest, storage and SDN configs
  report: redact credentials in URLs, options and environment variables
  pvereport: man page: document which values get redacted

 PVE/Report.pm       | 78 ++++++++++++++++++++++++++++++++++++++++-----
 bin/pvereport       | 31 ++++++++++++++++++
 test/Makefile       |  6 +++-
 test/report_test.pl | 78 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 184 insertions(+), 9 deletions(-)
 create mode 100755 test/report_test.pl

-- 
2.47.3





             reply	other threads:[~2026-11-01 21:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01 21:34 Thomas Lamprecht [this message]
2026-11-01 21:34 ` [PATCH common 01/10] section config: do not add isolated property lists on lookups Thomas Lamprecht
2026-11-01 21:34 ` [PATCH common 02/10] schema: allow marking properties as sensitive Thomas Lamprecht
2026-11-01 21:34 ` [PATCH common 03/10] schema: add helpers to redact sensitive values Thomas Lamprecht
2026-11-01 21:34 ` [PATCH common 04/10] section config: add redaction of sensitive values in raw configs Thomas Lamprecht
2026-11-01 21:34 ` [PATCH qemu-server 05/10] cloud-init: mark the password as sensitive Thomas Lamprecht
2026-11-01 21:34 ` [PATCH qemu-server 06/10] config: hide sensitive values of unparsable lines in warnings Thomas Lamprecht
2026-11-01 21:34 ` [PATCH network 07/10] sdn: ipam, dns: mark API tokens as sensitive Thomas Lamprecht
2026-11-01 21:34 ` [PATCH manager 08/10] report: redact sensitive values from guest, storage and SDN configs Thomas Lamprecht
2026-11-01 21:34 ` [PATCH manager 09/10] report: redact credentials in URLs, options and environment variables Thomas Lamprecht
2026-11-01 21:34 ` [PATCH manager 10/10] pvereport: man page: document which values get redacted Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261101213835.353604-1-t.lamprecht@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal