Skip to content

sled-agent: add RoT attestation endpoints#9739

Merged
luqmana merged 13 commits intomainfrom
luqmana/rot-attest
Feb 10, 2026
Merged

sled-agent: add RoT attestation endpoints#9739
luqmana merged 13 commits intomainfrom
luqmana/rot-attest

Conversation

@luqmana
Copy link
Copy Markdown
Contributor

@luqmana luqmana commented Jan 28, 2026

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-cli tool with a new sled-agent-client-based interface to exercise the new APIs (playing the role of propolis):

BRM42220026 # ./verifier-cli --interface sled-agent --sled-addr '[fde2:c3cc:fbe3:101::1]:12345' log | tee log.json
{"index":1,"measurements":[{"Sha3_256":[127,251,54,168,183,58,224,201,42,83,6,65,4,185,67,222,122,251,50,182,251,85,202,12,37,122,102,35,50,21,169,102]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"Sha3_256":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]}

BRM42220026 # ./verifier-cli --interface sled-agent --sled-addr '[fde2:c3cc:fbe3:101::1]:12345' cert-chain > chain.pem
BRM42220026 # openssl crl2pkcs7 -nocrl -certfile chain.pem | openssl pkcs7 -print_certs -noout
subject=C = US, O = Oxide Computer Company, CN = alias
issuer=C = US, O = Oxide Computer Company, CN = device-id

subject=C = US, O = Oxide Computer Company, CN = device-id
issuer=C = US, O = Oxide Computer Company, CN = PDV1:913-0000019:006:BRM42220026

subject=C = US, O = Oxide Computer Company, CN = PDV1:913-0000019:006:BRM42220026
issuer=C = US, O = Oxide Computer Company, CN = Platform Identity Staging Intermediate 20780377

subject=C = US, O = Oxide Computer Company, CN = Platform Identity Staging Intermediate 20780377
issuer=C = US, O = Oxide Computer Company, CN = Platform Identity Staging Root A

BRM42220026 # ./verifier-cli verify-cert-chain --ca-cert /usr/share/oxide/idcerts/staging.pem chain.pem && echo chain verified
chain verified

BRM42220026 # awk '/BEGIN CERTIFICATE/ {p=1} p; /END CERTIFICATE/ {exit}' chain.pem > alias-cert.pem

BRM42220026 # perl -e "print '0'x64" | xxd -r -p > nonce.bin
BRM42220026 # ./verifier-cli --interface sled-agent --sled-addr '[fde2:c3cc:fbe3:101::1]:12345' attest nonce.bin | tee attestation.sig
{"Ed25519":[249,0,91,88,42,203,67,7,219,178,216,2,171,173,99,190,207,245,241,234,153,92,23,83,6,198,205,190,243,167,93,42,222,236,217,106,64,233,143,226,105,24,252,145,119,15,109,108,67,130,172,249,106,116,65,248,183,48,110,77,63,39,112,5]}

BRM42220026 # ./verifier-cli verify-attestation --alias-cert alias-cert.pem --log log.json --nonce nonce.bin attestation.sig && echo attestation verified
attestation verified

Comment thread sled-agent/types/versions/src/add_rot_attestation/attestation.rs Outdated
Comment thread sled-agent/types/versions/src/add_rot_attestation/attestation.rs
Comment thread sled-agent/src/rot.rs Outdated
Comment thread sled-agent/src/rot.rs Outdated
Comment thread sled-agent/src/http_entrypoints.rs
@luqmana luqmana force-pushed the luqmana/rot-attest branch 6 times, most recently from fad57df to 44ce979 Compare February 3, 2026 23:54
@luqmana
Copy link
Copy Markdown
Contributor Author

luqmana commented Feb 3, 2026

Dropped the attestation code I had in the local omicron ipcc crate and switched to using dice-verifier. Besides deduplicating, that comes with the nice upside of being able to use the AttestMock impl for non-gimlet setups (piggy-backing off sprockets' AttestConfig in sled-agent's config.toml).

@luqmana luqmana force-pushed the luqmana/rot-attest branch from 3dc1e06 to 8f2c2eb Compare February 5, 2026 02:10
Comment thread sled-agent/src/rot.rs Outdated
Comment thread sled-agent/src/rot.rs
Comment thread sled-agent/types/versions/src/add_rot_attestation/attestation.rs Outdated
Comment thread sled-agent/types/versions/src/add_rot_attestation/attestation.rs Outdated
Comment thread sled-agent/types/versions/src/add_rot_attestation/attestation.rs Outdated
Comment thread sled-agent/Cargo.toml
# Only used by the simulated sled agent.
crucible-agent-client.workspace = true
derive_more.workspace = true
dice-verifier = { workspace = true, features = ["ipcc", "mock"] }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to only enable the mock stuff in the sled-agent sim? is that worth doing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is actually for running real sled-agent but on a non-"gimlet":

attest = { which = "local", priv_key = "/opt/oxide/sled-agent/pkg/test-alias-1.key.pem", cert_chain = "/opt/oxide/sled-agent/pkg/test-alias-1.certlist.pem", log = "/opt/oxide/sled-agent/pkg/sprockets-log.bin", test_corpus = [ "/opt/oxide/sled-agent/pkg/testing-measurements/corim-rot.cbor", "/opt/oxide/sled-agent/pkg/testing-measurements/corim-sp.cbor"] }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, gotcha. is that written down someplace?

Comment thread sled-agent/src/rot.rs
@luqmana luqmana force-pushed the luqmana/rot-attest branch from 8f2c2eb to 2a7011c Compare February 5, 2026 22:34
@luqmana luqmana force-pushed the luqmana/rot-attest branch from 2a7011c to 5561a2c Compare February 6, 2026 01:04
Copy link
Copy Markdown
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no blockers from me, though i left a few last minor comments

Comment thread common/src/lib.rs
Comment thread sled-agent/src/rot.rs
Comment thread sled-agent/src/rot.rs Outdated
Comment on lines +253 to +269
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));
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i presume that these requests get logged as they occur by the Attest implementation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at the moment, but could be!

Comment thread sled-agent/src/rot.rs Outdated
@luqmana luqmana merged commit becbbb6 into main Feb 10, 2026
18 checks passed
@luqmana luqmana deleted the luqmana/rot-attest branch February 10, 2026 22:46
luqmana added a commit to oxidecomputer/dice-util that referenced this pull request Feb 11, 2026
A new `dice_verifier::Attest` impl that uses the sled-agent APIs (oxidecomputer/omicron#9739) to make the necessary RoT calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants