4fd2a6297f
- Why I did it Add Secure Boot support to SONiC OS. Secure Boot (SB) is a verification mechanism for ensuring that code launched by a computer's UEFI firmware is trusted. It is designed to protect a system against malicious code being loaded and executed early in the boot process before the operating system has been loaded. - How I did it Added a signing process to sign the following components: shim, grub, Linux kernel, and kernel modules when doing the build, and when feature is enabled in build time according to the HLD explanations (the feature is disabled by default). - How to verify it There are self-verifications of each boot component when building the image, in addition, there is an existing end-to-end test in sonic-mgmt repo that checks that the boot succeeds when loading a secure system (details below). How to build a sonic image with secure boot feature: (more description in HLD) Required to use the following build flags from rules/config: SECURE_UPGRADE_MODE="dev" SECURE_UPGRADE_DEV_SIGNING_KEY="/path/to/private/key.pem" SECURE_UPGRADE_DEV_SIGNING_CERT="/path/to/cert/key.pem" After setting those flags should build the sonic-buildimage. Before installing the image, should prepared the setup (switch device) with the follow: check that the device support UEFI stored pub keys in UEFI DB enabled Secure Boot flag in UEFI How to run a test that verify the Secure Boot flow: The existing test "test_upgrade_path" under "sonic-mgmt/tests/upgrade_path/test_upgrade_path", is enough to validate proper boot You need to specify the following arguments: Base_image_list your_secure_image Taget_image_list your_second_secure_image Upgrade_type cold And run the test, basically the test will install the base image given in the parameter and then upgrade to target image by doing cold reboot and validates all the services are up and working correctly Co-authored-by: davidpil2002 <91657985+davidpil2002@users.noreply.github.com> |
||
---|---|---|
.. | ||
per_namespace | ||
share_image | ||
arp_update_vars.j2 | ||
backend_acl.j2 | ||
buffers_config.j2 | ||
build_docker_cache.j2 | ||
cbf_config.j2 | ||
config-chassisdb.service.j2 | ||
config-setup.service.j2 | ||
database.service.j2 | ||
dhcp_relay.service.j2 | ||
docker_image_ctl.j2 | ||
dockerd_regex.json | ||
eventd.service.j2 | ||
events_info.json | ||
iccpd.service.j2 | ||
init_cfg.json.j2 | ||
kernel_regex.json | ||
kube_cni.10-flannel.conflist | ||
lldp.service.j2 | ||
lldp.timer.j2 | ||
manifest.json.j2 | ||
mgmt-framework.service.j2 | ||
mgmt-framework.timer | ||
monit_regex.json | ||
mux.service.j2 | ||
nat.service.j2 | ||
organization_extensions.sh | ||
p4rt.service.j2 | ||
packages.json.j2 | ||
pde.service.j2 | ||
pmon.service.j2 | ||
pmon.timer | ||
qos_config.j2 | ||
radv.service.j2 | ||
restapi.service.j2 | ||
rsyslog_plugin.conf.j2 | ||
seu_regex.json | ||
sflow.service.j2 | ||
snmp.service.j2 | ||
snmp.timer | ||
sonic_debian_extension.j2 | ||
sonic_version.yml.j2 | ||
sonic-delayed.target | ||
sonic.target | ||
sshd_regex.json | ||
swss_vars.j2 | ||
syncd_regex.json | ||
systemd_regex.json | ||
tacacs-config.service | ||
tacacs-config.timer | ||
telemetry.service.j2 | ||
telemetry.timer | ||
updategraph.service.j2 |