Skip to content

Commit

Permalink
polish(keybroker-server): use RIM only when these are the CCA referen…
Browse files Browse the repository at this point in the history
…ce values.

Signed-off-by: Arnaud de Grandmaison <[email protected]>
  • Loading branch information
Arnaud-de-Grandmaison-ARM committed Oct 10, 2024
1 parent 4e7fda5 commit 7521c33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rust-keybroker/keybroker-server/src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub static MEDIATYPES_TO_POLICY: Map<&'static str, (&'static str, &'static str)>
// Other, future mappings
};

// Evaluate an EAR claims-set against the appraisal policy and known-good RIM values
// Evaluate an EAR claims-set against the appraisal policy and known-good reference values
pub(crate) fn rego_eval(
policy: &str,
policy_rule: &str,
Expand All @@ -26,7 +26,7 @@ pub(crate) fn rego_eval(
// Add the appraisal policy
engine.add_policy(String::from("policy.rego"), String::from(policy))?;

// Load the configured known good RIM values
// Load the configured known-good reference values
engine.add_data(Value::from_json_file(reference_values)?)?;

// Set the EAR claims-set to be appraised
Expand Down
2 changes: 1 addition & 1 deletion rust-keybroker/keybroker-server/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub fn verify_with_veraison_instance<DE: EmitDiagnostic>(
// Appraise the received EAR using the embedded policy (see ./policy.rego)
// unless a custom one has been provided on the command line. The default
// policy also wants to match the RIM value reported by the CCA token with
// the known-good RIM values supplied on the command line.
// the known-good reference values supplied on the command line.
let results = policy::rego_eval(
policy,
policy_rule,
Expand Down

0 comments on commit 7521c33

Please sign in to comment.