Skip to content

Commit

Permalink
Merge pull request #7 from paulhowardarm/phTweakARPolicy
Browse files Browse the repository at this point in the history
fix: Temporarily allow WARNING as well as AFFIRMING status in EAR submodules
  • Loading branch information
thomas-fossati authored Aug 28, 2024
2 parents 417fc89 + a1c61cd commit 8603ac7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions rust-keybroker/keybroker-server/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ pub fn verify_with_veraison_instance(
verification_key_string.as_bytes(),
)?;

// The simplest possible appraisal policy: accept if we have an AFFIRMING result from
// every submodule of the token.
let verified = ear
.submods
.iter()
.all(|(_module, appraisal)| appraisal.status == TrustTier::Affirming);
// The simplest possible appraisal policy: accept if we have an AFFIRMING or WARNING result
// from every submodule.
// TODO: This policy is rather too "relaxed" - the simplest and strictest policy would be
// to require AFFIRMING from every submodule. We have some integration issues with Veraison
// today that prevent this.
let verified = ear.submods.iter().all(|(_module, appraisal)| {
appraisal.status == TrustTier::Affirming || appraisal.status == TrustTier::Warning
});

Ok(verified)
}

0 comments on commit 8603ac7

Please sign in to comment.