12.4. Configuring an NVMe/TCP host using TLS with Pre-Shared-Keys
You can configure a Non-volatile Memory Express™ (NVMe™) over TCP (NVMe™/TCP) host while enabling TLS encryption. The NVMe/TLS configuration uses a TLS Pre-Shared Key (PSK).
The NVM Express TCP Transport Specification specifies a PSK Interchange Format for exchanging PSK information between systems. You can use nvme-cli or other methods to generate PSKs in this format (for example, create it on a storage target, see your vendor documentation). These configured PSKs are then used by nvme-cli to derive retained PSKs, which are inserted into a kernel keyring for use.
NVMe/TCP using TLS is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
Prerequisites
-
The
nvme_tcpkernel module is installed on your system. The following packages are installed on your system:
-
nvme-cli -
ktls-utils
-
- You have the Subsystem NVMe Qualified Name (Subsystem NQN).
- You have root permissions on the system.
Procedure
Configure Pre-Shared-Key Keyring.
Identify Host NQN:
# HOSTNQN=$(nvme show-hostnqn)Generate and copy a newly configured PSK:
# PSK=$(nvme gen-tls-key)# echo $PSKConfigure Pre-Shared-Key Keyring:
# nvme check-tls-key --insert --hostnqn=${HOSTNQN} --subsysnqn=${SUBSYSTEM} --keydata=${PSK} --identity=1
Configure the
tlshdservice.Add the keyring name to the
/etc/tlshd.confconfiguration file:... [authenticate] keyring=.nvme ...Restart the
tlshdservice:# systemctl restart tlshd
Enable TLS for NVMe fabrics connections:
# nvme discover -t tcp --tls -a ${TRADDR} -s 4420# nvme connect -t tcp --tls -a ${TRADDR} -s 4420 -n ${SUBSYSTEM}
Verification
List the NVMe devices that are currently connected:
# nvme list Node Generic SN Model Namespace Usage Format FW Rev --------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- -------- /dev/nvme4n1 /dev/ng4n1 81JJAJTOpnmUAAAAAAAB NetApp ONTAP Controller 0x1 16.17 GB / 161.06 GB 4 KiB + 0 B 9.16.1