Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kola: Add tests for encrypted root disks with TPM PCR binding #521

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

pothos
Copy link
Member

@pothos pothos commented Apr 10, 2024

As documented in flatcar/flatcar-website#317 we can use PCR binding in Flatcar with some limitations and workarounds. I think we should be able to get rid of the first boot PCR difference by handling the first-boot flag detection in userspace and if we can guarantee that the outcome of setting the first boot or not is the same, i.e., we would have to always measure the effective Ignition config. For the rebinding on update the best bet we have is to create a Flatcar variant with sd-boot for signed PCR policies. Anyway, these are future topics and it's already good that we can make some encryption setups work.

How to use

Testing done

Tested both new tests with the image from flatcar/scripts#1861

@pothos pothos force-pushed the kai/pcr-bind branch 6 times, most recently from 907ca74 to 0ae7f16 Compare April 10, 2024 09:13
@pothos pothos requested a review from a team April 10, 2024 09:13
As documented in flatcar/flatcar-website#317
we can use PCR binding in Flatcar with some limitations and workarounds.
I think we should be able to get rid of the first boot PCR difference
by handling the first-boot flag detection in userspace and if we can
guarantee that the outcome of setting the first boot or not is the same,
i.e., we would have to always measure the effective Ignition config.
For the rebinding on update the best bet we have is to create a Flatcar
variant with sd-boot for signed PCR policies. Anyway, these are future
topics and it's already good that we can make some encryption setups
work.
// Note: Keep the two below configs in sync with those
// documented in the Flatcar TPM docs.
// Ideally the reboot wouldn't be needed (or done in the initrd?)
IgnitionConfigRootCryptenrollPcrNoUpdate = conf.Butane(`---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off-topic: would be a separate bigger PR: I think it would be nice at some time to have the ignition/butane yaml/jsons in a separate folder/file for each test, to be able to better track changes in the code vs changes in the metadata.

kola/tests/misc/tpm.go Outdated Show resolved Hide resolved
kola/tests/misc/tpm.go Outdated Show resolved Hide resolved
@pothos pothos merged commit a262f21 into flatcar-master Apr 11, 2024
3 checks passed
@pothos pothos deleted the kai/pcr-bind branch April 11, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants