feat(eif): add EIF image format support for Nitro Enclaves#673
Open
jmt-lab wants to merge 1 commit into
Open
Conversation
jmt-lab
commented
Jun 24, 2026
ginglis13
reviewed
Jul 7, 2026
Contributor
Author
|
Updated per comments and reference eif file. |
ShelbyZ
reviewed
Jul 7, 2026
| "KernelVersion": kernel_version, | ||
| }, | ||
| "DockerInfo": {}, | ||
| "CustomMetadata": serde_json::Value::Null, |
There was a problem hiding this comment.
Should this be {} to match object - https://github.com/aws/aws-nitro-enclaves-image-format/blob/5704eb0df3986acdb87482e3f37cc869a5c50cf3/src/defs/mod.rs#L281-L282
Contributor
Author
There was a problem hiding this comment.
It looks like actually null is the correct setting here, it matches nitro-cli's enclave_build which sets custom_info = json!(null) when no --metadata is provided.
Contributor
Author
There was a problem hiding this comment.
codesnippet from aws-nitro-enclaves-cli enclave_build/src/lib.rs:122
let mut custom_info = json!(null);
if let Some(ref path) = self.metadata_path {
custom_info = parse_custom_metadata(path).map_err(Docker2EifError::MetadataError)?
}
ginglis13
reviewed
Jul 8, 2026
| @@ -0,0 +1,239 @@ | |||
| #!/usr/bin/env bash | |||
Contributor
There was a problem hiding this comment.
Let's generate an application-inventory.json file for EIFs as well
6691787 to
60004af
Compare
Introduce a new `image-format = "eif"` variant type that produces an AWS Nitro Enclaves Image Format (kernel + cmdline + ramdisk + metadata) alongside a GPT disk image and bare kernel. - Add `tools/eif-builder` crate implementing the EIF v4 container format - Add `twoliter/embedded/rpm2eif` build script and wire it into `build.Dockerfile`, branching on `IMAGE_FORMAT=eif` to skip rpm2img's partitioning/secure-boot flags (rpm2eif owns the layout) - Extend `buildsys::manifest::ImageFormat` with `Eif` and plumb it through `DockerBuild`; reject `repack-variant` for EIF with a clear error - Teach `pubsys fetch_variant` to fetch the `.eif`, `-disk.img`, and `-kernel` artifacts published by EIF variants - Bundle `eif-builder` as a twoliter embedded tool - Add `hello-eif` test variant and manifest-parsing tests
This file contains hidden or 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
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.
Introduce a new
image-format = "eif"variant type that produces an AWS Nitro Enclaves Image Format (kernel + cmdline + ramdisk + metadata) alongside a GPT disk image and bare kernel.tools/eif-buildercrate implementing the EIF v4 container formattwoliter/embedded/rpm2eifbuild script and wire it intobuild.Dockerfile, branching onIMAGE_FORMAT=eifto skip rpm2img's partitioning/secure-boot flags (rpm2eif owns the layout)buildsys::manifest::ImageFormatwithEifand plumb it throughDockerBuild; rejectrepack-variantfor EIF with a clear errorpubsys fetch_variantto fetch the.eif,-disk.img, and-kernelartifacts published by EIF variantseif-builderas a twoliter embedded toolhello-eiftest variant and manifest-parsing testsTerms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.