mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-08-07 07:14:50 +00:00
NOISSUE - Add FetchKbsToken RPC support, update protobuf generation, and include additional binaries in CI workflow. (#610)
CI / checkproto (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (agent) (push) Has been cancelled
CI / test (cli) (push) Has been cancelled
CI / test (cmd) (push) Has been cancelled
CI / test (internal) (push) Has been cancelled
CI / test (manager, true) (push) Has been cancelled
CI / test (pkg) (push) Has been cancelled
CI / upload-coverage (push) Has been cancelled
CI / checkproto (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (agent) (push) Has been cancelled
CI / test (cli) (push) Has been cancelled
CI / test (cmd) (push) Has been cancelled
CI / test (internal) (push) Has been cancelled
CI / test (manager, true) (push) Has been cancelled
CI / test (pkg) (push) Has been cancelled
CI / upload-coverage (push) Has been cancelled
* feat: add FetchKbsToken RPC support, update protobuf generation, and include additional binaries in CI workflow. Signed-off-by: Sammy Oina <sammyoina@gmail.com> * chore: update protoc version and add GetKbsToken mock method with updated kbsHTTPGet signature Signed-off-by: Sammy Oina <sammyoina@gmail.com> * test: inject mock attestation client into agentService for resource and KBS tests Signed-off-by: Sammy Oina <sammyoina@gmail.com> * test: update key derivation in tests to use Concat KDF instead of HKDF Signed-off-by: Sammy Oina <sammyoina@gmail.com> --------- Signed-off-by: Sammy Oina <sammyoina@gmail.com>
This commit is contained in:
committed by
GitHub
parent
cbf2a44c6a
commit
13f7e97d82
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v6.33.1
|
||||
// protoc v7.35.0
|
||||
// source: internal/proto/attestation-agent/attestation-agent.proto
|
||||
|
||||
package attestation_agent
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.0
|
||||
// - protoc v6.33.1
|
||||
// - protoc v7.35.0
|
||||
// source: internal/proto/attestation-agent/attestation-agent.proto
|
||||
|
||||
package attestation_agent
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v6.33.1
|
||||
// protoc v7.35.0
|
||||
// source: internal/proto/attestation/v1/attestation.proto
|
||||
|
||||
package attestation
|
||||
@@ -82,6 +82,86 @@ func (PlatformType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type KbsTokenRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *KbsTokenRequest) Reset() {
|
||||
*x = KbsTokenRequest{}
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *KbsTokenRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*KbsTokenRequest) ProtoMessage() {}
|
||||
|
||||
func (x *KbsTokenRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use KbsTokenRequest.ProtoReflect.Descriptor instead.
|
||||
func (*KbsTokenRequest) Descriptor() ([]byte, []int) {
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type KbsTokenResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Token []byte `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *KbsTokenResponse) Reset() {
|
||||
*x = KbsTokenResponse{}
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *KbsTokenResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*KbsTokenResponse) ProtoMessage() {}
|
||||
|
||||
func (x *KbsTokenResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use KbsTokenResponse.ProtoReflect.Descriptor instead.
|
||||
func (*KbsTokenResponse) Descriptor() ([]byte, []int) {
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *KbsTokenResponse) GetToken() []byte {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AttestationRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ReportData []byte `protobuf:"bytes,1,opt,name=report_data,json=reportData,proto3" json:"report_data,omitempty"` // 64 bytes for SNP/TDX
|
||||
@@ -93,7 +173,7 @@ type AttestationRequest struct {
|
||||
|
||||
func (x *AttestationRequest) Reset() {
|
||||
*x = AttestationRequest{}
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[0]
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -105,7 +185,7 @@ func (x *AttestationRequest) String() string {
|
||||
func (*AttestationRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AttestationRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[0]
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -118,7 +198,7 @@ func (x *AttestationRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AttestationRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AttestationRequest) Descriptor() ([]byte, []int) {
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{0}
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *AttestationRequest) GetReportData() []byte {
|
||||
@@ -151,7 +231,7 @@ type AttestationResponse struct {
|
||||
|
||||
func (x *AttestationResponse) Reset() {
|
||||
*x = AttestationResponse{}
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[1]
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -163,7 +243,7 @@ func (x *AttestationResponse) String() string {
|
||||
func (*AttestationResponse) ProtoMessage() {}
|
||||
|
||||
func (x *AttestationResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[1]
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -176,7 +256,7 @@ func (x *AttestationResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AttestationResponse.ProtoReflect.Descriptor instead.
|
||||
func (*AttestationResponse) Descriptor() ([]byte, []int) {
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{1}
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *AttestationResponse) GetEatToken() []byte {
|
||||
@@ -195,7 +275,7 @@ type RawEvidenceResponse struct {
|
||||
|
||||
func (x *RawEvidenceResponse) Reset() {
|
||||
*x = RawEvidenceResponse{}
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[2]
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -207,7 +287,7 @@ func (x *RawEvidenceResponse) String() string {
|
||||
func (*RawEvidenceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RawEvidenceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[2]
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -220,7 +300,7 @@ func (x *RawEvidenceResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use RawEvidenceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*RawEvidenceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{2}
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *RawEvidenceResponse) GetEvidence() []byte {
|
||||
@@ -239,7 +319,7 @@ type AzureTokenRequest struct {
|
||||
|
||||
func (x *AzureTokenRequest) Reset() {
|
||||
*x = AzureTokenRequest{}
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[3]
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -251,7 +331,7 @@ func (x *AzureTokenRequest) String() string {
|
||||
func (*AzureTokenRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AzureTokenRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[3]
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -264,7 +344,7 @@ func (x *AzureTokenRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AzureTokenRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AzureTokenRequest) Descriptor() ([]byte, []int) {
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{3}
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *AzureTokenRequest) GetNonce() []byte {
|
||||
@@ -283,7 +363,7 @@ type AzureTokenResponse struct {
|
||||
|
||||
func (x *AzureTokenResponse) Reset() {
|
||||
*x = AzureTokenResponse{}
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[4]
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -295,7 +375,7 @@ func (x *AzureTokenResponse) String() string {
|
||||
func (*AzureTokenResponse) ProtoMessage() {}
|
||||
|
||||
func (x *AzureTokenResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[4]
|
||||
mi := &file_internal_proto_attestation_v1_attestation_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -308,7 +388,7 @@ func (x *AzureTokenResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AzureTokenResponse.ProtoReflect.Descriptor instead.
|
||||
func (*AzureTokenResponse) Descriptor() ([]byte, []int) {
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{4}
|
||||
return file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *AzureTokenResponse) GetToken() []byte {
|
||||
@@ -322,7 +402,10 @@ var File_internal_proto_attestation_v1_attestation_proto protoreflect.FileDescri
|
||||
|
||||
const file_internal_proto_attestation_v1_attestation_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"/internal/proto/attestation/v1/attestation.proto\x12\x0eattestation.v1\"\x8e\x01\n" +
|
||||
"/internal/proto/attestation/v1/attestation.proto\x12\x0eattestation.v1\"\x11\n" +
|
||||
"\x0fKbsTokenRequest\"(\n" +
|
||||
"\x10KbsTokenResponse\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\fR\x05token\"\x8e\x01\n" +
|
||||
"\x12AttestationRequest\x12\x1f\n" +
|
||||
"\vreport_data\x18\x01 \x01(\fR\n" +
|
||||
"reportData\x12\x14\n" +
|
||||
@@ -343,11 +426,12 @@ const file_internal_proto_attestation_v1_attestation_proto_rawDesc = "" +
|
||||
"\x12PLATFORM_TYPE_VTPM\x10\x03\x12\x1a\n" +
|
||||
"\x16PLATFORM_TYPE_SNP_VTPM\x10\x04\x12\x17\n" +
|
||||
"\x13PLATFORM_TYPE_AZURE\x10\x05\x12\x17\n" +
|
||||
"\x13PLATFORM_TYPE_NO_CC\x10\x062\xa8\x02\n" +
|
||||
"\x13PLATFORM_TYPE_NO_CC\x10\x062\xfc\x02\n" +
|
||||
"\x12AttestationService\x12[\n" +
|
||||
"\x10FetchAttestation\x12\".attestation.v1.AttestationRequest\x1a#.attestation.v1.AttestationResponse\x12[\n" +
|
||||
"\x10FetchRawEvidence\x12\".attestation.v1.AttestationRequest\x1a#.attestation.v1.RawEvidenceResponse\x12X\n" +
|
||||
"\x0fFetchAzureToken\x12!.attestation.v1.AzureTokenRequest\x1a\".attestation.v1.AzureTokenResponseBJZHgithub.com/ultravioletrs/cocos/internal/proto/attestation/v1;attestationb\x06proto3"
|
||||
"\x0fFetchAzureToken\x12!.attestation.v1.AzureTokenRequest\x1a\".attestation.v1.AzureTokenResponse\x12R\n" +
|
||||
"\rFetchKbsToken\x12\x1f.attestation.v1.KbsTokenRequest\x1a .attestation.v1.KbsTokenResponseBJZHgithub.com/ultravioletrs/cocos/internal/proto/attestation/v1;attestationb\x06proto3"
|
||||
|
||||
var (
|
||||
file_internal_proto_attestation_v1_attestation_proto_rawDescOnce sync.Once
|
||||
@@ -362,25 +446,29 @@ func file_internal_proto_attestation_v1_attestation_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_internal_proto_attestation_v1_attestation_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_internal_proto_attestation_v1_attestation_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_internal_proto_attestation_v1_attestation_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_internal_proto_attestation_v1_attestation_proto_goTypes = []any{
|
||||
(PlatformType)(0), // 0: attestation.v1.PlatformType
|
||||
(*AttestationRequest)(nil), // 1: attestation.v1.AttestationRequest
|
||||
(*AttestationResponse)(nil), // 2: attestation.v1.AttestationResponse
|
||||
(*RawEvidenceResponse)(nil), // 3: attestation.v1.RawEvidenceResponse
|
||||
(*AzureTokenRequest)(nil), // 4: attestation.v1.AzureTokenRequest
|
||||
(*AzureTokenResponse)(nil), // 5: attestation.v1.AzureTokenResponse
|
||||
(*KbsTokenRequest)(nil), // 1: attestation.v1.KbsTokenRequest
|
||||
(*KbsTokenResponse)(nil), // 2: attestation.v1.KbsTokenResponse
|
||||
(*AttestationRequest)(nil), // 3: attestation.v1.AttestationRequest
|
||||
(*AttestationResponse)(nil), // 4: attestation.v1.AttestationResponse
|
||||
(*RawEvidenceResponse)(nil), // 5: attestation.v1.RawEvidenceResponse
|
||||
(*AzureTokenRequest)(nil), // 6: attestation.v1.AzureTokenRequest
|
||||
(*AzureTokenResponse)(nil), // 7: attestation.v1.AzureTokenResponse
|
||||
}
|
||||
var file_internal_proto_attestation_v1_attestation_proto_depIdxs = []int32{
|
||||
0, // 0: attestation.v1.AttestationRequest.platform_type:type_name -> attestation.v1.PlatformType
|
||||
1, // 1: attestation.v1.AttestationService.FetchAttestation:input_type -> attestation.v1.AttestationRequest
|
||||
1, // 2: attestation.v1.AttestationService.FetchRawEvidence:input_type -> attestation.v1.AttestationRequest
|
||||
4, // 3: attestation.v1.AttestationService.FetchAzureToken:input_type -> attestation.v1.AzureTokenRequest
|
||||
2, // 4: attestation.v1.AttestationService.FetchAttestation:output_type -> attestation.v1.AttestationResponse
|
||||
3, // 5: attestation.v1.AttestationService.FetchRawEvidence:output_type -> attestation.v1.RawEvidenceResponse
|
||||
5, // 6: attestation.v1.AttestationService.FetchAzureToken:output_type -> attestation.v1.AzureTokenResponse
|
||||
4, // [4:7] is the sub-list for method output_type
|
||||
1, // [1:4] is the sub-list for method input_type
|
||||
3, // 1: attestation.v1.AttestationService.FetchAttestation:input_type -> attestation.v1.AttestationRequest
|
||||
3, // 2: attestation.v1.AttestationService.FetchRawEvidence:input_type -> attestation.v1.AttestationRequest
|
||||
6, // 3: attestation.v1.AttestationService.FetchAzureToken:input_type -> attestation.v1.AzureTokenRequest
|
||||
1, // 4: attestation.v1.AttestationService.FetchKbsToken:input_type -> attestation.v1.KbsTokenRequest
|
||||
4, // 5: attestation.v1.AttestationService.FetchAttestation:output_type -> attestation.v1.AttestationResponse
|
||||
5, // 6: attestation.v1.AttestationService.FetchRawEvidence:output_type -> attestation.v1.RawEvidenceResponse
|
||||
7, // 7: attestation.v1.AttestationService.FetchAzureToken:output_type -> attestation.v1.AzureTokenResponse
|
||||
2, // 8: attestation.v1.AttestationService.FetchKbsToken:output_type -> attestation.v1.KbsTokenResponse
|
||||
5, // [5:9] is the sub-list for method output_type
|
||||
1, // [1:5] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
@@ -397,7 +485,7 @@ func file_internal_proto_attestation_v1_attestation_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_internal_proto_attestation_v1_attestation_proto_rawDesc), len(file_internal_proto_attestation_v1_attestation_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 5,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -8,6 +8,13 @@ service AttestationService {
|
||||
rpc FetchAttestation (AttestationRequest) returns (AttestationResponse);
|
||||
rpc FetchRawEvidence (AttestationRequest) returns (RawEvidenceResponse);
|
||||
rpc FetchAzureToken (AzureTokenRequest) returns (AzureTokenResponse);
|
||||
rpc FetchKbsToken (KbsTokenRequest) returns (KbsTokenResponse);
|
||||
}
|
||||
|
||||
message KbsTokenRequest {}
|
||||
|
||||
message KbsTokenResponse {
|
||||
bytes token = 1;
|
||||
}
|
||||
|
||||
message AttestationRequest {
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.0
|
||||
// - protoc v6.33.1
|
||||
// - protoc v7.35.0
|
||||
// source: internal/proto/attestation/v1/attestation.proto
|
||||
|
||||
package attestation
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
@@ -23,6 +22,7 @@ const (
|
||||
AttestationService_FetchAttestation_FullMethodName = "/attestation.v1.AttestationService/FetchAttestation"
|
||||
AttestationService_FetchRawEvidence_FullMethodName = "/attestation.v1.AttestationService/FetchRawEvidence"
|
||||
AttestationService_FetchAzureToken_FullMethodName = "/attestation.v1.AttestationService/FetchAzureToken"
|
||||
AttestationService_FetchKbsToken_FullMethodName = "/attestation.v1.AttestationService/FetchKbsToken"
|
||||
)
|
||||
|
||||
// AttestationServiceClient is the client API for AttestationService service.
|
||||
@@ -32,6 +32,7 @@ type AttestationServiceClient interface {
|
||||
FetchAttestation(ctx context.Context, in *AttestationRequest, opts ...grpc.CallOption) (*AttestationResponse, error)
|
||||
FetchRawEvidence(ctx context.Context, in *AttestationRequest, opts ...grpc.CallOption) (*RawEvidenceResponse, error)
|
||||
FetchAzureToken(ctx context.Context, in *AzureTokenRequest, opts ...grpc.CallOption) (*AzureTokenResponse, error)
|
||||
FetchKbsToken(ctx context.Context, in *KbsTokenRequest, opts ...grpc.CallOption) (*KbsTokenResponse, error)
|
||||
}
|
||||
|
||||
type attestationServiceClient struct {
|
||||
@@ -72,6 +73,16 @@ func (c *attestationServiceClient) FetchAzureToken(ctx context.Context, in *Azur
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *attestationServiceClient) FetchKbsToken(ctx context.Context, in *KbsTokenRequest, opts ...grpc.CallOption) (*KbsTokenResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(KbsTokenResponse)
|
||||
err := c.cc.Invoke(ctx, AttestationService_FetchKbsToken_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AttestationServiceServer is the server API for AttestationService service.
|
||||
// All implementations must embed UnimplementedAttestationServiceServer
|
||||
// for forward compatibility.
|
||||
@@ -79,6 +90,7 @@ type AttestationServiceServer interface {
|
||||
FetchAttestation(context.Context, *AttestationRequest) (*AttestationResponse, error)
|
||||
FetchRawEvidence(context.Context, *AttestationRequest) (*RawEvidenceResponse, error)
|
||||
FetchAzureToken(context.Context, *AzureTokenRequest) (*AzureTokenResponse, error)
|
||||
FetchKbsToken(context.Context, *KbsTokenRequest) (*KbsTokenResponse, error)
|
||||
mustEmbedUnimplementedAttestationServiceServer()
|
||||
}
|
||||
|
||||
@@ -98,6 +110,9 @@ func (UnimplementedAttestationServiceServer) FetchRawEvidence(context.Context, *
|
||||
func (UnimplementedAttestationServiceServer) FetchAzureToken(context.Context, *AzureTokenRequest) (*AzureTokenResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method FetchAzureToken not implemented")
|
||||
}
|
||||
func (UnimplementedAttestationServiceServer) FetchKbsToken(context.Context, *KbsTokenRequest) (*KbsTokenResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method FetchKbsToken not implemented")
|
||||
}
|
||||
func (UnimplementedAttestationServiceServer) mustEmbedUnimplementedAttestationServiceServer() {}
|
||||
func (UnimplementedAttestationServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
@@ -173,6 +188,24 @@ func _AttestationService_FetchAzureToken_Handler(srv interface{}, ctx context.Co
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AttestationService_FetchKbsToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(KbsTokenRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AttestationServiceServer).FetchKbsToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AttestationService_FetchKbsToken_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AttestationServiceServer).FetchKbsToken(ctx, req.(*KbsTokenRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AttestationService_ServiceDesc is the grpc.ServiceDesc for AttestationService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -192,6 +225,10 @@ var AttestationService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "FetchAzureToken",
|
||||
Handler: _AttestationService_FetchAzureToken_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "FetchKbsToken",
|
||||
Handler: _AttestationService_FetchKbsToken_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "internal/proto/attestation/v1/attestation.proto",
|
||||
|
||||
Reference in New Issue
Block a user