sled-agent: add RoT attestation endpoints#9739
Conversation
54163d9 to
e4f73c5
Compare
e4f73c5 to
de2a8d9
Compare
fad57df to
44ce979
Compare
|
Dropped the attestation code I had in the local omicron |
3dc1e06 to
8f2c2eb
Compare
| # Only used by the simulated sled agent. | ||
| crucible-agent-client.workspace = true | ||
| derive_more.workspace = true | ||
| dice-verifier = { workspace = true, features = ["ipcc", "mock"] } |
There was a problem hiding this comment.
is it possible to only enable the mock stuff in the sled-agent sim? is that worth doing?
There was a problem hiding this comment.
No, this is actually for running real sled-agent but on a non-"gimlet":
omicron/smf/sled-agent/non-gimlet/config.toml
Line 124 in 558f89e
There was a problem hiding this comment.
ah, gotcha. is that written down someplace?
… to sled_agent::rot
8f2c2eb to
2a7011c
Compare
2a7011c to
5561a2c
Compare
hawkw
left a comment
There was a problem hiding this comment.
no blockers from me, though i left a few last minor comments
| RotAttestationMessage::GetMeasurementLog(reply_tx) => { | ||
| let log = self.attest.get_measurement_log(); | ||
| let _ = reply_tx.send(log.map(Into::into)); | ||
| } | ||
| RotAttestationMessage::GetCertificateChain(reply_tx) => { | ||
| let chain = | ||
| self.attest.get_certificates().and_then(|chain| { | ||
| CertificateChain::try_from(chain) | ||
| .map_err(AttestError::from) | ||
| }); | ||
| let _ = reply_tx.send(chain); | ||
| } | ||
| RotAttestationMessage::Attest(nonce, reply_tx) => { | ||
| let attestation = self.attest.attest(&nonce.0); | ||
| let _ = reply_tx.send(attestation.map(Into::into)); | ||
| } | ||
| } |
There was a problem hiding this comment.
i presume that these requests get logged as they occur by the Attest implementation?
There was a problem hiding this comment.
Not at the moment, but could be!
A new `dice_verifier::Attest` impl that uses the sled-agent APIs (oxidecomputer/omicron#9739) to make the necessary RoT calls.
This covers the sled agent portion of https://github.com/orgs/oxidecomputer/projects/159?pane=issue&itemId=139850060 by exposing a new set of APIs a propolis instance will call.
I hooked up the existing
verifier-clitool with a newsled-agent-client-based interface to exercise the new APIs (playing the role of propolis):