-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature / bootkit does not need keyset access #30
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smoser
changed the title
Feature/restore the api
Feature / bootkit does not need keyset access
May 4, 2023
This is still work in progress, but a lot further along. What is here:
The thing that is missing from the api and the 'bkcust' right now is the initrd "combining". Everything else is there. What is TODO:
Plan for it's use in machine:
|
smoser
force-pushed
the
feature/restore-the-api
branch
from
July 18, 2023 15:35
a3b6020
to
d9415f6
Compare
smoser
force-pushed
the
feature/restore-the-api
branch
from
August 18, 2023 15:35
d9415f6
to
a96554a
Compare
Lots of things here. * Publish uncustomized content. Previously content in the published 'bootkit' layer was signed with snakeoil "keyset". Now we publish only the uncustomized content. Building customized content is possible with 'make cust' (see below) * Add 'make cust' target to build customized content. By running 'make cust KEYSET_D=/path/to/keyset', the user can create all the customized output locally. This currently does require to build all layers, so it isn't a great solution. Future changes would hopefully allow setting building of a customized layer using the artifacts in a published bootkit layer. There is a start of that in layers/custom.yaml, see the CUSTOM_BOOTKIT_INPUT option. Hopefully we can do a better job there. In the meantime, the shell script 'tools/custbk' has a reasonable user interface and only a few dependencies. * python3 * objcopy * virt-fw-vars (from virt-firmware python package) * cert-to-efi-sig-list (efitools) Output of 'cust' build is a layer with: customized/ovmf-vars.fd customized/ovmf-code.fd customized/kernel.efi customized/shim.efi * A 'bkcust' golang tool that does many of the operations involved in the custom.yaml file. The goal is to replace the use of the tools/custbk shell script with the 'bkcust' golang, which has fewer dependencies. There is more work to do on this tool. * Beginings of an API. There is a reasonable API now for working with the bootkit artifacts. * firmware(ovmf-vars.fd) - OVMFPopulateSecureBoot can add certificates to the ovmf-vars firmware. * certs - NewEFISignatureDatabase * shim - VendorDBSectionWrite , SetVendorDB * stubby - Smoosh The functionality is exposed bkcust cli mentioned above. What is still todo: * create an initramfs api that allows you to easily combine initramfs * restore working oci-boot command. it probably needs adjusting given the changes. From a bootkit layer, it appears to only use 'kernel.efi', optionally shim.efi and modules.squashfs. So it might make more sense to just have the user point at those things. * add tests more, call tests from c-i
smoser
force-pushed
the
feature/restore-the-api
branch
from
August 18, 2023 15:36
a96554a
to
a421197
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm marking this as 'draft'.
It heavily re-works bootkit build.
See the README.md for the changes .
The big thing is that the published bootkit wont have any certificates inside artifacts and wont have any signed content.
The bootkit artifacts are then combined with a keyset in the 'customized' layer.