summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLans Zhang <jia.zhang@windriver.com>2017-07-13 14:06:28 +0800
committerLans Zhang <jia.zhang@windriver.com>2017-07-13 15:28:43 +0800
commite203bcf9a126e6e52556edbb0773b541607ecfda (patch)
treeaa46768bc58027b69df5bb8b98a2f6886ff07c35
parenta93ddfe82d7c2f8383fe51018f6e6ece72094186 (diff)
downloadmeta-secure-core-e203bcf9a126e6e52556edbb0773b541607ecfda.tar.gz
meta-efi-secure-boot/README.md: update
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
-rw-r--r--meta-efi-secure-boot/README.md296
1 files changed, 162 insertions, 134 deletions
diff --git a/meta-efi-secure-boot/README.md b/meta-efi-secure-boot/README.md
index 12a0c3d..50f78ff 100644
--- a/meta-efi-secure-boot/README.md
+++ b/meta-efi-secure-boot/README.md
@@ -1,36 +1,35 @@
1### EFI secure boot feature 1### Overview
2This feature consists of two widely used secure boot technologies: UEFI Secure 2This layer consists of two widely used secure boot technologies: UEFI Secure
3Boot and MOK Secure Boot. 3Boot and MOK (Machine Owner Key) Secure Boot.
4 4
5- UEFI Secure Boot is the industry standard defined in the UEFI spec, allowing the 5- UEFI Secure Boot is the industry standard defined in the UEFI spec, allowing
6images loaded by UEFI BIOS to be verified with the certificates corresponding to 6the images loaded by UEFI firmware to be verified with the certificates
7the trusted keys. 7corresponding to the trusted keys.
8- MOK (Machine Owner Key) Secure Boot is based on UEFI Secure Boot, adding 8- MOK Secure Boot is based on UEFI Secure Boot, adding the shim bootloader to
9the shim bootloader to chainloader the next stage bootloader with the integrity 9chainloader the next stage bootloader with the integrity check using the
10check using the shim-managed certificates corresponding to another set of 10shim-managed certificates corresponding to another set of trusted keys, which
11trusted keys which may be different than the trusted keys used by UEFI Secure 11may be different than the trusted keys used by UEFI Secure Boot.
12Boot. 12
13 13In addition, this layer introduces the SELoader as the second-stage bootloader
14In addition, this feature introduces the SELoader as the second-stage bootloader
15and eventually chainliader to the third-stage bootloader "grub". With the 14and eventually chainliader to the third-stage bootloader "grub". With the
16extension provided by SELoader, grub configuration files, kernel (even without 15extension provided by SELoader, grub configuration files, kernel (even without
17EFI stub support) and initrd can be authenticated. This capability is not 16EFI stub support) and initrd can be authenticated. This capability is not
18available in the shim bootloader. 17available in the shim bootloader.
19 18
20Grub bootloader is enhanced to support lockdown mode. In this mode, the 19Grub bootloader is also enhanced to support lockdown mode. In this mode, the
21edit, rescue and command line are protected in order to prevent from 20edit, rescue and command line are protected in order to prevent from
22tampering the kernel commandline or loading an unsigned boot component. Hence, 21tampering the kernel command line or loading an unsigned boot component. Hence,
23this lockdown protection can effectively defeat the attempts to disable the 22this lockdown protection can effectively defeat the attempts to disable the
24kernel security mechanisms. The flexibility is also provided if the user 23kernel security mechanisms, e.g, globally disable SELinux or IMA. The
25authentication is enabled. The user authenticated by a password check can enter 24flexibility is also provided with the user authentication in grub. The user
26into edit and command line. 25authenticated by a password check can enter into edit and command line.
27 26
28Therefore, using UEFI Secure Boot, SELoader, and grub lockdown together, the 27Therefore, using UEFI Secure Boot, shim, SELoader, and grub lockdown together,
29boot process is completely trustworthy. 28the boot process is completely trustworthy.
30 29
31A complete boot flow with this feature is: 30A complete boot flow looks like as following:
32 31
33- UEFI BIOS boot manager (UEFI Secure Boot enabled) -> 32- UEFI firmware boot manager (UEFI Secure Boot enabled) ->
34 - shim (verified by a DB certificate) -> 33 - shim (verified by a DB certificate) ->
35 - SELoader (verified by a shim-managed certificate) -> 34 - SELoader (verified by a shim-managed certificate) ->
36 - grub (verified by a shim-managed certificate) -> 35 - grub (verified by a shim-managed certificate) ->
@@ -38,38 +37,39 @@ A complete boot flow with this feature is:
38 - kernel (verified by a shim-managed certificate) 37 - kernel (verified by a shim-managed certificate)
39 - initramfs (verified by a shim-managed certificate) 38 - initramfs (verified by a shim-managed certificate)
40 39
41### Quick start for the first boot 40### Quick Start For The First Boot
42- Deploy the rootfs 41- Deploy the rootfs
43 42
44- Boot up the target board 43- Power up the system
45 44
46- Enter to BIOS setup and remove the enrolled certificates 45- Enter to BIOS setup and remove the enrolled certificates
47 * It is recommended to still turn on UEFI Secure Boot option if allowed. 46 * It is recommended to still turn on UEFI Secure Boot option if allowed.
48 47
49- Exit BIOS setup and automatically reboot 48- Exit BIOS setup
50 49
51- Manually launch a reboot via ctrl + alt + del again 50- Manually launch a reboot immediately via Ctrl + Alt + Del
52 * Otherwise, a misleading error message about the verification failure 51 * Otherwise, a misleading error message about the verification failure
53 will be displayed. 52 will be displayed.
54 53
55- Automatically boot to the boot option "Automatic Certificate Provision" in 54- Automatically boot to the boot option "Automatic Certificate Provision" in
56 grub boot menu. 55 grub boot menu.
57 56
58- (Optional) Enter into BIOS setup to turn on UEFI Secure Boot option 57- (Optional) Enter to BIOS setup to turn on UEFI Secure Boot option and then
58 exit BIOS setup
59 59
60- Boot to the system with the protection provided by UEFI and MOK Secure Boot 60- Boot to the system with the protection provided by UEFI and MOK Secure Boot
61 61
62### Key Management 62### Key Management
63Refer to meta-signing-key/README.md for the initial cognition about key 63Refer to meta-signing-key/README.md for the initial cognition about key
64management for UEFI Secure Boot. 64management.
65 65
66Note that the sample key and user key are the concepts in the key signing 66Note that the sample key and user key are the concepts in the key signing
67model according to the ownership and secrecy. In UEFI Secure Boot, a policy 67model according to the ownership and secrecy. In UEFI Secure Boot, a policy
68object such as PK, KEK, DB and DBX is mapped to a key managed by the key 68object such as PK, KEK, DB and DBX is always mapped to a key useed by the
69signing model. 69key signing model.
70 70
71#### Sample Keys 71#### Sample Keys
72This feature, by default, use **the sample keys** to sign and verify images for 72This layer, by default, use **the sample keys** to sign and verify images for
73the purpose of development and demonstration. **Please ensure you know what your 73the purpose of development and demonstration. **Please ensure you know what your
74risk is to use the sample keys in your product, because they are completely 74risk is to use the sample keys in your product, because they are completely
75public.** 75public.**
@@ -78,14 +78,14 @@ The sample keys used for UEFI Secure Boot are centrally placed under
78meta-signing-key/files/uefi_sb_keys/. 78meta-signing-key/files/uefi_sb_keys/.
79 79
80- PK.crt 80- PK.crt
81 The X509 certificate enrolled to UEFI BIOS, used to update/delete PK/KEK. 81 The X509 certificate enrolled to UEFI firmware, used to update/delete PK/KEK.
82 82
83- PK.key 83- PK.key
84 The private key corresponding to PK.crt, used to sign the EFI signature 84 The private key corresponding to PK.crt, used to sign the EFI signature
85 list for PK/KEK enrollment. 85 list for PK/KEK enrollment.
86 86
87- KEK.crt 87- KEK.crt
88 The X509 certificate enrolled to UEFI BIOS, used to update/delete 88 The X509 certificate enrolled to UEFI firmware, used to update/delete
89 DB/DBX. 89 DB/DBX.
90 90
91- KEK.key 91- KEK.key
@@ -93,17 +93,17 @@ meta-signing-key/files/uefi_sb_keys/.
93 list for DB/DBX enrollment. 93 list for DB/DBX enrollment.
94 94
95- DB.crt 95- DB.crt
96 The X509 certificate enrolled to UEFI BIOS, used to verify the images 96 The X509 certificate enrolled to UEFI firmware, used to verify the images
97 directly loaded by UEFI BIOS. 97 directly loaded by UEFI firmware.
98 98
99- DB.key 99- DB.key
100 The private key corresponding to DB.crt, used to sign the images directly 100 The private key corresponding to DB.crt, used to sign the images directly
101 loaded by UEFI BIOS. 101 loaded by UEFI firmware.
102 102
103- DBX 103- DBX
104 This directory contains any number of X509 certificate enrolled to UEFI 104 This directory contains any number of X509 certificate enrolled to UEFI
105 BIOS, used to blacklist the revoked certificates. The revoked certificates 105 firmware, used to blacklist the revoked certificates. Note the revoked
106 must be PEM-formatted. 106 certificates must be PEM-formatted.
107 107
108The sample keys used for MOK Secure Boot are centrally placed under 108The sample keys used for MOK Secure Boot are centrally placed under
109`meta-signing-key/files/mok_sb_keys/`. 109`meta-signing-key/files/mok_sb_keys/`.
@@ -117,13 +117,13 @@ The sample keys used for MOK Secure Boot are centrally placed under
117 either directly or indirectly loaded by shim. 117 either directly or indirectly loaded by shim.
118 118
119- vendor_cert.crt 119- vendor_cert.crt
120 Used in the same way as shim_cert.crt. In addition, vendor certificate 120 Act as the same way as shim_cert.crt. In addition, vendor certificate
121 is the switch to enable shim verification protocol, which facilitates 121 is the switch to enable MOK Verify Protocol, which facilitates the
122 the verification for the SELoader. 122 verification for the SELoader and MOK Manager.
123 123
124- vendor_cert.key 124- vendor_cert.key
125 The private key corresponding to vendor_cert.crt, Same fuction as 125 The private key corresponding to vendor_cert.crt, acting as the same fuction
126 shim_cert.key. 126 as shim_cert.key.
127 127
128- vendor_dbx 128- vendor_dbx
129 This directory contains any number of X509 certificate embedded in shim, 129 This directory contains any number of X509 certificate embedded in shim,
@@ -135,139 +135,160 @@ the keys owned by the end user.
135 135
136#### Automatic Certificate Provision 136#### Automatic Certificate Provision
137The certificate provision is required to enable UEFI Secure Boot. By default, 137The certificate provision is required to enable UEFI Secure Boot. By default,
138the target may be provisioned with the default certificates enrolled during the 138the system may be already provisioned with default certificates enrolled during
139manufacture. 139the manufacture.
140 140
141In order to use the bootloader and kernel signed by the sample or self-owned 141In order to use the bootloader and kernel signed by the sample or self-owned
142key to boot up the system, this feature provides a process of autmatic 142key to boot up the system, this layer provides a process of automatic
143certificate provison for the convenience. Refer to the instructions listed in 143certificate provison for the convenience. The detailed descriptions are
144the section "Work Flow For The First Boot". The detailed descriptions are
145given below. 144given below.
146 145
147##### Remove the enrolled certificates in BIOS setup 146##### Remove the enrolled certificates in BIOS setup
148The LockDown.efi application is used to run the provision. However, 147The EFI/BOOT/LockDown.efi is used to run the automatic certificate provision.
149LockDown.efi cannot be launched if UEFI Secure Boot is already enabled. In 148However, LockDown.efi cannot be launched if UEFI Secure Boot is already
150addition, the enrolled certificates may be not the ones the user hopes to use. 149enabled. In addition, the enrolled certificates may be not the ones the user
150hopes to use.
151 151
152The provisioned certificates can be removed in BIOS setup. The detailed steps 152The provisioned certificates can be removed through BIOS setup. The detailed
153may vary between the boards. Refer to BIOS manual for the details. 153steps may vary between the systems. Refer to the corresponding BIOS manual for
154the instructions.
154 155
155##### Launch the automatic provision 156##### Launch the automatic certificate provision
156Lockdown.efi will automatically provision UEFI Secure Boot after removing the 157The Lockdown.efi will automatically provision UEFI Secure Boot after removing
157the provisioned certificates in BIOS setup. More specifically, the PK, KEK, 158the enrolled certificates in BIOS setup. More specifically, the new PK, KEK, DB
158DB and DBX (if any) will be enrolled and begin to take affect after a reboot. 159and DBX (if any) will be enrolled and begin to take affect after a reboot.
160
161The new PK, KEK, DB and DBX (if any) were built into LockDown.efi during the
162build.
159 163
160##### Turn on UEFI Secure Boot option 164##### Turn on UEFI Secure Boot option
161If UEFI Secure Boot option is turned off, the user has to enter into BIOS setup 165If UEFI Secure Boot option was turned off, the user has to enter to BIOS setup
162after provision to manually turn on the option. 166again after the automatic certificate provision in order to manually turn on
167this option.
163 168
164If the option is already enabled when removing the enrolled certificates in 169If this option was not turned off when removing the enrolled certificates in
165BIOS setup, this step can be ignored. 170BIOS setup, this step is skippable.
166 171
167##### Re-trigger automatic provision 172##### Re-trigger automatic certificate provision
168By default, the "Automatic Certificate Provision" option is hidden in boot 173The boot option "Automatic Certificate Provision" is hidden in grub boot menu
169menu for the first boot. If the user would like to clear the certificates 174for the first boot. If the user would like to clear the certificates
170provisioned by the "Automatic Certificate Provision" option in BIOS setup, this 175provisioned by the option "Automatic Certificate Provision" in BIOS setup, this
171hidden boot option will be shown in boot menu, allowing to re-trigger it when 176hidden boot option will be shown, allowing to re-trigger it if necessary.
172necessary.
173 177
174### Signing 178### Signing
175By default, the build system uses DB.key to sign shim, and uses vendor_cert.key 179By default, the build system uses DB.key to sign shim, and uses vendor_cert.key
176to sign SELoader, grub, grub configuration file, kernel and initramfs image 180to sign SELoader, grub, grub configuration file, kernel and initramfs image
177during the build. 181during the build.
178 182
179### Verficiation 183### Verification
180 184
181#### UEFI Secure Boot Verification 185#### UEFI firmware verification
182UEFI BIOS will validate the integrity of shim bootloader with a certificate in 186UEFI firmware will validate the integrity of shim bootloader with a certificate
183DB before running it. 187in DB before launching it.
184 188
185#### Bootloader Verification 189#### Bootloader verification
186When the shim loads SELoader and SELoader loads grub, if both UEFI Secure Boot 190This layer employs 3-level bootloader for secure boot process. Each former
187and MOK Secure Boot are already enabled, the upper bootloader uses a list of 191bootloader must check the integrity e.g, when the
188certificate to check the integrity of lower bootloader. 192SELoader loads grub, if both UEFI Secure Boot and MOK Secure Boot are already
193enabled, the former bootloader uses a list of certificate to check the
194integrity of the later bootloader.
189 195
190- Blacklist check 196- Blacklist check
191 If the lower bootloader is signed with a key corresponding to a certificate 197 If the later bootloader is signed with a key corresponding to a certificate
192 within any of a policy object below, the boot failure will occur. 198 within any of a policy object below, the later bootloader is denied to
199 launch immediately, without the necessity to go through the following
200 processes.
193 201
194 * Vendor DBX 202 * Vendor DBX
195 * DBX 203 * DBX
196 * MokListX (MOK certificate blacklist) 204 * MokListX (the blacklist of MOK certificate)
197 205
198- Whitelist check 206- Whitelist check
199 If the lower bootloader is signed with a key corresponding to a certificate 207 If the later bootloader is signed with a key corresponding to a certificate
200 within any of a policy object below, the boot success will occur. 208 within any of a policy object below, the later bootloader is granted to
209 launch.
201 210
202 * DB 211 * DB
203 * MokList (MOK certificate whitelist) 212 * MokList (the whitelist of MOK certificate)
204 * Shim certificate (only for PE image) 213 * Shim certificate (only for PE image)
205 * Vendor certificate 214 * Vendor certificate
206 215
207If the lower bootloader is not signed or signed by a key not corresponding to 216If the later bootloader is not signed or signed by a key not corresponding to
208any policy objects mentioned above, the boot failure will occur. 217any policy objects mentioned above, the later bootloader is denied to launch.
209 218
210The benefit of these behaviors allow the end user to regulate the secure boot 219The benefit of showing this checklist allows the end user to use an
211even without the ownership of DB on Microsoft certificated hardware. 220appropriater way to manage the key and boot up the system, even without the
221ownership of a signing key, such as the DB key widely used on Microsoft
222certificated hardware.
212 223
213##### SELoader Verification 224##### SELoader verification
214The SELoader is designed to authenticate the non-PE files, such as grub.cfg, 225The SELoader is designed to authenticate the non-PE files, such as grub.cfg,
215kernel (without EFI stub support) and initrd, which cannot be verified by 226kernel (without EFI stub support) and initramfs, which cannot be verified by
216the verification protocol registered by the shim loader. 227the MOK Verify Protocol registered by the shim loader.
217 228
218In order to conveniently authenticate the PE file with gBS->LoadImage() 229In order to conveniently authenticate the PE file with gBS->LoadImage()
219and gBS->StartImage(), the SELoader hooks EFI Security2 Architectural 230and gBS->StartImage(), the SELoader hooks EFI Security2 Architectural
220Protocol and employs verification protocol provided by the shim loader to 231Protocol and employs MOK Verify Protocol to verify the PE file. If only
221verify the PE file. If only UEFI Secure Boot is enabled, the SELoader just 232UEFI Secure Boot is configured and enabled, the SELoader just simplily calls
222simplily calls gBS->LoadImage() and gBS->StartImage() to allow UEFI BIOS 233gBS->LoadImage() and gBS->StartImage() to allow UEFI firmware to verify the
223to verify the PE file. 234PE file.
224 235
225The SELoader publishes MOK2 verification protocol which provides a flexible 236The SELoader publishes MOK2 Verify Protocol which provides a flexible interface
226interface to allow the bootloader to verify the file, file buffer or 237to allow the bootloader to verify the file, file buffer or memory buffer
227memory buffer without knowing the file format. 238without knowing the file format. This design allows the non-PE files to be
239verified by the same certificate used for authenticating PE files.
228 240
229In order to establish the chain of trust, the SELoader is required to be 241In order to establish the chain of trust, the SELoader is required to be
230signed by a private key corresponding to a DB certificate, the shim 242signed by a private key corresponding to a DB certificate, the shim
231certificate, the vendor certificate or a MOK certificate. The specific 243certificate, the vendor certificate or a MOK certificate mentioned above.
232key is determined by the secure boot scheme you will use. 244The specific key used is determined by the secure boot scheme you will use.
233 245
234See more details about the SELoader in its README file. 246See more details about README in SELoader.
235 247
236#### Grub Configuration File Verification 248#### Grub configuration file verification
237Grub can call the MOK2 verification protocol registered by the SELoader 249Grub is enhanced to have the capability of calling MOK2 Verify Protocol
238to validate the integrity of grub configuration file before parsing it. 250registered by the SELoader to validate the integrity of grub configuration
251file before parsing it.
239 252
240This protection prevents from tampering the grub configuration file from 253This protection prevents from tampering the grub configuration file from
241disabling certains kernel security mechanism such as selinux, IMA and so on. 254globally disabling certains kernel security mechanism such as SELinux and IMA
255which are activated in kernel command line.
242 256
243#### Kernel Verification 257#### Kernel verification
244When SELoader loads the kernel image with the linux command, if both UEFI 258When grub loads the kernel image with the command "linux", if both UEFI
245Secure Boot and MOK Secure Boot are already enabled, grub will call the 259Secure Boot and MOK Secure Boot are already enabled, grub will call the
246verification protocol installed by SELoader to validate the kernel image. 260MOK2 Verify Protocol installed by SELoader to validate the kernel image.
247 261
248Alternately, if grub loads the kernel image with the chainloader command, 262It is recommended to avoid using the command "chainloader" to load kernel
249if both UEFI Secure Boot and MOK Secure Boot are already enabled, grub will 263image. The build system also avoids signing the kernel with EFI-stub
250call the verification protocol installed by shim to validate the kernel image. 264bootloader.
251 265
252By default, the kernel image is signed by vendor certificate and then signed 266By default, the kernel image is signed by vendor certificate and generate
253again to generate the .p7b signature file. 267the .p7b signature file.
254 268
255#### Initramfs Verification 269#### Initramfs verification
256When SELoader loads the kernel image with the initrd command, if both UEFI 270When grub loads the kernel image with the command "initrd", if both UEFI
257Secure Boot and MOK Secure Boot are already enabled, grub will call the 271Secure Boot and MOK Secure Boot are already enabled, grub will call the
258verification protocol installed by SELoader to validate the initramfs image. 272MOK2 Verify Protocol installed by SELoader to validate the initramfs image.
273
274By default, the initramfs image is signed by vendor certificate and generate
275the .p7b signature file.
259 276
260#### Verification Failure 277#### Verification failure
261Either situation will cause a failure of verification. 278Either situation will cause a failure of verification.
262- A boot component is not signed. 279- A boot component is not signed.
263- A boot component is signed by a key which doesn't correspond to any 280- A boot component is signed by a key which doesn't correspond to any
264 certificate in whitelists such as DB and shim-managed certificates. 281 certificate in whitelists such as DB and shim-managed certificates as
282 mentioned above.
265- A boot component is signed by a key which corresponds to a certificate in 283- A boot component is signed by a key which corresponds to a certificate in
266 blacklist such as DBX and shim-managed certificates in MOKX. 284 blacklist such as DBX and shim-managed certificates in blacklist as
285 mentioned above.
267 286
268Each boot component may have different verification failure phenomenon. 287Each boot component may have different verification failure phenomenon.
269- If SELoader fails signature check, UEFI BIOS boot manager will print an error 288- If shim fails signature check, UEFI firmware boot manager will print an
270 message about the image authentication failure. 289 error message about the image authentication failure.
290- If SELoader fails signature check, shim will print an error message about
291 the security violation.
271- If grub fails signature check, an image authentication failure message is 292- If grub fails signature check, an image authentication failure message is
272 printed and the system hangs. 293 printed and the system hangs.
273- If a grub configuration file fails the signature check, an authentication 294- If a grub configuration file fails the signature check, an authentication
@@ -276,11 +297,11 @@ Each boot component may have different verification failure phenomenon.
276- If initrd fails signature check, grub returns back to the boot menu. 297- If initrd fails signature check, grub returns back to the boot menu.
277 298
278### MOK Secure Boot and the shim bootloader 299### MOK Secure Boot and the shim bootloader
279MOK (Machine Owner Key) Secure Boot is based on UEFI Secure Boot, adding 300MOK Secure Boot is based on UEFI Secure Boot, adding the shim bootloader to
280the shim bootloader to chainloader the second-stage bootloader 301chainloader the second-stage bootloader "SELoader" and eventually chainliader
281"SELoader" and eventually chainliader to the third-stage bootloader "grub". 302to the third-stage bootloader "grub".
282 303
283[ Quoting: https://github.com/rhinstaller/shim ] 304[ Quoting: https://github.com/rhboot/shim ]
284shim is a trivial EFI application that, when run, attempts to open and 305shim is a trivial EFI application that, when run, attempts to open and
285execute another application. It will initially attempt to do this via the 306execute another application. It will initially attempt to do this via the
286standard EFI LoadImage() and StartImage() calls. If these fail (because secure 307standard EFI LoadImage() and StartImage() calls. If these fail (because secure
@@ -306,13 +327,13 @@ by Microsoft. Microsoft provides the signing service (not free), but only
306accept shim bootloader for Linux world. Refer to [Microsoft's signing policy](http://blogs.msdn.com/b/windows_hardware_certification/archive/2013/12/03/microsoft-uefi-ca-signing-policy-updates.aspx). 327accept shim bootloader for Linux world. Refer to [Microsoft's signing policy](http://blogs.msdn.com/b/windows_hardware_certification/archive/2013/12/03/microsoft-uefi-ca-signing-policy-updates.aspx).
307 328
308It is allowed to remove all default certificates and use the self-owned keys to 329It is allowed to remove all default certificates and use the self-owned keys to
309provision UEFI Secure Boot, but this is not practical for ODM/OEM devices 330provision UEFI firmware, but this is not practical for ODM/OEM devices during
310during the manufacture phrase. See the section "Out-of-box Experience". 331the manufacture phrase. See the section "Out-of-box Experience".
311 332
312For a good user experience, shim + SELoader + grub is an excellent combination 333For a good user experience, shim + SELoader + grub is an excellent combination
313to handle Microsoft certificated hardware. With this model, SELoader and grub 334to handle Microsoft certificated hardware. With this model, SELoader and grub
314are signed by a shim-managed certificate without being subject to the limit from 335are signed by a shim-managed certificate without being subject to the limit
315Microsoft's signing policy, and the manual provision is thus unnecessary. 336from Microsoft's signing policy, and the manual provision is thus unnecessary.
316 337
317#### mokutil and MOK Manager 338#### mokutil and MOK Manager
318mokutil is a tool to import or delete the machines owner keys stored in the 339mokutil is a tool to import or delete the machines owner keys stored in the
@@ -423,23 +444,23 @@ options to change the operation target from MOK to the following options.
423--revoke-import 444--revoke-import
424--revoke-delete 445--revoke-delete
425 446
426##### Handle MOK Secure Boot Failure with MOK Manager 447##### Handle MOK Secure Boot failure with MOK Manager
427If either grub or SELoader is not signed or signed with an unauthorized 448If either grub or SELoader is not signed or signed with an unauthorized
428certificate, the shim will prompt the end user a UI called MOK manager to 449certificate, the shim will prompt the end user a UI called MOK Manager to
429guide the user to enroll the certificate or hash of the image. 450guide the user to enroll the certificate or hash of the image.
430 451
431The policy of the selection between digest and certificate for next step is 452The policy of the selection between digest and certificate for next step is
432decided by whether the unauthorized grub or SELoader is signed or not. 453decided by whether the unauthorized grub or SELoader is signed or not.
433 454
434If the grub or SELoader is not signed at all, you have to always select 455If the grub or SELoader is not signed at all, you have to always select
435the calculation of the digest based on the file. Note that once grub or SELoader 456the calculation of the digest based on the file. Note that once grub or
436is updated and its digest is changed, you have to relaunch the MOK manager 457SELoader is updated and its digest is changed, you have to relaunch the MOK
437to enroll the new digests. 458Manager to enroll the new digests.
438 459
439If the grub or SELoader is signed by an unauthorized certificate, enrolling the 460If the grub or SELoader is signed by an unauthorized certificate, enrolling the
440signing certificate is the preferred way. Copy the certificate to the boot 461signing certificate is the preferred way. Copy the certificate to the boot
441drive and then select the certificate in MOK manager. Note that the 462drive and then select the certificate in MOK manager. Note that the
442certificate for the selection must be **DER formatted**. 463certificate for the selection must be **DER-formatted**.
443 464
444If doing so, the unauthorized grub or SELoader will be verified successfully 465If doing so, the unauthorized grub or SELoader will be verified successfully
445after exiting MOK Manager. 466after exiting MOK Manager.
@@ -458,6 +479,13 @@ Rescue mode is always disabled as long as UEFI Secure Boot is enabled.
458### Known Issues 479### Known Issues
459- The 32-bit MOK Secure Boot is not validated. In other words, loading 32-bit 480- The 32-bit MOK Secure Boot is not validated. In other words, loading 32-bit
460shim, MOK manager, grub and kernel is not supported. 481shim, MOK manager, grub and kernel is not supported.
482- grub module is not supported by SELoader for the integrity check.
461 483
462### Reference 484### Reference
463[OpenEmbedded layer for EFI secure boot features](https://github.com/jiazhang0/meta-efi-secure-boot) 485[shim - implement MOK Verify Protocol](https://github.com/rhboot/shim)
486
487[SELoader - implement MOK2 Verify Protocol](https://github.com/jiazhang0/SELoader)
488
489[grub - Mok2Verify patch](https://github.com/jiazhang0/meta-secure-core/blob/master/meta-efi-secure-boot/recipes-bsp/grub/grub-efi/mok2verify-support-to-verify-non-PE-file-with-PKCS-7.patch)
490
491[SecureCore - a reference implementation based on OpenEmbedded](https://github.com/jiazhang0/SecureCore)