Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
api: add api definitions for the services
Browse files Browse the repository at this point in the history
Add api definitions (protobuf) for services including:
 - eventlog-server
 - measurement-server
 - quote-server

Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com>
  • Loading branch information
Ruoyu-y committed Jul 11, 2023
1 parent a08ad1b commit e40e3dd
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
27 changes: 27 additions & 0 deletions api/eventlog-server.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
syntax = "proto3";
option go_package = "github.com/intel/confidential-cloud-native-primitives/service/eventlog-server/proto/getEventlog";

enum CATEGORY {
TDX_EVENTLOG = 0;
TPM_EVENTLOG = 1;
}

enum LEVEL {
PAAS = 0;
SAAS = 1;
}

message GetEventlogRequest {
LEVEL eventlog_level = 1;
CATEGORY eventlog_category = 2;
int32 start_position = 3;
int32 count = 4;
}

message GetEventlogReply {
string eventlog_data_loc = 1;
}

service Eventlog {
rpc GetEventlog (GetEventlogRequest) returns (GetEventlogReply) {}
}
32 changes: 32 additions & 0 deletions api/measurement-server.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
syntax = "proto3";
option go_package = "github.com/intel/confidential-cloud-native-primitives/service/measurement-server/proto/getMeasurement";

package measurement;


enum TYPE {
PAAS = 0;
SAAS = 1;
}

enum CATEGORY {
TEE_REPORT = 0;
TPM = 1;
TDX_RTMR = 2;
}

message GetMeasurementRequest {
TYPE measurement_type = 1;
CATEGORY measurement_category = 2;
string report_data = 3;
int32 register_index = 4;

}

message GetMeasurementReply {
string measurement = 1;
}

service Measurement {
rpc GetMeasurement (GetMeasurementRequest) returns (GetMeasurementReply) {}
}
30 changes: 30 additions & 0 deletions api/quote-server.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto3";
package quoteserver;

message HealthCheckRequest {
string service = 1;
}

message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
SERVICE_UNKNOWN = 3;
}
ServingStatus status = 1;
}

service GetQuote {
rpc GetQuote (GetQuoteRequest) returns (GetQuoteResponse);
}

message GetQuoteRequest {
string user_data = 1;
string nonce = 2;
}

message GetQuoteResponse {
string quote = 1;
string quote_type = 2;
}

0 comments on commit e40e3dd

Please sign in to comment.