feat: add CLI option to generate dm-verity referrer objects#1343
Draft
dallasd1 wants to merge 5 commits intonotaryproject:mainfrom
Draft
feat: add CLI option to generate dm-verity referrer objects#1343dallasd1 wants to merge 5 commits intonotaryproject:mainfrom
dallasd1 wants to merge 5 commits intonotaryproject:mainfrom
Conversation
Add infrastructure for converting OCI layers to EROFS and computing dm-verity root hashes, with parameters matching containerd's erofs-snapshotter for compatible hash output. - internal/erofs/converter.go: tar.gz → EROFS via mkfs.erofs --tar=i - internal/erofs/veritysetup.go: dm-verity root hash via veritysetup - internal/registryutil/fetcher.go: OCI registry blob fetcher Signed-off-by: Dallas Delaney <dadelan@microsoft.com>
Add dm-verity signing mode to 'notation sign'. When --dm-verity is set, each image layer is converted to EROFS, its dm-verity root hash is computed, and signed with PKCS#7 using notation-core-go's envelope. Layer signatures are pushed as an OCI referrer artifact. For plugins, signing_scheme=rsassa-pkcs1-v1_5 is injected into plugin config since the Linux kernel only supports PKCS#1 v1.5 verification. - cmd/notation/sign.go: --dm-verity flag, orchestration, registry push - cmd/notation/internal/sign/sign.go: GetPrimitiveSigner, localPrimitiveSigner - internal/dmverity/dmverity.go: layer signing and manifest construction Signed-off-by: Dallas Delaney <dadelan@microsoft.com>
Signed-off-by: Dallas Delaney <dadelan@microsoft.com>
- Gate --dm-verity behind NOTATION_EXPERIMENTAL=1 enforcement - Add SecureFlagOpts to dm-verity registry calls - Change CLI logs from info to debug - Rename LayerSignature to SignatureEnvelope - Replace hardcoded empty config with ocispec.DescriptorEmptyJSON Signed-off-by: Dallas Delaney <dadelan@microsoft.com>
Signed-off-by: Dallas Delaney <106280731+dallasd1@users.noreply.github.com>
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.
--dm-verityto push OCI referrers containing PKCS#7 envelopes and root hashes