mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-06-23 04:10:25 +00:00
4b27b98edb
* Refactor attestation handling: rename AttestationResult to AzureAttestationToken - Updated the protobuf definition to change azureAttestationResponse to azureAttestationToken. - Refactored the Service interface and its implementation to replace AttestationResult with AzureAttestationToken. - Modified mock functions and tests to reflect the new naming and functionality. - Adjusted CLI commands to use the new AzureAttestationToken method. - Removed the AzureToken constant from the attestation package as it is no longer needed. Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Remove redundant data checks and logging in SendData and sendData methods Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Update agent/api/grpc/server_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update agent/api/grpc/endpoint_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Refactor attestation handling: rename AttestationToken to AzureAttestationToken in server and test files Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Refactor attestation command output messages for clarity and consistency Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Rename AttestationToken to AzureAttestationToken in TestAttestationToken for consistency Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Refactor TestChangeAttestationConfiguration to use vtpm.ConvertPolicyToJSON for JSON conversion Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Fix: reset temporary file pointer after zipping directory Signed-off-by: Sammy Oina <sammyoina@gmail.com> --------- Signed-off-by: Sammy Oina <sammyoina@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
65 lines
1.3 KiB
Protocol Buffer
65 lines
1.3 KiB
Protocol Buffer
// Copyright (c) Ultraviolet
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
syntax = "proto3";
|
|
|
|
package agent;
|
|
|
|
option go_package = "./agent";
|
|
|
|
service AgentService {
|
|
rpc Algo(stream AlgoRequest) returns (AlgoResponse) {}
|
|
rpc Data(stream DataRequest) returns (DataResponse) {}
|
|
rpc Result(ResultRequest) returns (stream ResultResponse) {}
|
|
rpc Attestation(AttestationRequest) returns (stream AttestationResponse) {}
|
|
rpc IMAMeasurements(IMAMeasurementsRequest) returns (stream IMAMeasurementsResponse) {}
|
|
rpc AzureAttestationToken(AttestationTokenRequest) returns (AttestationTokenResponse) {}
|
|
}
|
|
|
|
message AlgoRequest {
|
|
bytes algorithm = 1;
|
|
bytes requirements = 2;
|
|
}
|
|
|
|
message AlgoResponse {}
|
|
|
|
message DataRequest {
|
|
bytes dataset = 1;
|
|
string filename = 2;
|
|
}
|
|
|
|
message DataResponse {}
|
|
|
|
message ResultRequest {
|
|
}
|
|
|
|
message ResultResponse {
|
|
bytes file = 1;
|
|
}
|
|
|
|
message AttestationRequest {
|
|
bytes teeNonce = 1; // Should be less or equal 64 bytes.
|
|
bytes vtpmNonce = 2; // Should be less or equal 32 bytes.
|
|
int32 type = 3;
|
|
}
|
|
|
|
message AttestationResponse {
|
|
bytes file = 1;
|
|
}
|
|
|
|
message IMAMeasurementsRequest {
|
|
}
|
|
|
|
message IMAMeasurementsResponse {
|
|
bytes file = 1;
|
|
bytes pcr10 = 2;
|
|
}
|
|
|
|
message AttestationTokenRequest{
|
|
bytes tokenNonce = 1; // Should be less or equal 32 bytes
|
|
int32 type = 3;
|
|
}
|
|
message AttestationTokenResponse{
|
|
bytes file = 1;
|
|
}
|