Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Skip check matching director to image-repo targets for secondaries
Browse files Browse the repository at this point in the history
Managed secondaries perform validation on provided metadata. The
final check matches director to image-repo targets. This check
does not have support for delegated targets which causes failures.

Since we make use of delegated targets, skip this check for now.

See upstream conversation here:
uptane/aktualizr#80

Related-to: TOR-2305

Signed-off-by: Jeremias Cordoba <jeremias.cordoba@toradex.com>
  • Loading branch information
jsrc27 committed Jun 2, 2022
1 parent d85fc03 commit b309b14
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/torizon_virtual_secondary/managedsecondary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,15 @@ data::InstallationResult ManagedSecondary::putMetadata(const Uptane::Target &tar
}

// 10. Verify that Targets metadata from the Director and Image repositories match.
// FIXME: [TORIZON] Skip this check since it does not support delegations which we use.
// See here: https://github.com/uptane/aktualizr/issues/80
/*
if (!director_repo_->matchTargetsWithImageTargets(image_repo_->getTargets())) {
detected_attack = "Targets metadata from the Director and Image repositories do not match";
LOG_ERROR << detected_attack;
return data::InstallationResult(data::ResultCode::Numeric::kVerificationFailed, detected_attack);
}
*/

return data::InstallationResult(data::ResultCode::Numeric::kOk, "");
}
Expand Down Expand Up @@ -183,11 +187,15 @@ data::InstallationResult ManagedSecondary::putMetadataOffUpd(const Uptane::Targe
}

// 9. Verify that Targets metadata from the Director and Image repositories match.
// FIXME: [TORIZON] Skip this check since it does not support delegations which we use.
// See here: https://github.com/uptane/aktualizr/issues/80
/*
if (!director_repo_->matchTargetsWithImageTargets(image_repo_->getTargets())) {
detected_attack = "Targets metadata from the Director and Image repositories do not match";
LOG_ERROR << detected_attack;
return data::InstallationResult(data::ResultCode::Numeric::kVerificationFailed, detected_attack);
}
*/

return data::InstallationResult(data::ResultCode::Numeric::kOk, "");
}
Expand Down

0 comments on commit b309b14

Please sign in to comment.