Add dynamic measurement policies - #76
Open
ameba23 wants to merge 5 commits into
Open
Conversation
ameba23
force-pushed
the
peg/dynamic-measurement-policies
branch
from
August 4, 2026 09:15
1af3613 to
4da74a6
Compare
…-tls crate due to certificate caching
ameba23
force-pushed
the
peg/dynamic-measurement-policies
branch
from
August 13, 2026 06:49
f5f54fb to
c95700a
Compare
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.
Problem: On Buildernet portable measurement policies are not possible because measurements are checked by Builderhub and can change at runtime as new Buildernet OS images are released.
This makes it possible to dynamically change accepted measurement policies for the attestation verifier at runtime by putting them behind a mutex.
AttestationVerifier now has an option which can be set during construction via the builder API, adding a resource to re-fetch a measurement policy. This is a string which can be either a URL fetched by http(s) or a file path.
If this option is present, on getting a measurement mismatch during attestation verification the resource is re-fetched to get the latest version of the policy, and the measurements are checked against the new policy.
This option is not allowed with the included attested-tls crate, because the trusted certificate cache would allow old policies to still be accepted. A possible followup could clear the cache whenever the policy is updated by checking policy generation numbers.
Closes #15