zrepl/config
Christian Schwarz fb6a9be954 fix encrypt-on-receive with placeholders
fixes https://github.com/zrepl/zrepl/issues/504

Problem:
  plain send + recv with root_fs encrypted + placeholders causes plain recvs
  whereas user would expect encrypt-on-recv
Reason:
  We create placeholder filesytems with -o encryption=off.
  Thus, children received below those placeholders won't inherit
  encryption of root_fs.
Fix:
  We'll have three values for `recv.placeholders.encryption: unspecified (default) | off | inherit`.
  When we create a placeholder, we will fail the operation if  `recv.placeholders.encryption = unspecified`.
  The exception is if the placeholder filesystem is to encode the client identity ($root_fs/$client_identity) in a pull job.
  Those are created in `inherit` mode if the config field is `unspecified` so that users who don't need
  placeholders are not bothered by these details.

Future Work:
  Automatically warn existing users of encrypt-on-recv about the problem
  if they are affected.
  The problem that I hit during implementation of this is that the
  `encryption` prop's `source` doesn't quite behave like other props:
  `source` is `default` for `encryption=off` and `-` when `encryption=on`.
  Hence, we can't use `source` to distinguish the following 2x2 cases:
  (1) placeholder created with explicit -o encryption=off
  (2) placeholder created without specifying -o encryption
  with
  (A) an encrypted parent at creation time
  (B) an unencrypted parent at creation time
2021-12-18 15:12:47 +01:00
..
samples send/recv: job-level bandwidth limiting 2021-09-12 20:08:43 +02:00
config_dep_test.go config: add test for fromdefaults behavior 2020-07-26 20:32:35 +02:00
config_global_test.go docs/monitoring: change suggested prometheus port to 9811 2021-03-28 18:18:02 +02:00
config_jobid_test.go new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold 2020-02-14 22:00:13 +01:00
config_minimal_test.go format source tree using goimports 2019-03-22 19:41:12 +01:00
config_positiveintervalormanual_test.go pull job: support manual-only invocation 2019-03-16 14:24:05 +01:00
config_recv_test.go [#285] support setting zfs send / recv flags in the config (send: -wLcepbS, recv: -ox) 2021-02-20 17:20:45 +01:00
config_send_test.go [#285] support setting zfs send / recv flags in the config (send: -wLcepbS, recv: -ox) 2021-02-20 17:20:45 +01:00
config_snapshotting_test.go pre- and post-snapshot hooks 2019-09-27 21:25:59 +02:00
config_test.go Spellcheck all files 2020-02-24 16:06:09 +01:00
config_transport_test.go config: validate presence of port in addresses 2019-09-28 14:25:14 +02:00
config.go fix encrypt-on-receive with placeholders 2021-12-18 15:12:47 +01:00
retentiongrid.go [#292] pruning: add func MustNewKeepGrid 2020-09-02 22:45:44 +02:00