Skip to content

Commit 9f00be2

Browse files
plaidfinchclaude
andcommitted
Add trust quorum proxy endpoints and use serde_with for hex encoding
Add three new proxy endpoints to the sled-agent API that allow forwarding trust quorum operations to other nodes: - POST `/trust-quorum/proxy/commit` - POST `/trust-quorum/proxy/prepare-and-commit` - POST `/trust-quorum/proxy/status` Also refactors the trust quorum types to use `serde_with` with `Hex` encoding for cleaner serialization of digests and encrypted rack secrets, replacing manual hex string parsing with automatic encoding/decoding. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 40eecf0 commit 9f00be2

File tree

10 files changed

+936
-54
lines changed

10 files changed

+936
-54
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,5 +993,47 @@ mod api_impl {
993993
> {
994994
unimplemented!()
995995
}
996+
997+
async fn trust_quorum_proxy_commit(
998+
_request_context: RequestContext<Self::Context>,
999+
_body: TypedBody<
1000+
sled_agent_types::trust_quorum::TrustQuorumProxyCommitRequest,
1001+
>,
1002+
) -> Result<
1003+
HttpResponseOk<
1004+
sled_agent_types::trust_quorum::TrustQuorumCommitResponse,
1005+
>,
1006+
HttpError,
1007+
> {
1008+
unimplemented!()
1009+
}
1010+
1011+
async fn trust_quorum_proxy_prepare_and_commit(
1012+
_request_context: RequestContext<Self::Context>,
1013+
_body: TypedBody<
1014+
sled_agent_types::trust_quorum::TrustQuorumProxyPrepareAndCommitRequest,
1015+
>,
1016+
) -> Result<
1017+
HttpResponseOk<
1018+
sled_agent_types::trust_quorum::TrustQuorumCommitResponse,
1019+
>,
1020+
HttpError,
1021+
> {
1022+
unimplemented!()
1023+
}
1024+
1025+
async fn trust_quorum_proxy_status(
1026+
_request_context: RequestContext<Self::Context>,
1027+
_body: TypedBody<
1028+
sled_agent_types::trust_quorum::TrustQuorumProxyStatusRequest,
1029+
>,
1030+
) -> Result<
1031+
HttpResponseOk<
1032+
sled_agent_types::trust_quorum::TrustQuorumNodeStatus,
1033+
>,
1034+
HttpError,
1035+
> {
1036+
unimplemented!()
1037+
}
9961038
}
9971039
}

0 commit comments

Comments
 (0)