gardenlinux / gardenlinux

Garden Linux - The best Linux for Gardener nodes!
https://gardenlinux.io
MIT License
158 stars 68 forks source link

Research Secureboot on MS Azure (stage0) #2287

Open pnpavlov opened 2 months ago

pnpavlov commented 2 months ago

Research and document in this issue how secureboot on GCP can be enabled.

mguertler commented 3 days ago

Overview

Azure Secure Boot and Trusted Boot features are summarized as Trusted Launch features. They include Secure Boot, TPMv2 support and Integrity Monitoring, similar to AWS and GCP. Trusted boot is supported for certain Operating Systems (see below) from the Azure Marketplace, but also as Azure Gallery images and VHDs.

Limitations

In Azure it is currently not possible to use Trusted Launch for non-supported Operating Systems, as it is possible with AWS and GCP using custom signed images. Only some Operating Systems like Debian, SUSE, RedHat, Ubuntu are supported with Trusted Launch features. The images of these OS's are signed using the Microsoft 3rd party CA certificates.

Furthermore only Generation 2 VMs are supported.

Custom signed kernel drivers and modules

From 08/22/2024 there is a preview feature "Secure Boot UEFI keys" available, that allows kernel drivers / modules to be signed with custom private keys. This feature allows to inject custom UEFI keys into the vTPM and thus allows checking the validity of kernel modules during boot time. However, this feature can't be used to enable secure boot for non-Micrsoft-signed OS's like GL, nor is this supported, neither it seems to work technically.

This feature has some limitations:

Decision options (draft)

  1. Leave GL secure boot / trusted boot disabled for GL Pro's:

    • no effort Con's:
    • inconsistent secure-boot support across hyperscalers
    • might be rejected by external stakeholders, like Gardener
  2. Ask Microsoft to provide support for custom signed GL images Pro's:

    • allows to enables secure boot / trusted boot
    • fits perfect to current build and testing schemes of GL
    • provides consistent secure boot / trusted boot support across hyperscalers
    • Might fulfill requirements of external stakeholders like Gardener Con's:
    • Likely a bigger / longer discussion, as it might result in a fundamental decision Microsoft internally; However, SAP is an important partner for Micrsoft
  3. Agree with Microsoft to sign GL images with Microsoft 3rd party CA certificates Pro's:

    • allows to enables secure boot / trusted boot
    • provides consistent secure boot / trusted boot support across hyperscalers
    • Might fulfill requirements of external stakeholders like Gardener Con's:
    • Requires deriving GL signing process just for Azure images
    • GL might require to undergo a formal certification process

Asks to Microsoft

  1. Are there any plans to support custom signed images for OS's to enable them for Azure Trusted Launch (e.g. secure boot), as this feature is already provided by GCP and AWS
  2. What are efforts to sign a new Linux OS with the Microsoft 3rd party CA certificates
  3. Are there any other options, that Microsoft can provide to enable Trusted Launch features for Garden Linux, at least for Azure environments that are used by SAP