]> git.proxmox.com Git - mirror_zfs.git/commit - man/man5/zpool-features.5
Native Encryption for ZFS on Linux
authorTom Caputi <tcaputi@datto.com>
Mon, 14 Aug 2017 17:36:48 +0000 (13:36 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 14 Aug 2017 17:36:48 +0000 (10:36 -0700)
commitb52563034230b35f0562b6f40ad1a00f02bd9a05
tree794ccc5160e997e280cb6e36c7778ce9f7a96548
parent376994828fd3753aba75d492859727ca76f6a293
Native Encryption for ZFS on Linux

This change incorporates three major pieces:

The first change is a keystore that manages wrapping
and encryption keys for encrypted datasets. These
commands mostly involve manipulating the new
DSL Crypto Key ZAP Objects that live in the MOS. Each
encrypted dataset has its own DSL Crypto Key that is
protected with a user's key. This level of indirection
allows users to change their keys without re-encrypting
their entire datasets. The change implements the new
subcommands "zfs load-key", "zfs unload-key" and
"zfs change-key" which allow the user to manage their
encryption keys and settings. In addition, several new
flags and properties have been added to allow dataset
creation and to make mounting and unmounting more
convenient.

The second piece of this patch provides the ability to
encrypt, decyrpt, and authenticate protected datasets.
Each object set maintains a Merkel tree of Message
Authentication Codes that protect the lower layers,
similarly to how checksums are maintained. This part
impacts the zio layer, which handles the actual
encryption and generation of MACs, as well as the ARC
and DMU, which need to be able to handle encrypted
buffers and protected data.

The last addition is the ability to do raw, encrypted
sends and receives. The idea here is to send raw
encrypted and compressed data and receive it exactly
as is on a backup system. This means that the dataset
on the receiving system is protected using the same
user key that is in use on the sending side. By doing
so, datasets can be efficiently backed up to an
untrusted system without fear of data being
compromised.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #494
Closes #5769
163 files changed:
cmd/zdb/zdb.c
cmd/zdb/zdb_il.c
cmd/zfs/zfs_main.c
cmd/zinject/translate.c
cmd/zpool/zpool_main.c
cmd/zstreamdump/zstreamdump.c
cmd/ztest/ztest.c
configure.ac
include/libuutil.h
include/libzfs.h
include/libzfs_core.h
include/sys/Makefile.am
include/sys/arc.h
include/sys/arc_impl.h
include/sys/dbuf.h
include/sys/ddt.h
include/sys/dmu.h
include/sys/dmu_objset.h
include/sys/dmu_send.h
include/sys/dmu_traverse.h
include/sys/dnode.h
include/sys/dsl_crypt.h [new file with mode: 0644]
include/sys/dsl_dataset.h
include/sys/dsl_deleg.h
include/sys/dsl_dir.h
include/sys/dsl_pool.h
include/sys/fm/fs/zfs.h
include/sys/fs/zfs.h
include/sys/spa.h
include/sys/spa_impl.h
include/sys/zfs_ioctl.h
include/sys/zil.h
include/sys/zio.h
include/sys/zio_crypt.h [new file with mode: 0644]
include/sys/zio_impl.h
include/zfeature_common.h
include/zfs_deleg.h
include/zfs_prop.h
lib/libicp/Makefile.am
lib/libspl/include/sys/mount.h
lib/libzfs/Makefile.am
lib/libzfs/libzfs_changelist.c
lib/libzfs/libzfs_crypto.c [new file with mode: 0644]
lib/libzfs/libzfs_dataset.c
lib/libzfs/libzfs_diff.c
lib/libzfs/libzfs_mount.c
lib/libzfs/libzfs_pool.c
lib/libzfs/libzfs_sendrecv.c
lib/libzfs/libzfs_util.c
lib/libzfs_core/libzfs_core.c
lib/libzpool/Makefile.am
man/man5/zpool-features.5
man/man8/zfs.8
man/man8/zpool.8
module/icp/algs/sha2/sha2.c
module/icp/core/kcf_prov_lib.c
module/icp/illumos-crypto.c
module/zcommon/zfeature_common.c
module/zcommon/zfs_deleg.c
module/zcommon/zfs_prop.c
module/zfs/Makefile.in
module/zfs/arc.c
module/zfs/bptree.c
module/zfs/dbuf.c
module/zfs/ddt.c
module/zfs/dmu.c
module/zfs/dmu_objset.c
module/zfs/dmu_send.c
module/zfs/dmu_traverse.c
module/zfs/dnode.c
module/zfs/dnode_sync.c
module/zfs/dsl_crypt.c [new file with mode: 0644]
module/zfs/dsl_dataset.c
module/zfs/dsl_destroy.c
module/zfs/dsl_dir.c
module/zfs/dsl_pool.c
module/zfs/dsl_prop.c
module/zfs/dsl_scan.c
module/zfs/spa.c
module/zfs/spa_config.c
module/zfs/spa_errlog.c
module/zfs/spa_history.c
module/zfs/spa_misc.c
module/zfs/vdev.c
module/zfs/vdev_raidz.c
module/zfs/zfeature.c
module/zfs/zfs_acl.c
module/zfs/zfs_fm.c
module/zfs/zfs_ioctl.c
module/zfs/zfs_vfsops.c
module/zfs/zil.c
module/zfs/zio.c
module/zfs/zio_checksum.c
module/zfs/zio_crypt.c [new file with mode: 0644]
module/zfs/zvol.c
module/zpios/pios.c
rpm/generic/zfs.spec.in
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/cli_root/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_change-key/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zfs_change-key/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_change-key/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_child.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_format.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_inherit.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_load.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_location.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_pbkdf2iters.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_clone/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_encrypted.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_create/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_crypt_combos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_encrypted.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key.cfg [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_all.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_common.kshlib [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_file.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_location.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_noop.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_recursive.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_mount/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_encrypted.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_promote/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_encryptionroot.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_receive/setup.ksh
tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_from_encrypted.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_raw.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_raw_incremental.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_to_encrypted.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_rename/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_encrypted_child.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_to_encrypted.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_send/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_encrypted.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_encrypted_unloaded.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_raw.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_set/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_set/setup.ksh
tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_keylocation.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/zfs_unload-key.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/zfs_unload-key_all.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/zfs_unload-key_recursive.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_create/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_crypt_combos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_encrypted.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg
tests/zfs-tests/tests/functional/cli_root/zpool_import/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_encrypted.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_encrypted_load.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_scrub/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_encrypted_unloaded.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/rsend/Makefile.am
tests/zfs-tests/tests/functional/rsend/rsend.kshlib
tests/zfs-tests/tests/functional/rsend/send_encrypted_heirarchy.ksh [new file with mode: 0755]