Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 6. Configuring RHEL on Public Cloud Platforms with Intel TDX
Intel Trust Domain Extensions (TDX) is a security type of Confidential Virtual Machine (CVM), which provides a secure and isolated environment for VM. This approach is an advancement to the former technology, Intel Software Guard Extensions (SGX).
SGX provides VM isolation from the hypervisor and cloud service providers by creating secure memory regions known as enclaves. Application code stored in enclaves has access to memory and data stored inside the enclave, making it inaccessible to outside entities.
TDX creates hardware-isolated VMs called Trusted Domains (TDs). It ensures that only a VM accesses its memory and TD VMs are isolated from Virtual Machine Manager (VMM), hypervisors, other VMs, and the host. This ensures that while using resources from hypervisor, CPU, TD VMs remain secure by maintaining data confidentiality and integrity.
The main difference between SGX and TDX is that SGX works at application level while TDX works at virtualization level by limiting hypervisor access.
Before deploying Red Hat Enterprise Linux (RHEL) on a public cloud platform, always check with the corresponding cloud service provider for the support status and certification of the particular RHEL instance type.
6.1. Understanding Intel TDX secure boot process Copier lienLien copié sur presse-papiers!
- Initialization and measurement: A TDX-enabled hypervisor sets the initial state of a VM. This hypervisor loads the firmware binary file into the VM memory and sets the initial register state. The Intel processor measures the initial state of the VM and provides details to verify the initial state of the VM.
- Firmware: The VM initiates the UEFI firmware. The firmware might include stateful or stateless Virtual Trusted Platform Module (vTPM) implementation. Stateful vTPM maintains persistent cryptographic state across VM reboots and migrations, whereas stateless vTPM generates fresh cryptographic state for each VM session without persistence. Virtual Machine Privilege Levels (VMPL) technology isolates vTPM from the guest. VMPL offers hardware-enforced privilege isolation between different VM components and the hypervisor.
- vTPM: Depending on your cloud service provider, for stateful vTPM implementation, the UEFI firmware might perform a remote attestation to decrypt the persistent state of vTPM. The vTPM also gathers data about the boot process, such as Secure Boot state, certificates used for signing boot artifacts, or UEFI binary hashes.
Shim : When the UEFI firmware finishes the initialization process, it searches for the extended firmware interface (EFI) system partition. Then, the UEFI firmware verifies and executes the first stage boot loader from there. For RHEL, this is
shim. Theshimprogram allows non-Microsoft operating systems to load the second stage boot loader from the EFI system partition.-
shimuses a Red Hat certificate to verify the second stage boot loader (grub) or Red Hat Unified Kernel Image (UKI). -
gruborUKIunpacks, verifies, and executes Linux kernel and initramfs, and the kernel command line. This process ensures that the Linux kernel is loaded in a trusted and secured environment.
-
Initramfs: In initramfs, vTPM information automatically unlocks the encrypted root partition in case of full disk encryption technology.
-
When the root volume becomes available,
initramfstransfers the execution flow there.
-
When the root volume becomes available,
- Attestation: The VM tenant gets access to the system and can perform a remote attestation to ensure that the accessed VM is an untampered Confidential Virtual Machine (CVM). Attestation is performed based on information from the Intel processor and vTPM. This process confirms the authenticity and reliability of the initial CPU and memory state of the RHEL instance and Intel processor.
- TEE: This process creates a Trusted Execution Environment (TEE) to ensure that booting of the VM is in a trusted and secured environment.
6.2. Configuring a RHEL instance on Google Cloud with Intel TDX Copier lienLien copié sur presse-papiers!
Intel TDX is a hardware based trusted execution environment (TEE). This confidential computing technology provides isolation and integrity to virtual machines.
Prerequisites
-
You have installed the
opensshandopenssh-clientspackages. -
You have installed the
google-cloud-cliutility. For instructions, see Installing gcloud CLI on RHEL. - You have launched the instance only from a supported Google Cloud instance type. For details, see Supported Google Cloud instance types for TDX.
Procedure
Log in to your Google Cloud account by using the
google-cloud-cliutility:gcloud auth login
$ gcloud auth loginCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a new project:
gcloud projects create <example_tdx_project> --name=”RHEL TDX Project”
$ gcloud projects create <example_tdx_project> --name=”RHEL TDX Project”Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the project by setting the
google-cloud-cliutility property:gcloud config set project <example_tdx_project>
$ gcloud config set project <example_tdx_project>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a RHEL compute instance:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Open ports on the RHEL instance:
gcloud compute firewall-rules create allow-ssh \ --allow tcp:22 \ --source-ranges 0.0.0.0/0 \ --target-tags ssh
$ gcloud compute firewall-rules create allow-ssh \ --allow tcp:22 \ --source-ranges 0.0.0.0/0 \ --target-tags sshCopy to Clipboard Copied! Toggle word wrap Toggle overflow Connect to the RHEL Google Cloud instance.
Optional: Create a new key pair:
gcloud compute ssh <cloud-user>@<example-rhel-9-tdx-instance>
$ gcloud compute ssh <cloud-user>@<example-rhel-9-tdx-instance>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Connect to the RHEL instance by using your key pair:
ssh -i <private key> <cloud-user>@<instance ip>
$ ssh -i <private key> <cloud-user>@<instance ip>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Check the VM configuration of the RHEL instance:
gcloud compute instances describe <example-rhel-9-tdx-instance> --format="get(metadata)"
$ gcloud compute instances describe <example-rhel-9-tdx-instance> --format="get(metadata)"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check kernel logs to verify the status of the TDX feature:
sudo dmesg | grep -i tdx
$ sudo dmesg | grep -i tdxCopy to Clipboard Copied! Toggle word wrap Toggle overflow [ 0.000000] tdx: Guest detected [ 1.334504] process: using TDX aware idle routine [ 1.413419] Memory Encryption Features active: Intel TDX [ 3.606910] systemd[1]: Detected confidential virtualization tdx. [ 10.680475] systemd[1]: Detected confidential virtualization tdx.
[ 0.000000] tdx: Guest detected [ 1.334504] process: using TDX aware idle routine [ 1.413419] Memory Encryption Features active: Intel TDX [ 3.606910] systemd[1]: Detected confidential virtualization tdx. [ 10.680475] systemd[1]: Detected confidential virtualization tdx.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the CPU flags of the VM:
grep -E 'tdx_guest' /proc/cpuinfo
$ grep -E 'tdx_guest' /proc/cpuinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow flags : ...`tdx_guest`...
flags : ...`tdx_guest`...Copy to Clipboard Copied! Toggle word wrap Toggle overflow