public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Christian Ebner <c.ebner@proxmox.com>,
	pbs-devel@lists.proxmox.com,
	Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [PATCH proxmox{,-backup} 00/20] fix #7251: implement server side encryption support for push sync jobs
Date: Wed, 08 Apr 2026 09:50:19 +0200	[thread overview]
Message-ID: <1775634036.o4lx1mdxmb.astroid@yuna.none> (raw)
In-Reply-To: <185f5e2a-4c73-4e43-8089-f6383d5198cc@proxmox.com>

On April 2, 2026 9:37 am, Christian Ebner wrote:
> On 4/2/26 2:24 AM, Thomas Lamprecht wrote:
>> Am 01.04.26 um 09:55 schrieb Christian Ebner:
>>> This patch series implements support for encrypting backup snapshots
>>> when pushing from a source PBS instance to an untrusted remote target
>>> PBS instance. Further, it adds support to decrypt snapshots being
>>> encrypted on the remote source PBS when pulling the contents to the
>>> local target PBS instance.
>> 

[..]

> 
>> When a server-side key is configured on push, all snapshots with any
>> encrypted content are silently skipped. That includes fully client-side
>> encrypted ones that could just be synced as-is - they are already encrypted
>> after all. Might be better to push those unchanged and only skip genuinely
>> partially-encrypted snapshots? Or if unsure, allow to user to chose what
>> they want. Wrapping encryption is probably never a good idea though,
>> maybe just any parts that are not yet encrypted?
> 
> Pushing fully encrypted ones as is makes sense, only log and skip 
> partially encrypted snapshots.

pushing fully encrypted snapshots *if they use the same key*, or all
fully encrypted snapshots? I think the former is okay, the latter might
be confusing/unexpected and lead to "I have all my backups on the remote
but can't decrypt them because of the wrong key"?

e.g.:

client A uses key A to backup to PBS X
client B uses plaintext to backup to PBS X
PBS X uses key B to sync to PBS Y

user thinks key B is enough to restore backups from Y (after all, it's
the encryption key used for syncing), and destroys clients A and B and
PBS X (all in the same location maybe?). now they can't recover client
A..

I know this is technically on the user (they didn't pay attention to
their key management), but seems like a potential foot gun. if we skip
the groups of client A because of a key mismatch (and warn about that?)
then it is at least obvious that those backups *are not on Y*. we could
have a flag for allowing key mismatches to support such scenarios
opt-in?

>> Nit: The same `encryption_key` field means "encrypt" for push and
>> "decrypt" for pull. Maybe be literal here and name it decryption_key for
>> the later. Or something generic that works for both.
> 
> Yes, that make sense... Was primed by the fact that the entities 
> themself are referred to as encryption keys, but renaming this to 
> decryption_key for the pull makes more sense for making the code better 
> readable. Will adapt that.
> 
>> A few key lifecycle things:
>> 
>> Deleting a key does not check whether sync jobs reference it; the next run
>> just fails. Might want to refuse deletion while references exist, or at
>> least warn.
> 
> Yes, also realized this just now, will add a check for this in the api 
> handler and not allow to remove it in that case.

key rotation/lifecycle management would be a question in any case - we
could have one "active" key per sync job, and a list of archived ones
that are only used for decryption? a key rotation would obviously break
deduplication chains.. such a scheme would also allow re-encryption on
the fly of client-encrypted backups, if a matching key is provided -
though the use case for that seems limited to me (why encrypt in the
first place if you trust this PBS with the plaintext data?).

or alternatively it would need to be documented that for rotating a key,
you want to create a new key and target namespace, then switch the sync
job over (syncing everything from scratch), and delete the old copies
encrypted with the previous key once the re-sync is done?




  reply	other threads:[~2026-04-08  7:49 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01  7:55 Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox 01/20] pbs-api-types: define encryption key type and schema Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox 02/20] pbs-api-types: sync job: add optional encryption key to config Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 03/20] pbs-key-config: introduce store_with() for KeyConfig Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 04/20] pbs-config: implement encryption key config handling Christian Ebner
2026-04-01 23:27   ` Thomas Lamprecht
2026-04-02  7:09     ` Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 05/20] pbs-config: acls: add 'encryption-keys' as valid 'system' subpath Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 06/20] ui: expose 'encryption-keys' as acl subpath for 'system' Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 07/20] api: config: add endpoints for encryption key manipulation Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 08/20] api: config: allow encryption key manipulation for sync job Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 09/20] sync: push: rewrite manifest instead of pushing pre-existing one Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 10/20] sync: add helper to check encryption key acls and load key Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 11/20] fix #7251: api: push: encrypt snapshots using configured encryption key Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 12/20] ui: define and expose encryption key management menu item and windows Christian Ebner
2026-04-01 23:09   ` Thomas Lamprecht
2026-04-03  8:35     ` Dominik Csapak
2026-04-01 23:10   ` Thomas Lamprecht
2026-04-03 12:16   ` Dominik Csapak
2026-04-01  7:55 ` [PATCH proxmox-backup 13/20] ui: expose assigning encryption key to sync jobs Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 14/20] sync: pull: load encryption key if given in job config Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 15/20] sync: expand source chunk reader trait by crypt config Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 16/20] sync: pull: introduce and use decrypt index writer if " Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 17/20] sync: pull: extend encountered chunk by optional decrypted digest Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 18/20] sync: pull: decrypt blob files on pull if encryption key is configured Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 19/20] sync: pull: decrypt chunks and rewrite index file for matching key Christian Ebner
2026-04-01  7:55 ` [PATCH proxmox-backup 20/20] sync: pull: decrypt snapshots with matching encryption key fingerprint Christian Ebner
2026-04-02  0:25 ` [PATCH proxmox{,-backup} 00/20] fix #7251: implement server side encryption support for push sync jobs Thomas Lamprecht
2026-04-02  7:37   ` Christian Ebner
2026-04-08  7:50     ` Fabian Grünbichler [this message]
2026-04-08  8:13       ` Christian Ebner
2026-04-08  8:29         ` Thomas Lamprecht
2026-04-08  8:56           ` Christian Ebner
2026-04-08  9:03           ` Fabian Grünbichler
2026-04-03  8:39 ` Dominik Csapak
2026-04-03  8:50   ` Christian Ebner
2026-04-03  9:00     ` Dominik Csapak
2026-04-07 15:12 ` Manuel Federanko
2026-04-07 16:17   ` Christian Ebner
2026-04-08  7:29 ` David Riley
2026-04-08 15:11   ` Christian Ebner

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=1775634036.o4lx1mdxmb.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=t.lamprecht@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 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