You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/cca-bootsync/_index.md
+47-1Lines changed: 47 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,56 @@ prerequisites:
16
16
- A cloud-based instance or an AArch64 or x86_64 computer running Linux. For more information about using cloud-based instances, see the [Arm cloud service providers](/learning-paths/servers-and-cloud-computing/csp/) Learning Path.
17
17
- Completion of the [Run an application in a Realm using the Arm Confidential Compute Architecture (CCA)](/learning-paths/servers-and-cloud-computing/cca-container/) Learning Path
You'll use Arm CCA BootSync on an RME-enabled Armv9-A AEM Base FVP
35
+
to deliver UEFI variables and secrets to a Realm during early boot, then validate Secure Boot
36
+
and encrypted disk startup. First, you'll launch a Realm without injected data to observe
37
+
firmware attestation. Next, you'll provide variable data for BootSync to complete and verify that Secure Boot rejects the unsigned kernel. After signing the kernel, you'll verify that Secure Boot is active. Finally, you'll encrypt the Realm root file system, inject the file system decryption secret through
38
+
BootSync, and confirm that the disk unlocks during boot.
39
+
faqs:
40
+
- question: Do I need networking inside the Realm to deliver boot data?
41
+
answer: >-
42
+
No. BootSync operates before the guest operating system has networking and uses the Boot Injection protocol to provide early boot data.
43
+
- question: How do I know BootSync requested variable data?
44
+
answer: >-
45
+
In the User Context service log, you'll see `BIB Variable Data Requested`
46
+
and the expected `<RPV>_VAR.dat` file name. If the file is missing,
47
+
BootSync reports `BootSyncNotDone`, and the Realm boots without Secure
48
+
Boot enabled.
49
+
- question: What result should I expect when Secure Boot is configured but the kernel is unsigned?
50
+
answer: >-
51
+
The unsigned kernel is rejected. This confirms that UEFI Secure Boot is enforcing signature
52
+
verification.
53
+
- question: After I sign the kernel, how do I verify that Secure Boot is enabled?
54
+
answer: >-
55
+
The signed kernel boots successfully and the Secure Boot UEFI variable reports `1`. Check
56
+
that value to confirm the state.
57
+
- question: How do I confirm the encrypted root file system unlocks correctly?
58
+
answer: >-
59
+
After BootSync supplies the correct passphrase, the boot log reports
60
+
`LUKS partition unlocked, switching root`. Run `df -h` and verify that
61
+
`/dev/mapper/cryptroot` is mounted at `/`.
62
+
# END generated_summary_faq
63
+
19
64
author:
20
65
- Anton Antonov
21
66
- Pareena Verma
22
67
23
-
generate_summary_faq: true
68
+
generate_summary_faq: false
24
69
rerun_summary: false
25
70
rerun_faqs: false
26
71
@@ -72,3 +117,4 @@ weight: 1 # _index.md always has weight of 1 to order corr
72
117
layout: "learningpathall"# All files under learning paths have this same wrapper
73
118
learning_path_main_page: "yes"# This should be surfaced when looking for related content. Only set for _index.md of learning path content.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/cca-bootsync/flow.md
+20-17Lines changed: 20 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,10 @@ You'll configure and validate both failure and success cases:
19
19
20
20
You'll run the User Context service in a Docker container and launch CCA Realms on an Arm Fixed Virtual Platform (FVP) in a separate Docker container.
21
21
22
-
You'll use two terminals. In the first terminal, you'll run the User Context service. This service represents the Realm initiator and decides whether to release BootSync data. In the second terminal, you'll run the Arm CCA FVP and launch Realm virtual machines using `lkvm-bootsync`.
22
+
You'll use two terminals:
23
+
24
+
- In the User Context terminal, you'll run the User Context service. This service represents the Realm initiator and decides whether to release BootSync data.
25
+
- In the FVP terminal, you'll run the Arm CCA FVP and launch Realm virtual machines using `lkvm-bootsync`.
23
26
24
27
## Install dependencies
25
28
@@ -53,11 +56,11 @@ Add your user name to the Docker group so you can run Docker without `sudo`:
53
56
sudo usermod -aG docker $USER
54
57
newgrp docker
55
58
```
56
-
The group change applies to new shells; `newgrp docker` updates the current terminal.
59
+
The group change applies to new shells; `newgrp docker` updates the current shell.
57
60
58
61
## Start the User Context service
59
62
60
-
First, pull the Docker image with the pre-built User Context service. Then, run the container:
63
+
In the User Context terminal, pull the Docker image with the pre-built User Context service. Then, run the container:
The `cca-trustee` Docker network is important. It lets the FVP container resolve the User Context service by container name, `user-context`, when `lkvm-bootsync` later uses `--service-ip user-context`.
69
72
70
-
Now, within your running Docker container, start the User Context service using the `run-user-context-service.sh` script.
73
+
In the User Context terminal, start the User Context service inside the running container using the `run-user-context-service.sh` script.
71
74
The User Context service is part of the [EDK2](https://gitlab.arm.com/linux-arm/edk2-cca/-/tree/cca/4441_measured_boot_v1/ArmVirtPkg/ArmCcaBootSync/UserContext) project.
72
75
Created specifically as a proof of concept, it's intentionally small and not designed for production use.
73
76
@@ -83,7 +86,7 @@ You'll be asked for a passphrase for the Secure Boot signing certificates. Remem
83
86
84
87
## Validate BootSync failure without boot data
85
88
86
-
With the User Context service running in one terminal, open up a new terminal in which you'll run CCA Realms.
89
+
With the User Context service running in the User Context terminal, open the FVP terminal.
87
90
88
91
Pull the Docker image with the pre-built FVP and CCA reference software stack. Then, run the container connected to the same Docker network:
89
92
@@ -163,7 +166,7 @@ Stop the Realm:
163
166
poweroff
164
167
```
165
168
166
-
On the terminal with the User Context service, you can see that the Realm firmware requested a Variable Data file, but the file is missing:
169
+
In the User Context terminal, you can see that the Realm firmware requested a Variable Data file, but the file is missing:
167
170
168
171
```output
169
172
INFO: BIB Variable Data Requested
@@ -180,7 +183,7 @@ Next, you'll add the missing Boot Information Block data and repeat the launch.
180
183
181
184
## Pass UEFI variable data and validate unsigned kernel rejection
182
185
183
-
On the terminal with the User Context service, stop the service by pressing `Ctrl-C`.
186
+
In the User Context terminal, stop the service by pressing `Ctrl-C`.
184
187
185
188
The RPV and file names used here are details of this Learning Path's reference implementation. One User Context service can support multiple Realms by using the RPV as a file-name prefix. A Realm launched with `--realm-pv ARMCCA01` requests files that start with `ARMCCA01`. If the matching files are missing, BootSync can establish a session and complete attestation, but the User Context can't provide the requested boot information.
186
189
@@ -197,13 +200,13 @@ Create a Secret Data file with a test string that'll be shared with a Realm usin
In the User Context terminal, relaunch the User Context service:
201
204
202
205
```bash
203
206
./run-user-context-service.sh
204
207
```
205
208
206
-
On the terminal with FVP, relaunch the Realm with the same RPV:
209
+
In the FVP terminal, relaunch the Realm with the same RPV:
207
210
208
211
```bash
209
212
cd /cca
@@ -218,7 +221,7 @@ cd /cca
218
221
219
222
Keeping the same `--realm-pv ARMCCA01` is what links the Realm request to the files you created.
220
223
221
-
On the terminal with the User Context service, you can see that attestation succeeded and BootSync completed:
224
+
In the User Context terminal, you can see that attestation succeeded and BootSync completed:
222
225
223
226
```output
224
227
Info: Received FIN. Disconnecting.
@@ -247,7 +250,7 @@ Next, you'll launch a Realm with a signed kernel image.
247
250
248
251
## Sign the kernel and verify Secure Boot
249
252
250
-
On the terminal with FVP, use the `sign_guest_kernel.sh` script to sign the Realm Linux kernel with the Secure Boot certificate generated earlier by the User Context setup script. When prompted, enter the passphrase you used for the Secure Boot signing certificates:
253
+
In the FVP terminal, use the `sign_guest_kernel.sh` script to sign the Realm Linux kernel with the Secure Boot certificate generated earlier by the User Context setup script. When prompted, enter the passphrase you used for the Secure Boot signing certificates:
251
254
252
255
```bash { output_lines="2-3" }
253
256
sign_guest_kernel.sh
@@ -256,7 +259,7 @@ Enter PEM pass phrase:
256
259
Signing Unsigned original image
257
260
```
258
261
259
-
Relaunch the Realm. Use the same User Context service, service port, and RPV so the Realm receives the same Secure Boot variable data:
262
+
In the FVP terminal, relaunch the Realm. Use the same User Context service, service port, and RPV so the Realm receives the same Secure Boot variable data:
260
263
261
264
```bash
262
265
cd /cca
@@ -353,7 +356,7 @@ There are different ways to provide a Realm with access to encrypted partitions
353
356
354
357
{{% /notice %}}
355
358
356
-
On the terminal with the running FVP, use the `encrypt_rootfs.sh` script to encrypt the root partition in the Realm disk image and add an `initrd` image to the kernel parameters.
359
+
In the FVP terminal, use the `encrypt_rootfs.sh` script to encrypt the root partition in the Realm disk image and add an `initrd` image to the kernel parameters.
357
360
358
361
You'll be asked for a passphrase to encrypt the root partition. Use a memorable test passphrase and keep it available, because you'll later write the same value into `ARMCCA01_SEC.dat` for BootSync to release.
359
362
@@ -376,7 +379,7 @@ Enable Initrd image
376
379
377
380
### Validate failed disk unlock
378
381
379
-
Relaunch the Realm. At this point, `ARMCCA01_SEC.dat` still contains the test string from the previous Secure Boot step, not the disk encryption passphrase:
382
+
In the FVP terminal, relaunch the Realm. At this point, `ARMCCA01_SEC.dat` still contains the test string from the previous Secure Boot step, not the disk encryption passphrase:
380
383
381
384
```bash
382
385
cd /cca
@@ -431,7 +434,7 @@ The init script failed to unlock the encrypted partition because the Secret Data
431
434
432
435
Now, update the BootSync secret.
433
436
434
-
On the terminal with the User Context service, stop the service by pressing `Ctrl-C`.
437
+
In the User Context terminal, stop the service by pressing `Ctrl-C`.
435
438
436
439
Save the encryption passphrase into the Secret Data file. Use `echo -n` so the file contains only the passphrase and no trailing newline character:
0 commit comments