-
Notifications
You must be signed in to change notification settings - Fork 589
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
Snap integrity discover #14873
Draft
sespiros
wants to merge
12
commits into
canonical:master
Choose a base branch
from
sespiros:snap-integrity-discover
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Snap integrity discover #14873
+669
−594
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
checkDigestWhatDec also accepts a function used for the decoding.
…y stanza With the new design, dm-verity data can be generated on installation using the parameters from the snap-revision assertion which also contains the dm-verity root hash. Multiple variants of integrity data are possible for a single snap-revision to allow for future per-device optimization and configuration.
…hash dm-verity devices
Under the new design, generating dm-verity data via `snap pack` is not needed as support for integrity data was simplified and there is no extra logic or separate header anymore.
…format also dmverity.Format will simply return the root hash instead of the old Info struct since the new design doesn't have a need for a separate header.
adding helpers for retrieving and parsing a dm-verity superblock from a dm-verity hash device/file. This will be first consumed by the snap integrity API which will need to detect the salt that was used for the dm-verity data generation. Moreover callers to dmverity.Format will need to have a way to retrieve the parameters used by veritysetup if no parameters are passed (and veritysetup chooses default values).
the new design simplifies how snap dm-verity data for a corresponding snap are generated and used by having them as a separate file (i.e located next to the snap file) instead of attaching them at the end of their snap file by default. The extra integrity data header is removed as all the information needed to mount a snap with its verity data (root hash, salt, other parameters) will be retrieved from a new integrity stanza in snap-revision assertions.
* snap-integrity-new-api: s/integrity: rework snap integrity API snap/integrity: add default dmverity format version s/i/dmverity/veritysetup: add superblock parsing functionality s/i/dmverity/veritysetup: add ability to pass options to veritysetup format s/i/dmverity: refactor getRootHashFromOutput
* snap-integrity-remove-pack: multiple: remove dm-verity support from snap pack
This commit adds support for looking up dm-verity integrity data for asserted snaps in the seed (ones that have verified assertions available). snap-bootstrap can then use these integrity data parameters to call to the snap integrity API in order to either detect available dm-verity hash data or generate them. It will then proceed with mounting the snaps using dm-verity.
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.
This is currently lacking a few end to end tests so opening as draft.
It is based on top of:
and adds a single commit on top which enables snap-bootstrap to use the new APIs in order to mount snaps coming from the seed with dm-verity data.
Jira: https://warthogs.atlassian.net/browse/FR-9883