standalone: add simple instance attestation server#1076
standalone: add simple instance attestation server#1076jordanhendricks wants to merge 1 commit intomasterfrom
Conversation
Co-authored-by: Philip Tricca <flihp@oxide.computer>
cb2d4b2 to
89adcdf
Compare
|
I've added to this to get it working w/ the latest |
| ), | ||
| }; | ||
|
|
||
| Ok(VmInstanceRotMock::new(ox_attest, vm_conf)) |
There was a problem hiding this comment.
Not a problem w/ this code, but the VmInstanceRotMock type has a confusing name. The type it wraps may be a mock impl, but VmInstanceRotMock itself isn't. I'll try to come up w/ a better name to make this less inaccurate.
| uuid::Uuid::parse_str(&cfg.instance_uuid).expect("Invalid UUID"); | ||
| let measurement: Measurement = serde_json::from_value( | ||
| serde_json::json!({"sha-256": cfg.boot_digest}), | ||
| ) |
There was a problem hiding this comment.
This type shouldn't be so hard to construct. We should probably include the digest identifier (sha-256 in this case) in the string from the config, and provide a from_something constructor for the Measurement type.
There was a problem hiding this comment.
PR adding a FromStr impl to Measurement type is here: oxidecomputer/vm-attest#49. A commit that uses this to parse the boot_digest from a propolis-standalone TOML config is here: flihp@6fe8547. This commit was tested on atrium. NOTE: this requires taht the boot_digest field in the TOML be updated to include the IANA NIH hash algorithm prefix string like: sha-256;{hex}
addresses #1068
TODO:
Example TOML Configurations
"Mock" RoT (mock data)
Real RoT