pub enum ServerMessage {
Attestation {
data: Vec<u8>,
control_nonce: [u8; 32],
},
ControlNonce {
nonce: [u8; 32],
},
Data {
id: u64,
payload: Vec<u8>,
},
Error {
id: u64,
message: String,
},
ControlResult {
success: bool,
message: String,
},
StreamData {
id: u64,
payload: Vec<u8>,
},
StreamClose {
id: u64,
},
}Expand description
Messages sent from the enclave server to the client.
Variants§
Attestation
Attestation document (COSE_Sign1 in enclave mode, raw nonce in debug
mode). control_nonce is the current per-boot single-use nonce that
must be embedded in the next signed ControlCommand.
ControlNonce
Response to ClientMessage::GetControlNonce. Returns the current
single-use nonce. Unauthenticated: the nonce is not secret, only
anti-replay. The nonce is NOT consumed by this fetch; it is only
consumed when the server processes a full Control message (success
or failure). The backend must fetch the nonce and then immediately
send its signed Control without any intervening messages from
another client that might rotate the nonce.
Data
Raw bytes received from the inner container (typically an HTTP response).
The id matches the corresponding ClientMessage::Data request.
Error
Error forwarding to the inner container.
ControlResult
Result of a Control command. The control nonce was rotated whether
or not the command succeeded — the next signed command must use the
new nonce, fetched via a fresh GetControlNonce or
RequestAttestation.
StreamData
Bytes read out of an open inner-container connection. For an
ClientMessage::OpenStream this carries everything the workload
writes back, including the initial HTTP response head: the client is
responsible for any parsing.
StreamClose
The open stream has been closed by the server side (workload EOF or
error). After this, no further StreamData for this id will arrive.
Trait Implementations§
Source§impl Clone for ServerMessage
impl Clone for ServerMessage
Source§fn clone(&self) -> ServerMessage
fn clone(&self) -> ServerMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more