Skip to content
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

fix: Temporarily allow WARNING as well as AFFIRMING status in EAR submodules #7

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}