Skip to content

Commit 3a211ae

Browse files
committed
Refactor protobuf messages
Introduce new protobuf messages which encapsulate various evidence packages which are being sent to the Certifier Service. Using separate message types for each platform is less error-prone and allows extensibility.
1 parent f824045 commit 3a211ae

File tree

3 files changed

+137
-225
lines changed

3 files changed

+137
-225
lines changed

certifier_service/certprotos/certifier.proto

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,53 @@ message proof {
247247
repeated proof_step steps = 3;
248248
};
249249

250-
// submitted_evidence_type is "full-vse-support"
251-
// "platform-attestation-only" or "oe-evidence"
252-
// or "asylo-evidence"
250+
message vse_package {
251+
optional bytes claim = 1;
252+
optional bytes attestation = 2;
253+
};
254+
255+
message gramine_package {
256+
optional bytes platform_cert = 1;
257+
optional bytes attestation = 2;
258+
}
259+
260+
message keystone_package {
261+
optional bytes attestation = 1;
262+
};
263+
264+
message islet_package {
265+
optional bytes attestation = 1;
266+
};
267+
268+
message sev_package {
269+
optional bytes ark = 1;
270+
optional bytes ask = 2;
271+
optional bytes vcek = 3;
272+
optional bytes attestation = 4;
273+
};
274+
275+
message oe_package {
276+
optional bytes cert_chain = 1;
277+
optional bytes attestation = 2;
278+
};
279+
280+
enum msg_purpose {
281+
authentication = 0;
282+
attestation = 1;
283+
};
284+
253285
message trust_request_message {
254286
optional string requesting_enclave_tag = 1;
255287
optional string providing_enclave_tag = 2;
256-
optional string submitted_evidence_type = 3;
257-
optional string purpose = 4; // "authentication" or "attestation"
258-
optional evidence_package support = 5;
288+
optional msg_purpose purpose = 3;
289+
oneof evidence_package {
290+
vse_package vse_pkg = 4;
291+
gramine_package gramine_pkg = 5;
292+
keystone_package keystone_pkg = 6;
293+
islet_package islet_pkg = 7;
294+
sev_package sev_pkg = 8;
295+
oe_package oe_pkg = 9;
296+
}
259297
};
260298

261299
message trust_response_message {

include/cc_helpers.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
bool open_client_socket(const string &host_name, int port, int *soc);
3737
bool open_server_socket(const string &host_name, int port, int *soc);
3838

39-
bool construct_platform_evidence_package(string & enclave_type,
40-
const string & purpose,
41-
evidence_list & list,
42-
string & the_attestation,
43-
evidence_package *ep);
4439
bool add_policy_key_says_platform_key_is_trusted(
4540
signed_claim_message &platform_key_is_trusted,
4641
evidence_package * ep);

0 commit comments

Comments
 (0)