A repository for client implementations written in Rust that interact with Attestation Manager (AM) and Attestation Service Provider (ASP) servers.
Once you have Rust installed (https://www.rust-lang.org/tools/install), simply typing make should build all the executable targets specified in this workspace.
To install necessary runtime dependencies for these executables, follow the installation instructions in the cvm and asp-libs repositories as specified in their READMEs.
Before testing a rust client executable, you'll need to make sure its cvm and asp-libs dependencies are visible (NOTE: An alternative is to pass paths to these dependencies explicitly as CLI arguments to a client executable).
First, make sure the cvm executable is on your PATH:
which cvmNext, set the ASP_BIN environment variable to point to your ASP executables installed under asp-libs:
export ASP_BIN=<path_to_asp-libs>/target/release/Now try running the rodeo_client_test make target as follows:
make rodeo_client_testSuccessful output should be some JSON logging followed by something like:
Protocol completed successfully!
-
Install and test the
rust-rodeo-clientexecutable and its dependencies (see above) -
Clone the INSPECTA-models repository, and locate the
attestation/directory for the codegen project you wish to attest (i.e. for the isolette project this would be:INSPECTA-models/isolette/hamr/microkit/attestation). Below we assume this path is in an environment variable called$HAMR_ATTESTATION_ROOT. -
Identify the filename of the HAMR attestation report at
$HAMR_ATTESTATION_ROOT(i.e.sysml_attestation_report.json). -
From the top-level directory of the
rust-am-clientsrepository, run HAMR contract provisioning:cargo run --release --bin rust-rodeo-client -- --hamr-report-filepath $HAMR_ATTESTATION_ROOT/sysml_attestation_report.json -p $HAMR_ATTESTATION_ROOT/hamr_maestro_golden_evidence.json
Note: the
--hamr-model-filenameCLI arg expects the file path to the HAMR attestation report (the attestation tools rely on that file residing at the$HAMR_ATTESTATION_ROOTdirectory) and the-poption (provision) expects a file path for where to output the golden evidence file (used during appraisal in the next step).After running the above command, MAESTRO provisioning will populate two output files in the
$HAMR_ATTESTATION_ROOTdirectory, namelyhamr_maestro_term.json(the JSON-encoded attestation protocol -- its filename is hardcoded for now) andhamr_maestro_golden_evidence.json(the golden evidence structure -- filename chosen during provisioning via-p). -
Again in
rust-am-clients/, run HAMR contract appraisal:cargo run --release --bin rust-rodeo-client -- -t $HAMR_ATTESTATION_ROOT/hamr_maestro_term.json -aNote: the
-tCLI arg points to the MAESTRO protocol term (generated during provisioning above).-atells the MAESTRO tools to perform evidence appraisal against the golden evidence file generated during provisioning above (the path to this golden evidence file is automatically embedded into the protocol term during provisioning). -
Check the
$HAMR_ATTESTATION_ROOTdirectory for the newly-generated file calledappsumm_response.json. This is an AppraisalSummary Response JSON structure (tailored for parsing by tools like Resolute). The crucial field of this JSON object is"APPRAISAL_RESULT"which captures the overall appraisal judgement for the HAMR contract file slices as a boolean. The JSON schema for the AppraisalSummary Response can be found here.
The following commands assume the environment variable $RODEO_ROOT is set to point to the top-level of your locally-cloned rust-am-clients repo:
For provisioning:
$RODEO_ROOT/target/release/rust-rodeo-client --hamr-report-filepath $HAMR_ATTESTATION_ROOT/sysml_attestation_report.json -s $RODEO_ROOT/rodeo_configs/sessions/session_union.json -m $RODEO_ROOT/testing/manifests/Manifest_P0.json -o $RODEO_ROOT/testing/outputs/ -p $HAMR_ATTESTATION_ROOT/hamr_maestro_golden_evidence.jsonFor appraisal:
$RODEO_ROOT/target/release/rust-rodeo-client -t $HAMR_ATTESTATION_ROOT/hamr_maestro_term.json -s $RODEO_ROOT/rodeo_configs/sessions/session_union.json -m $RODEO_ROOT/testing/manifests/Manifest_P0.json -o $RODEO_ROOT/testing/outputs/ -aNOTE: After the above appraisal, the resulting Appraisal Summary file will be generated at $HAMR_ATTESTATION_ROOT/appsumm_response.json.