diff --git a/cre/capabilities/compute/confidentialworkflow/v1alpha/client.proto b/cre/capabilities/compute/confidentialworkflow/v1alpha/client.proto index 1cb42f77..c73c39e8 100644 --- a/cre/capabilities/compute/confidentialworkflow/v1alpha/client.proto +++ b/cre/capabilities/compute/confidentialworkflow/v1alpha/client.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package capabilities.compute.confidentialworkflow.v1alpha; +import "google/protobuf/empty.proto"; +import "sdk/v1alpha/sdk.proto"; import "tools/generator/v1alpha/cre_metadata.proto"; message SecretIdentifier { @@ -11,11 +13,17 @@ message SecretIdentifier { } // WorkflowExecution is the public data sent to the enclave. -// Becomes ComputeRequest.PublicData after proto serialization. +// Becomes ComputeRequest.PublicData after proto serialization, which is +// covered by ComputeRequest.Hash() for F+1 quorum matching at the enclave. message WorkflowExecution { // workflow_id identifies the workflow to execute. string workflow_id = 1; - // binary_url is the URL from which the enclave fetches the compiled WASM binary. + // binary_url is the URL from which the enclave fetches the compiled WASM + // binary. It lives inside WorkflowExecution (PublicData), covered by + // ComputeRequest.Hash() for F+1 quorum, so every node agrees on the same + // canonical locator. Authentication to the storage service is handled out of + // band by the fetch sidecar, so this is a stable, node-agnostic locator + // rather than a per-node pre-signed URL. string binary_url = 2; // binary_hash is the expected SHA-256 hash of the WASM binary, for integrity verification. bytes binary_hash = 3; @@ -28,6 +36,22 @@ message WorkflowExecution { // execution_id is the unique execution identifier (64 hex chars, 32 bytes). // Used by the enclave for runtime secret fetching from VaultDON. string execution_id = 6; + // org_id is the organization identifier for the workflow owner. + // Used by the enclave when fetching secrets from VaultDON with org-based ownership. + string org_id = 7; + // requirements describes what is needed to run this workflow (e.g. TEE type + // and regions). + sdk.v1alpha.Requirements requirements = 8; + // sdk_execute_request is the structured form of execute_request. It carries + // the same sdk.v1alpha.ExecuteRequest as the serialized execute_request bytes + // field; the two are independent on the wire (setting one does not populate + // the other). Consumers that want the typed message read this; legacy + // consumers continue to unmarshal execute_request. + sdk.v1alpha.ExecuteRequest sdk_execute_request = 9; + + // restrictions on the capabilities and the secrets.bool + // This is sent to avoid overhead when a TEE is not compromised, the DON will verify the restrictions on its end as well. + sdk.v1alpha.Restrictions restrictions = 10; } // ConfidentialWorkflowRequest is the input provided to the confidential workflows capability. @@ -35,12 +59,25 @@ message WorkflowExecution { message ConfidentialWorkflowRequest { repeated SecretIdentifier vault_don_secrets = 1; WorkflowExecution execution = 2; + // Deprecated: the per-node pre-signed URL approach is superseded. binary_url + // now travels inside WorkflowExecution (PublicData) as a canonical locator, + // with authentication to the storage service handled out of band by the fetch + // sidecar. Retained for back-compat; no longer populated. + string binary_url = 3 [deprecated = true]; } // ConfidentialWorkflowResponse is the output from the confidential workflows capability. message ConfidentialWorkflowResponse { // execution_result is a serialized sdk.v1alpha.ExecutionResult proto. bytes execution_result = 1; + // sdk_execution_result is the structured form of execution_result. It carries + // the same sdk.v1alpha.ExecutionResult as the serialized execution_result + // bytes field; the two are independent on the wire. + sdk.v1alpha.ExecutionResult sdk_execution_result = 2; +} + +message ProvidedTeesResponse { + repeated sdk.v1alpha.TeeTypeAndRegions tee = 1; } service Client { @@ -50,4 +87,5 @@ service Client { }; rpc Execute(ConfidentialWorkflowRequest) returns (ConfidentialWorkflowResponse); + rpc ProvidedTees(google.protobuf.Empty) returns (ProvidedTeesResponse); } diff --git a/cre/capabilities/networking/http/v1alpha/client.proto b/cre/capabilities/networking/http/v1alpha/client.proto index 612d68f5..4a32109e 100644 --- a/cre/capabilities/networking/http/v1alpha/client.proto +++ b/cre/capabilities/networking/http/v1alpha/client.proto @@ -44,6 +44,7 @@ service Client { option (tools.generator.v1alpha.capability) = { mode: MODE_NODE capability_id: "http-actions@1.0.0-alpha" + additional_environments: [ADDITIONAL_ENVIRONMENTS_TEE] }; rpc SendRequest(Request) returns (Response); } diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index 452e67b3..b560f9d7 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -527,6 +527,8 @@ const computeConfidentialworkflowV1alphaClientEmbedded = `syntax = "proto3"; package capabilities.compute.confidentialworkflow.v1alpha; +import "google/protobuf/empty.proto"; +import "sdk/v1alpha/sdk.proto"; import "tools/generator/v1alpha/cre_metadata.proto"; message SecretIdentifier { @@ -536,11 +538,17 @@ message SecretIdentifier { } // WorkflowExecution is the public data sent to the enclave. -// Becomes ComputeRequest.PublicData after proto serialization. +// Becomes ComputeRequest.PublicData after proto serialization, which is +// covered by ComputeRequest.Hash() for F+1 quorum matching at the enclave. message WorkflowExecution { // workflow_id identifies the workflow to execute. string workflow_id = 1; - // binary_url is the URL from which the enclave fetches the compiled WASM binary. + // binary_url is the URL from which the enclave fetches the compiled WASM + // binary. It lives inside WorkflowExecution (PublicData), covered by + // ComputeRequest.Hash() for F+1 quorum, so every node agrees on the same + // canonical locator. Authentication to the storage service is handled out of + // band by the fetch sidecar, so this is a stable, node-agnostic locator + // rather than a per-node pre-signed URL. string binary_url = 2; // binary_hash is the expected SHA-256 hash of the WASM binary, for integrity verification. bytes binary_hash = 3; @@ -553,6 +561,22 @@ message WorkflowExecution { // execution_id is the unique execution identifier (64 hex chars, 32 bytes). // Used by the enclave for runtime secret fetching from VaultDON. string execution_id = 6; + // org_id is the organization identifier for the workflow owner. + // Used by the enclave when fetching secrets from VaultDON with org-based ownership. + string org_id = 7; + // requirements describes what is needed to run this workflow (e.g. TEE type + // and regions). + sdk.v1alpha.Requirements requirements = 8; + // sdk_execute_request is the structured form of execute_request. It carries + // the same sdk.v1alpha.ExecuteRequest as the serialized execute_request bytes + // field; the two are independent on the wire (setting one does not populate + // the other). Consumers that want the typed message read this; legacy + // consumers continue to unmarshal execute_request. + sdk.v1alpha.ExecuteRequest sdk_execute_request = 9; + + // restrictions on the capabilities and the secrets.bool + // This is sent to avoid overhead when a TEE is not compromised, the DON will verify the restrictions on its end as well. + sdk.v1alpha.Restrictions restrictions = 10; } // ConfidentialWorkflowRequest is the input provided to the confidential workflows capability. @@ -560,12 +584,25 @@ message WorkflowExecution { message ConfidentialWorkflowRequest { repeated SecretIdentifier vault_don_secrets = 1; WorkflowExecution execution = 2; + // Deprecated: the per-node pre-signed URL approach is superseded. binary_url + // now travels inside WorkflowExecution (PublicData) as a canonical locator, + // with authentication to the storage service handled out of band by the fetch + // sidecar. Retained for back-compat; no longer populated. + string binary_url = 3 [deprecated = true]; } // ConfidentialWorkflowResponse is the output from the confidential workflows capability. message ConfidentialWorkflowResponse { // execution_result is a serialized sdk.v1alpha.ExecutionResult proto. bytes execution_result = 1; + // sdk_execution_result is the structured form of execution_result. It carries + // the same sdk.v1alpha.ExecutionResult as the serialized execution_result + // bytes field; the two are independent on the wire. + sdk.v1alpha.ExecutionResult sdk_execution_result = 2; +} + +message ProvidedTeesResponse { + repeated sdk.v1alpha.TeeTypeAndRegions tee = 1; } service Client { @@ -575,6 +612,7 @@ service Client { }; rpc Execute(ConfidentialWorkflowRequest) returns (ConfidentialWorkflowResponse); + rpc ProvidedTees(google.protobuf.Empty) returns (ProvidedTeesResponse); } ` @@ -874,6 +912,7 @@ service Client { option (tools.generator.v1alpha.capability) = { mode: MODE_NODE capability_id: "http-actions@1.0.0-alpha" + additional_environments: [ADDITIONAL_ENVIRONMENTS_TEE] }; rpc SendRequest(Request) returns (Response); } @@ -1035,6 +1074,18 @@ message TriggerSubscription { string id = 1; google.protobuf.Any payload = 2; string method = 3; + Requirements requirements = 4; + bool pre_hook = 5; +} + +enum TeeType { + TEE_TYPE_UNSPECIFIED = 0; + TEE_TYPE_AWS_NITRO = 1; +} + +message TeeTypeAndRegions { + TeeType type = 1; + repeated string regions = 3; } message TriggerSubscriptionRequest { @@ -1046,6 +1097,25 @@ message Trigger { google.protobuf.Any payload = 2; } +message Regions { + repeated string regions = 1; +} + +message TeeTypesAndRegions { + repeated TeeTypeAndRegions tee_type_and_regions = 1; +} + +message Tee { + oneof item { + Regions any_regions = 1; + TeeTypesAndRegions tee_types_and_regions = 2; + } +} + +message Requirements { + Tee tee = 1; +} + message AwaitCapabilitiesRequest { repeated int32 ids = 1; } @@ -1058,6 +1128,7 @@ message ExecuteRequest { oneof request { google.protobuf.Empty subscribe = 2; Trigger trigger = 3; + Trigger pre_hook = 5; } uint64 max_response_size = 4; } @@ -1067,6 +1138,7 @@ message ExecutionResult { values.v1.Value value = 1; string error = 2; TriggerSubscriptionRequest trigger_subscriptions = 3; + Restrictions restrictions = 4; } } @@ -1112,6 +1184,52 @@ message SecretResponse { message SecretResponses { repeated SecretResponse responses = 1; } + +message MethodRestriction { + string id = 1; + string method = 2; + uint32 max_calls = 3; +} + +message CapabilityRestriction { + oneof restriction { + MethodRestriction method = 1; + } +} + +enum CapabilityRestrictionType { + CAPABILITY_RESTRICTION_TYPE_CLOSED = 0; + CAPABILITY_RESTRICTION_TYPE_OPEN = 1; +} + +message CapabilityRestrictions { + repeated CapabilityRestriction restrictions = 1; + uint32 max_total_calls = 2; + CapabilityRestrictionType type = 3; +} + +message SecretPrefixRestriction { + string prefix = 1; + string namespace = 2; + uint32 max_secrets = 3; +} + +message SecretRestriction { + oneof restriction { + Secret exact_secret = 1; + SecretPrefixRestriction prefixed_secret = 2; + } +} + +message SecretsRestritions { + repeated SecretRestriction restrictions = 1; + uint32 max_secrets = 2; +} + +message Restrictions { + SecretsRestritions secrets = 1; + CapabilityRestrictions capabilities = 2; +} ` const v1betaSdkEmbedded = `syntax = "proto3"; @@ -1311,10 +1429,16 @@ message Label { } } +enum AdditionalEnvironments { + ADDITIONAL_ENVIRONMENTS_UNSPECIFIED = 0; + ADDITIONAL_ENVIRONMENTS_TEE = 1; +} + message CapabilityMetadata { sdk.v1alpha.Mode mode = 1; string capability_id = 2; map labels = 3; + repeated AdditionalEnvironments additional_environments = 4; } extend google.protobuf.ServiceOptions { diff --git a/cre/go/sdk/sdk.pb.go b/cre/go/sdk/sdk.pb.go index 7944aa81..efdbf966 100644 --- a/cre/go/sdk/sdk.pb.go +++ b/cre/go/sdk/sdk.pb.go @@ -131,6 +131,98 @@ func (Mode) EnumDescriptor() ([]byte, []int) { return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{1} } +type TeeType int32 + +const ( + TeeType_TEE_TYPE_UNSPECIFIED TeeType = 0 + TeeType_TEE_TYPE_AWS_NITRO TeeType = 1 +) + +// Enum value maps for TeeType. +var ( + TeeType_name = map[int32]string{ + 0: "TEE_TYPE_UNSPECIFIED", + 1: "TEE_TYPE_AWS_NITRO", + } + TeeType_value = map[string]int32{ + "TEE_TYPE_UNSPECIFIED": 0, + "TEE_TYPE_AWS_NITRO": 1, + } +) + +func (x TeeType) Enum() *TeeType { + p := new(TeeType) + *p = x + return p +} + +func (x TeeType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TeeType) Descriptor() protoreflect.EnumDescriptor { + return file_sdk_v1alpha_sdk_proto_enumTypes[2].Descriptor() +} + +func (TeeType) Type() protoreflect.EnumType { + return &file_sdk_v1alpha_sdk_proto_enumTypes[2] +} + +func (x TeeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TeeType.Descriptor instead. +func (TeeType) EnumDescriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{2} +} + +type CapabilityRestrictionType int32 + +const ( + CapabilityRestrictionType_CAPABILITY_RESTRICTION_TYPE_CLOSED CapabilityRestrictionType = 0 + CapabilityRestrictionType_CAPABILITY_RESTRICTION_TYPE_OPEN CapabilityRestrictionType = 1 +) + +// Enum value maps for CapabilityRestrictionType. +var ( + CapabilityRestrictionType_name = map[int32]string{ + 0: "CAPABILITY_RESTRICTION_TYPE_CLOSED", + 1: "CAPABILITY_RESTRICTION_TYPE_OPEN", + } + CapabilityRestrictionType_value = map[string]int32{ + "CAPABILITY_RESTRICTION_TYPE_CLOSED": 0, + "CAPABILITY_RESTRICTION_TYPE_OPEN": 1, + } +) + +func (x CapabilityRestrictionType) Enum() *CapabilityRestrictionType { + p := new(CapabilityRestrictionType) + *p = x + return p +} + +func (x CapabilityRestrictionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CapabilityRestrictionType) Descriptor() protoreflect.EnumDescriptor { + return file_sdk_v1alpha_sdk_proto_enumTypes[3].Descriptor() +} + +func (CapabilityRestrictionType) Type() protoreflect.EnumType { + return &file_sdk_v1alpha_sdk_proto_enumTypes[3] +} + +func (x CapabilityRestrictionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CapabilityRestrictionType.Descriptor instead. +func (CapabilityRestrictionType) EnumDescriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{3} +} + type SimpleConsensusInputs struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Observation: @@ -706,6 +798,8 @@ type TriggerSubscription struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Payload *anypb.Any `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` + Requirements *Requirements `protobuf:"bytes,4,opt,name=requirements,proto3" json:"requirements,omitempty"` + PreHook bool `protobuf:"varint,5,opt,name=pre_hook,json=preHook,proto3" json:"pre_hook,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -761,6 +855,72 @@ func (x *TriggerSubscription) GetMethod() string { return "" } +func (x *TriggerSubscription) GetRequirements() *Requirements { + if x != nil { + return x.Requirements + } + return nil +} + +func (x *TriggerSubscription) GetPreHook() bool { + if x != nil { + return x.PreHook + } + return false +} + +type TeeTypeAndRegions struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type TeeType `protobuf:"varint,1,opt,name=type,proto3,enum=sdk.v1alpha.TeeType" json:"type,omitempty"` + Regions []string `protobuf:"bytes,3,rep,name=regions,proto3" json:"regions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TeeTypeAndRegions) Reset() { + *x = TeeTypeAndRegions{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TeeTypeAndRegions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TeeTypeAndRegions) ProtoMessage() {} + +func (x *TeeTypeAndRegions) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[9] + 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 TeeTypeAndRegions.ProtoReflect.Descriptor instead. +func (*TeeTypeAndRegions) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{9} +} + +func (x *TeeTypeAndRegions) GetType() TeeType { + if x != nil { + return x.Type + } + return TeeType_TEE_TYPE_UNSPECIFIED +} + +func (x *TeeTypeAndRegions) GetRegions() []string { + if x != nil { + return x.Regions + } + return nil +} + type TriggerSubscriptionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Subscriptions []*TriggerSubscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` @@ -770,7 +930,7 @@ type TriggerSubscriptionRequest struct { func (x *TriggerSubscriptionRequest) Reset() { *x = TriggerSubscriptionRequest{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[9] + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -782,7 +942,7 @@ func (x *TriggerSubscriptionRequest) String() string { func (*TriggerSubscriptionRequest) ProtoMessage() {} func (x *TriggerSubscriptionRequest) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[9] + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -795,7 +955,7 @@ func (x *TriggerSubscriptionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerSubscriptionRequest.ProtoReflect.Descriptor instead. func (*TriggerSubscriptionRequest) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{9} + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{10} } func (x *TriggerSubscriptionRequest) GetSubscriptions() []*TriggerSubscription { @@ -815,7 +975,7 @@ type Trigger struct { func (x *Trigger) Reset() { *x = Trigger{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[10] + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -827,7 +987,7 @@ func (x *Trigger) String() string { func (*Trigger) ProtoMessage() {} func (x *Trigger) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[10] + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -840,7 +1000,7 @@ func (x *Trigger) ProtoReflect() protoreflect.Message { // Deprecated: Use Trigger.ProtoReflect.Descriptor instead. func (*Trigger) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{10} + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{11} } func (x *Trigger) GetId() uint64 { @@ -857,28 +1017,28 @@ func (x *Trigger) GetPayload() *anypb.Any { return nil } -type AwaitCapabilitiesRequest struct { +type Regions struct { state protoimpl.MessageState `protogen:"open.v1"` - Ids []int32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` + Regions []string `protobuf:"bytes,1,rep,name=regions,proto3" json:"regions,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AwaitCapabilitiesRequest) Reset() { - *x = AwaitCapabilitiesRequest{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[11] +func (x *Regions) Reset() { + *x = Regions{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AwaitCapabilitiesRequest) String() string { +func (x *Regions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AwaitCapabilitiesRequest) ProtoMessage() {} +func (*Regions) ProtoMessage() {} -func (x *AwaitCapabilitiesRequest) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[11] +func (x *Regions) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -889,40 +1049,40 @@ func (x *AwaitCapabilitiesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AwaitCapabilitiesRequest.ProtoReflect.Descriptor instead. -func (*AwaitCapabilitiesRequest) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{11} +// Deprecated: Use Regions.ProtoReflect.Descriptor instead. +func (*Regions) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{12} } -func (x *AwaitCapabilitiesRequest) GetIds() []int32 { +func (x *Regions) GetRegions() []string { if x != nil { - return x.Ids + return x.Regions } return nil } -type AwaitCapabilitiesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Responses map[int32]*CapabilityResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +type TeeTypesAndRegions struct { + state protoimpl.MessageState `protogen:"open.v1"` + TeeTypeAndRegions []*TeeTypeAndRegions `protobuf:"bytes,1,rep,name=tee_type_and_regions,json=teeTypeAndRegions,proto3" json:"tee_type_and_regions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *AwaitCapabilitiesResponse) Reset() { - *x = AwaitCapabilitiesResponse{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[12] +func (x *TeeTypesAndRegions) Reset() { + *x = TeeTypesAndRegions{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AwaitCapabilitiesResponse) String() string { +func (x *TeeTypesAndRegions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AwaitCapabilitiesResponse) ProtoMessage() {} +func (*TeeTypesAndRegions) ProtoMessage() {} -func (x *AwaitCapabilitiesResponse) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[12] +func (x *TeeTypesAndRegions) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -933,46 +1093,44 @@ func (x *AwaitCapabilitiesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AwaitCapabilitiesResponse.ProtoReflect.Descriptor instead. -func (*AwaitCapabilitiesResponse) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{12} +// Deprecated: Use TeeTypesAndRegions.ProtoReflect.Descriptor instead. +func (*TeeTypesAndRegions) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{13} } -func (x *AwaitCapabilitiesResponse) GetResponses() map[int32]*CapabilityResponse { +func (x *TeeTypesAndRegions) GetTeeTypeAndRegions() []*TeeTypeAndRegions { if x != nil { - return x.Responses + return x.TeeTypeAndRegions } return nil } -type ExecuteRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - // Types that are valid to be assigned to Request: +type Tee struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Item: // - // *ExecuteRequest_Subscribe - // *ExecuteRequest_Trigger - Request isExecuteRequest_Request `protobuf_oneof:"request"` - MaxResponseSize uint64 `protobuf:"varint,4,opt,name=max_response_size,json=maxResponseSize,proto3" json:"max_response_size,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // *Tee_AnyRegions + // *Tee_TeeTypesAndRegions + Item isTee_Item `protobuf_oneof:"item"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ExecuteRequest) Reset() { - *x = ExecuteRequest{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[13] +func (x *Tee) Reset() { + *x = Tee{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ExecuteRequest) String() string { +func (x *Tee) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExecuteRequest) ProtoMessage() {} +func (*Tee) ProtoMessage() {} -func (x *ExecuteRequest) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[13] +func (x *Tee) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -983,93 +1141,74 @@ func (x *ExecuteRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead. -func (*ExecuteRequest) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{13} -} - -func (x *ExecuteRequest) GetConfig() []byte { - if x != nil { - return x.Config - } - return nil +// Deprecated: Use Tee.ProtoReflect.Descriptor instead. +func (*Tee) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{14} } -func (x *ExecuteRequest) GetRequest() isExecuteRequest_Request { +func (x *Tee) GetItem() isTee_Item { if x != nil { - return x.Request + return x.Item } return nil } -func (x *ExecuteRequest) GetSubscribe() *emptypb.Empty { +func (x *Tee) GetAnyRegions() *Regions { if x != nil { - if x, ok := x.Request.(*ExecuteRequest_Subscribe); ok { - return x.Subscribe + if x, ok := x.Item.(*Tee_AnyRegions); ok { + return x.AnyRegions } } return nil } -func (x *ExecuteRequest) GetTrigger() *Trigger { +func (x *Tee) GetTeeTypesAndRegions() *TeeTypesAndRegions { if x != nil { - if x, ok := x.Request.(*ExecuteRequest_Trigger); ok { - return x.Trigger + if x, ok := x.Item.(*Tee_TeeTypesAndRegions); ok { + return x.TeeTypesAndRegions } } return nil } -func (x *ExecuteRequest) GetMaxResponseSize() uint64 { - if x != nil { - return x.MaxResponseSize - } - return 0 -} - -type isExecuteRequest_Request interface { - isExecuteRequest_Request() +type isTee_Item interface { + isTee_Item() } -type ExecuteRequest_Subscribe struct { - Subscribe *emptypb.Empty `protobuf:"bytes,2,opt,name=subscribe,proto3,oneof"` +type Tee_AnyRegions struct { + AnyRegions *Regions `protobuf:"bytes,1,opt,name=any_regions,json=anyRegions,proto3,oneof"` } -type ExecuteRequest_Trigger struct { - Trigger *Trigger `protobuf:"bytes,3,opt,name=trigger,proto3,oneof"` +type Tee_TeeTypesAndRegions struct { + TeeTypesAndRegions *TeeTypesAndRegions `protobuf:"bytes,2,opt,name=tee_types_and_regions,json=teeTypesAndRegions,proto3,oneof"` } -func (*ExecuteRequest_Subscribe) isExecuteRequest_Request() {} +func (*Tee_AnyRegions) isTee_Item() {} -func (*ExecuteRequest_Trigger) isExecuteRequest_Request() {} +func (*Tee_TeeTypesAndRegions) isTee_Item() {} -type ExecutionResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Result: - // - // *ExecutionResult_Value - // *ExecutionResult_Error - // *ExecutionResult_TriggerSubscriptions - Result isExecutionResult_Result `protobuf_oneof:"result"` +type Requirements struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tee *Tee `protobuf:"bytes,1,opt,name=tee,proto3" json:"tee,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ExecutionResult) Reset() { - *x = ExecutionResult{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[14] +func (x *Requirements) Reset() { + *x = Requirements{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ExecutionResult) String() string { +func (x *Requirements) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExecutionResult) ProtoMessage() {} +func (*Requirements) ProtoMessage() {} -func (x *ExecutionResult) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[14] +func (x *Requirements) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1080,90 +1219,766 @@ func (x *ExecutionResult) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExecutionResult.ProtoReflect.Descriptor instead. -func (*ExecutionResult) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{14} +// Deprecated: Use Requirements.ProtoReflect.Descriptor instead. +func (*Requirements) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{15} } -func (x *ExecutionResult) GetResult() isExecutionResult_Result { +func (x *Requirements) GetTee() *Tee { if x != nil { - return x.Result + return x.Tee } return nil } -func (x *ExecutionResult) GetValue() *pb.Value { - if x != nil { - if x, ok := x.Result.(*ExecutionResult_Value); ok { - return x.Value - } - } - return nil +type AwaitCapabilitiesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ids []int32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ExecutionResult) GetError() string { - if x != nil { - if x, ok := x.Result.(*ExecutionResult_Error); ok { - return x.Error - } - } - return "" +func (x *AwaitCapabilitiesRequest) Reset() { + *x = AwaitCapabilitiesRequest{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ExecutionResult) GetTriggerSubscriptions() *TriggerSubscriptionRequest { - if x != nil { - if x, ok := x.Result.(*ExecutionResult_TriggerSubscriptions); ok { - return x.TriggerSubscriptions - } +func (x *AwaitCapabilitiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AwaitCapabilitiesRequest) ProtoMessage() {} + +func (x *AwaitCapabilitiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[16] + 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 AwaitCapabilitiesRequest.ProtoReflect.Descriptor instead. +func (*AwaitCapabilitiesRequest) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{16} +} + +func (x *AwaitCapabilitiesRequest) GetIds() []int32 { + if x != nil { + return x.Ids + } + return nil +} + +type AwaitCapabilitiesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Responses map[int32]*CapabilityResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AwaitCapabilitiesResponse) Reset() { + *x = AwaitCapabilitiesResponse{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AwaitCapabilitiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AwaitCapabilitiesResponse) ProtoMessage() {} + +func (x *AwaitCapabilitiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[17] + 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 AwaitCapabilitiesResponse.ProtoReflect.Descriptor instead. +func (*AwaitCapabilitiesResponse) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{17} +} + +func (x *AwaitCapabilitiesResponse) GetResponses() map[int32]*CapabilityResponse { + if x != nil { + return x.Responses + } + return nil +} + +type ExecuteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + // Types that are valid to be assigned to Request: + // + // *ExecuteRequest_Subscribe + // *ExecuteRequest_Trigger + // *ExecuteRequest_PreHook + Request isExecuteRequest_Request `protobuf_oneof:"request"` + MaxResponseSize uint64 `protobuf:"varint,4,opt,name=max_response_size,json=maxResponseSize,proto3" json:"max_response_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecuteRequest) Reset() { + *x = ExecuteRequest{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecuteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteRequest) ProtoMessage() {} + +func (x *ExecuteRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[18] + 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 ExecuteRequest.ProtoReflect.Descriptor instead. +func (*ExecuteRequest) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{18} +} + +func (x *ExecuteRequest) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +func (x *ExecuteRequest) GetRequest() isExecuteRequest_Request { + if x != nil { + return x.Request + } + return nil +} + +func (x *ExecuteRequest) GetSubscribe() *emptypb.Empty { + if x != nil { + if x, ok := x.Request.(*ExecuteRequest_Subscribe); ok { + return x.Subscribe + } + } + return nil +} + +func (x *ExecuteRequest) GetTrigger() *Trigger { + if x != nil { + if x, ok := x.Request.(*ExecuteRequest_Trigger); ok { + return x.Trigger + } + } + return nil +} + +func (x *ExecuteRequest) GetPreHook() *Trigger { + if x != nil { + if x, ok := x.Request.(*ExecuteRequest_PreHook); ok { + return x.PreHook + } + } + return nil +} + +func (x *ExecuteRequest) GetMaxResponseSize() uint64 { + if x != nil { + return x.MaxResponseSize + } + return 0 +} + +type isExecuteRequest_Request interface { + isExecuteRequest_Request() +} + +type ExecuteRequest_Subscribe struct { + Subscribe *emptypb.Empty `protobuf:"bytes,2,opt,name=subscribe,proto3,oneof"` +} + +type ExecuteRequest_Trigger struct { + Trigger *Trigger `protobuf:"bytes,3,opt,name=trigger,proto3,oneof"` +} + +type ExecuteRequest_PreHook struct { + PreHook *Trigger `protobuf:"bytes,5,opt,name=pre_hook,json=preHook,proto3,oneof"` +} + +func (*ExecuteRequest_Subscribe) isExecuteRequest_Request() {} + +func (*ExecuteRequest_Trigger) isExecuteRequest_Request() {} + +func (*ExecuteRequest_PreHook) isExecuteRequest_Request() {} + +type ExecutionResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Result: + // + // *ExecutionResult_Value + // *ExecutionResult_Error + // *ExecutionResult_TriggerSubscriptions + // *ExecutionResult_Restrictions + Result isExecutionResult_Result `protobuf_oneof:"result"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecutionResult) Reset() { + *x = ExecutionResult{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecutionResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionResult) ProtoMessage() {} + +func (x *ExecutionResult) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[19] + 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 ExecutionResult.ProtoReflect.Descriptor instead. +func (*ExecutionResult) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{19} +} + +func (x *ExecutionResult) GetResult() isExecutionResult_Result { + if x != nil { + return x.Result + } + return nil +} + +func (x *ExecutionResult) GetValue() *pb.Value { + if x != nil { + if x, ok := x.Result.(*ExecutionResult_Value); ok { + return x.Value + } + } + return nil +} + +func (x *ExecutionResult) GetError() string { + if x != nil { + if x, ok := x.Result.(*ExecutionResult_Error); ok { + return x.Error + } + } + return "" +} + +func (x *ExecutionResult) GetTriggerSubscriptions() *TriggerSubscriptionRequest { + if x != nil { + if x, ok := x.Result.(*ExecutionResult_TriggerSubscriptions); ok { + return x.TriggerSubscriptions + } + } + return nil +} + +func (x *ExecutionResult) GetRestrictions() *Restrictions { + if x != nil { + if x, ok := x.Result.(*ExecutionResult_Restrictions); ok { + return x.Restrictions + } + } + return nil +} + +type isExecutionResult_Result interface { + isExecutionResult_Result() +} + +type ExecutionResult_Value struct { + Value *pb.Value `protobuf:"bytes,1,opt,name=value,proto3,oneof"` +} + +type ExecutionResult_Error struct { + Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +type ExecutionResult_TriggerSubscriptions struct { + TriggerSubscriptions *TriggerSubscriptionRequest `protobuf:"bytes,3,opt,name=trigger_subscriptions,json=triggerSubscriptions,proto3,oneof"` +} + +type ExecutionResult_Restrictions struct { + Restrictions *Restrictions `protobuf:"bytes,4,opt,name=restrictions,proto3,oneof"` +} + +func (*ExecutionResult_Value) isExecutionResult_Result() {} + +func (*ExecutionResult_Error) isExecutionResult_Result() {} + +func (*ExecutionResult_TriggerSubscriptions) isExecutionResult_Result() {} + +func (*ExecutionResult_Restrictions) isExecutionResult_Result() {} + +type GetSecretsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Requests []*SecretRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` + CallbackId int32 `protobuf:"varint,2,opt,name=callback_id,json=callbackId,proto3" json:"callback_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSecretsRequest) Reset() { + *x = GetSecretsRequest{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSecretsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSecretsRequest) ProtoMessage() {} + +func (x *GetSecretsRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[20] + 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 GetSecretsRequest.ProtoReflect.Descriptor instead. +func (*GetSecretsRequest) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{20} +} + +func (x *GetSecretsRequest) GetRequests() []*SecretRequest { + if x != nil { + return x.Requests + } + return nil +} + +func (x *GetSecretsRequest) GetCallbackId() int32 { + if x != nil { + return x.CallbackId + } + return 0 +} + +type AwaitSecretsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ids []int32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AwaitSecretsRequest) Reset() { + *x = AwaitSecretsRequest{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AwaitSecretsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AwaitSecretsRequest) ProtoMessage() {} + +func (x *AwaitSecretsRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[21] + 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 AwaitSecretsRequest.ProtoReflect.Descriptor instead. +func (*AwaitSecretsRequest) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{21} +} + +func (x *AwaitSecretsRequest) GetIds() []int32 { + if x != nil { + return x.Ids + } + return nil +} + +type AwaitSecretsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Responses map[int32]*SecretResponses `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AwaitSecretsResponse) Reset() { + *x = AwaitSecretsResponse{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AwaitSecretsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AwaitSecretsResponse) ProtoMessage() {} + +func (x *AwaitSecretsResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[22] + 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 AwaitSecretsResponse.ProtoReflect.Descriptor instead. +func (*AwaitSecretsResponse) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{22} +} + +func (x *AwaitSecretsResponse) GetResponses() map[int32]*SecretResponses { + if x != nil { + return x.Responses + } + return nil +} + +type SecretRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecretRequest) Reset() { + *x = SecretRequest{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretRequest) ProtoMessage() {} + +func (x *SecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type isExecutionResult_Result interface { - isExecutionResult_Result() +// Deprecated: Use SecretRequest.ProtoReflect.Descriptor instead. +func (*SecretRequest) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{23} } -type ExecutionResult_Value struct { - Value *pb.Value `protobuf:"bytes,1,opt,name=value,proto3,oneof"` +func (x *SecretRequest) GetId() string { + if x != nil { + return x.Id + } + return "" } -type ExecutionResult_Error struct { - Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +func (x *SecretRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" } -type ExecutionResult_TriggerSubscriptions struct { - TriggerSubscriptions *TriggerSubscriptionRequest `protobuf:"bytes,3,opt,name=trigger_subscriptions,json=triggerSubscriptions,proto3,oneof"` +type Secret struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` + Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (*ExecutionResult_Value) isExecutionResult_Result() {} +func (x *Secret) Reset() { + *x = Secret{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} -func (*ExecutionResult_Error) isExecutionResult_Result() {} +func (x *Secret) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (*ExecutionResult_TriggerSubscriptions) isExecutionResult_Result() {} +func (*Secret) ProtoMessage() {} -type GetSecretsRequest struct { +func (x *Secret) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[24] + 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 Secret.ProtoReflect.Descriptor instead. +func (*Secret) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{24} +} + +func (x *Secret) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Secret) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *Secret) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *Secret) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type SecretError struct { state protoimpl.MessageState `protogen:"open.v1"` - Requests []*SecretRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` - CallbackId int32 `protobuf:"varint,2,opt,name=callback_id,json=callbackId,proto3" json:"callback_id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` + Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetSecretsRequest) Reset() { - *x = GetSecretsRequest{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[15] +func (x *SecretError) Reset() { + *x = SecretError{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecretError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretError) ProtoMessage() {} + +func (x *SecretError) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[25] + 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 SecretError.ProtoReflect.Descriptor instead. +func (*SecretError) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{25} +} + +func (x *SecretError) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SecretError) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *SecretError) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *SecretError) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type SecretResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: + // + // *SecretResponse_Secret + // *SecretResponse_Error + Response isSecretResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecretResponse) Reset() { + *x = SecretResponse{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretResponse) ProtoMessage() {} + +func (x *SecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[26] + 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 SecretResponse.ProtoReflect.Descriptor instead. +func (*SecretResponse) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{26} +} + +func (x *SecretResponse) GetResponse() isSecretResponse_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SecretResponse) GetSecret() *Secret { + if x != nil { + if x, ok := x.Response.(*SecretResponse_Secret); ok { + return x.Secret + } + } + return nil +} + +func (x *SecretResponse) GetError() *SecretError { + if x != nil { + if x, ok := x.Response.(*SecretResponse_Error); ok { + return x.Error + } + } + return nil +} + +type isSecretResponse_Response interface { + isSecretResponse_Response() +} + +type SecretResponse_Secret struct { + Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3,oneof"` +} + +type SecretResponse_Error struct { + Error *SecretError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*SecretResponse_Secret) isSecretResponse_Response() {} + +func (*SecretResponse_Error) isSecretResponse_Response() {} + +type SecretResponses struct { + state protoimpl.MessageState `protogen:"open.v1"` + Responses []*SecretResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecretResponses) Reset() { + *x = SecretResponses{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetSecretsRequest) String() string { +func (x *SecretResponses) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSecretsRequest) ProtoMessage() {} +func (*SecretResponses) ProtoMessage() {} -func (x *GetSecretsRequest) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[15] +func (x *SecretResponses) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1174,47 +1989,42 @@ func (x *GetSecretsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSecretsRequest.ProtoReflect.Descriptor instead. -func (*GetSecretsRequest) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{15} +// Deprecated: Use SecretResponses.ProtoReflect.Descriptor instead. +func (*SecretResponses) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{27} } -func (x *GetSecretsRequest) GetRequests() []*SecretRequest { +func (x *SecretResponses) GetResponses() []*SecretResponse { if x != nil { - return x.Requests + return x.Responses } return nil } -func (x *GetSecretsRequest) GetCallbackId() int32 { - if x != nil { - return x.CallbackId - } - return 0 -} - -type AwaitSecretsRequest struct { +type MethodRestriction struct { state protoimpl.MessageState `protogen:"open.v1"` - Ids []int32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` + MaxCalls uint32 `protobuf:"varint,3,opt,name=max_calls,json=maxCalls,proto3" json:"max_calls,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AwaitSecretsRequest) Reset() { - *x = AwaitSecretsRequest{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[16] +func (x *MethodRestriction) Reset() { + *x = MethodRestriction{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AwaitSecretsRequest) String() string { +func (x *MethodRestriction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AwaitSecretsRequest) ProtoMessage() {} +func (*MethodRestriction) ProtoMessage() {} -func (x *AwaitSecretsRequest) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[16] +func (x *MethodRestriction) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1225,40 +2035,57 @@ func (x *AwaitSecretsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AwaitSecretsRequest.ProtoReflect.Descriptor instead. -func (*AwaitSecretsRequest) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{16} +// Deprecated: Use MethodRestriction.ProtoReflect.Descriptor instead. +func (*MethodRestriction) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{28} } -func (x *AwaitSecretsRequest) GetIds() []int32 { +func (x *MethodRestriction) GetId() string { if x != nil { - return x.Ids + return x.Id } - return nil + return "" } -type AwaitSecretsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Responses map[int32]*SecretResponses `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +func (x *MethodRestriction) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *MethodRestriction) GetMaxCalls() uint32 { + if x != nil { + return x.MaxCalls + } + return 0 +} + +type CapabilityRestriction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Restriction: + // + // *CapabilityRestriction_Method + Restriction isCapabilityRestriction_Restriction `protobuf_oneof:"restriction"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AwaitSecretsResponse) Reset() { - *x = AwaitSecretsResponse{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[17] +func (x *CapabilityRestriction) Reset() { + *x = CapabilityRestriction{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AwaitSecretsResponse) String() string { +func (x *CapabilityRestriction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AwaitSecretsResponse) ProtoMessage() {} +func (*CapabilityRestriction) ProtoMessage() {} -func (x *AwaitSecretsResponse) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[17] +func (x *CapabilityRestriction) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1269,41 +2096,61 @@ func (x *AwaitSecretsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AwaitSecretsResponse.ProtoReflect.Descriptor instead. -func (*AwaitSecretsResponse) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{17} +// Deprecated: Use CapabilityRestriction.ProtoReflect.Descriptor instead. +func (*CapabilityRestriction) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{29} } -func (x *AwaitSecretsResponse) GetResponses() map[int32]*SecretResponses { +func (x *CapabilityRestriction) GetRestriction() isCapabilityRestriction_Restriction { if x != nil { - return x.Responses + return x.Restriction } return nil } -type SecretRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` +func (x *CapabilityRestriction) GetMethod() *MethodRestriction { + if x != nil { + if x, ok := x.Restriction.(*CapabilityRestriction_Method); ok { + return x.Method + } + } + return nil +} + +type isCapabilityRestriction_Restriction interface { + isCapabilityRestriction_Restriction() +} + +type CapabilityRestriction_Method struct { + Method *MethodRestriction `protobuf:"bytes,1,opt,name=method,proto3,oneof"` +} + +func (*CapabilityRestriction_Method) isCapabilityRestriction_Restriction() {} + +type CapabilityRestrictions struct { + state protoimpl.MessageState `protogen:"open.v1"` + Restrictions []*CapabilityRestriction `protobuf:"bytes,1,rep,name=restrictions,proto3" json:"restrictions,omitempty"` + MaxTotalCalls uint32 `protobuf:"varint,2,opt,name=max_total_calls,json=maxTotalCalls,proto3" json:"max_total_calls,omitempty"` + Type CapabilityRestrictionType `protobuf:"varint,3,opt,name=type,proto3,enum=sdk.v1alpha.CapabilityRestrictionType" json:"type,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SecretRequest) Reset() { - *x = SecretRequest{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[18] +func (x *CapabilityRestrictions) Reset() { + *x = CapabilityRestrictions{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SecretRequest) String() string { +func (x *CapabilityRestrictions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SecretRequest) ProtoMessage() {} +func (*CapabilityRestrictions) ProtoMessage() {} -func (x *SecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[18] +func (x *CapabilityRestrictions) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1314,50 +2161,56 @@ func (x *SecretRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SecretRequest.ProtoReflect.Descriptor instead. -func (*SecretRequest) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{18} +// Deprecated: Use CapabilityRestrictions.ProtoReflect.Descriptor instead. +func (*CapabilityRestrictions) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{30} } -func (x *SecretRequest) GetId() string { +func (x *CapabilityRestrictions) GetRestrictions() []*CapabilityRestriction { if x != nil { - return x.Id + return x.Restrictions } - return "" + return nil } -func (x *SecretRequest) GetNamespace() string { +func (x *CapabilityRestrictions) GetMaxTotalCalls() uint32 { if x != nil { - return x.Namespace + return x.MaxTotalCalls } - return "" + return 0 } -type Secret struct { +func (x *CapabilityRestrictions) GetType() CapabilityRestrictionType { + if x != nil { + return x.Type + } + return CapabilityRestrictionType_CAPABILITY_RESTRICTION_TYPE_CLOSED +} + +type SecretPrefixRestriction struct { state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + MaxSecrets uint32 `protobuf:"varint,3,opt,name=max_secrets,json=maxSecrets,proto3" json:"max_secrets,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *Secret) Reset() { - *x = Secret{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[19] +func (x *SecretPrefixRestriction) Reset() { + *x = SecretPrefixRestriction{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Secret) String() string { +func (x *SecretPrefixRestriction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Secret) ProtoMessage() {} +func (*SecretPrefixRestriction) ProtoMessage() {} -func (x *Secret) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[19] +func (x *SecretPrefixRestriction) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1368,64 +2221,58 @@ func (x *Secret) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Secret.ProtoReflect.Descriptor instead. -func (*Secret) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{19} +// Deprecated: Use SecretPrefixRestriction.ProtoReflect.Descriptor instead. +func (*SecretPrefixRestriction) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{31} } -func (x *Secret) GetId() string { +func (x *SecretPrefixRestriction) GetPrefix() string { if x != nil { - return x.Id + return x.Prefix } return "" } -func (x *Secret) GetNamespace() string { +func (x *SecretPrefixRestriction) GetNamespace() string { if x != nil { return x.Namespace } return "" } -func (x *Secret) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *Secret) GetValue() string { +func (x *SecretPrefixRestriction) GetMaxSecrets() uint32 { if x != nil { - return x.Value + return x.MaxSecrets } - return "" + return 0 } -type SecretError struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` +type SecretRestriction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Restriction: + // + // *SecretRestriction_ExactSecret + // *SecretRestriction_PrefixedSecret + Restriction isSecretRestriction_Restriction `protobuf_oneof:"restriction"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SecretError) Reset() { - *x = SecretError{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[20] +func (x *SecretRestriction) Reset() { + *x = SecretRestriction{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SecretError) String() string { +func (x *SecretRestriction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SecretError) ProtoMessage() {} +func (*SecretRestriction) ProtoMessage() {} -func (x *SecretError) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[20] +func (x *SecretRestriction) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1436,65 +2283,75 @@ func (x *SecretError) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SecretError.ProtoReflect.Descriptor instead. -func (*SecretError) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{20} +// Deprecated: Use SecretRestriction.ProtoReflect.Descriptor instead. +func (*SecretRestriction) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{32} } -func (x *SecretError) GetId() string { +func (x *SecretRestriction) GetRestriction() isSecretRestriction_Restriction { if x != nil { - return x.Id + return x.Restriction } - return "" + return nil } -func (x *SecretError) GetNamespace() string { +func (x *SecretRestriction) GetExactSecret() *Secret { if x != nil { - return x.Namespace + if x, ok := x.Restriction.(*SecretRestriction_ExactSecret); ok { + return x.ExactSecret + } } - return "" + return nil } -func (x *SecretError) GetOwner() string { +func (x *SecretRestriction) GetPrefixedSecret() *SecretPrefixRestriction { if x != nil { - return x.Owner + if x, ok := x.Restriction.(*SecretRestriction_PrefixedSecret); ok { + return x.PrefixedSecret + } } - return "" + return nil } -func (x *SecretError) GetError() string { - if x != nil { - return x.Error - } - return "" +type isSecretRestriction_Restriction interface { + isSecretRestriction_Restriction() } -type SecretResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *SecretResponse_Secret - // *SecretResponse_Error - Response isSecretResponse_Response `protobuf_oneof:"response"` +type SecretRestriction_ExactSecret struct { + ExactSecret *Secret `protobuf:"bytes,1,opt,name=exact_secret,json=exactSecret,proto3,oneof"` +} + +type SecretRestriction_PrefixedSecret struct { + PrefixedSecret *SecretPrefixRestriction `protobuf:"bytes,2,opt,name=prefixed_secret,json=prefixedSecret,proto3,oneof"` +} + +func (*SecretRestriction_ExactSecret) isSecretRestriction_Restriction() {} + +func (*SecretRestriction_PrefixedSecret) isSecretRestriction_Restriction() {} + +type SecretsRestritions struct { + state protoimpl.MessageState `protogen:"open.v1"` + Restrictions []*SecretRestriction `protobuf:"bytes,1,rep,name=restrictions,proto3" json:"restrictions,omitempty"` + MaxSecrets uint32 `protobuf:"varint,2,opt,name=max_secrets,json=maxSecrets,proto3" json:"max_secrets,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SecretResponse) Reset() { - *x = SecretResponse{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[21] +func (x *SecretsRestritions) Reset() { + *x = SecretsRestritions{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SecretResponse) String() string { +func (x *SecretsRestritions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SecretResponse) ProtoMessage() {} +func (*SecretsRestritions) ProtoMessage() {} -func (x *SecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[21] +func (x *SecretsRestritions) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1505,74 +2362,48 @@ func (x *SecretResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SecretResponse.ProtoReflect.Descriptor instead. -func (*SecretResponse) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{21} -} - -func (x *SecretResponse) GetResponse() isSecretResponse_Response { - if x != nil { - return x.Response - } - return nil +// Deprecated: Use SecretsRestritions.ProtoReflect.Descriptor instead. +func (*SecretsRestritions) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{33} } -func (x *SecretResponse) GetSecret() *Secret { +func (x *SecretsRestritions) GetRestrictions() []*SecretRestriction { if x != nil { - if x, ok := x.Response.(*SecretResponse_Secret); ok { - return x.Secret - } + return x.Restrictions } return nil } -func (x *SecretResponse) GetError() *SecretError { +func (x *SecretsRestritions) GetMaxSecrets() uint32 { if x != nil { - if x, ok := x.Response.(*SecretResponse_Error); ok { - return x.Error - } + return x.MaxSecrets } - return nil -} - -type isSecretResponse_Response interface { - isSecretResponse_Response() -} - -type SecretResponse_Secret struct { - Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3,oneof"` -} - -type SecretResponse_Error struct { - Error *SecretError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` + return 0 } -func (*SecretResponse_Secret) isSecretResponse_Response() {} - -func (*SecretResponse_Error) isSecretResponse_Response() {} - -type SecretResponses struct { - state protoimpl.MessageState `protogen:"open.v1"` - Responses []*SecretResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +type Restrictions struct { + state protoimpl.MessageState `protogen:"open.v1"` + Secrets *SecretsRestritions `protobuf:"bytes,1,opt,name=secrets,proto3" json:"secrets,omitempty"` + Capabilities *CapabilityRestrictions `protobuf:"bytes,2,opt,name=capabilities,proto3" json:"capabilities,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SecretResponses) Reset() { - *x = SecretResponses{} - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[22] +func (x *Restrictions) Reset() { + *x = Restrictions{} + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SecretResponses) String() string { +func (x *Restrictions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SecretResponses) ProtoMessage() {} +func (*Restrictions) ProtoMessage() {} -func (x *SecretResponses) ProtoReflect() protoreflect.Message { - mi := &file_sdk_v1alpha_sdk_proto_msgTypes[22] +func (x *Restrictions) ProtoReflect() protoreflect.Message { + mi := &file_sdk_v1alpha_sdk_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1583,14 +2414,21 @@ func (x *SecretResponses) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SecretResponses.ProtoReflect.Descriptor instead. -func (*SecretResponses) Descriptor() ([]byte, []int) { - return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{22} +// Deprecated: Use Restrictions.ProtoReflect.Descriptor instead. +func (*Restrictions) Descriptor() ([]byte, []int) { + return file_sdk_v1alpha_sdk_proto_rawDescGZIP(), []int{34} } -func (x *SecretResponses) GetResponses() []*SecretResponse { +func (x *Restrictions) GetSecrets() *SecretsRestritions { if x != nil { - return x.Responses + return x.Secrets + } + return nil +} + +func (x *Restrictions) GetCapabilities() *CapabilityRestrictions { + if x != nil { + return x.Capabilities } return nil } @@ -1642,33 +2480,51 @@ const file_sdk_v1alpha_sdk_proto_rawDesc = "" + "\apayload\x18\x01 \x01(\v2\x14.google.protobuf.AnyH\x00R\apayload\x12\x16\n" + "\x05error\x18\x02 \x01(\tH\x00R\x05errorB\n" + "\n" + - "\bresponse\"m\n" + + "\bresponse\"\xc7\x01\n" + "\x13TriggerSubscription\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12.\n" + "\apayload\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\apayload\x12\x16\n" + - "\x06method\x18\x03 \x01(\tR\x06method\"d\n" + + "\x06method\x18\x03 \x01(\tR\x06method\x12=\n" + + "\frequirements\x18\x04 \x01(\v2\x19.sdk.v1alpha.RequirementsR\frequirements\x12\x19\n" + + "\bpre_hook\x18\x05 \x01(\bR\apreHook\"W\n" + + "\x11TeeTypeAndRegions\x12(\n" + + "\x04type\x18\x01 \x01(\x0e2\x14.sdk.v1alpha.TeeTypeR\x04type\x12\x18\n" + + "\aregions\x18\x03 \x03(\tR\aregions\"d\n" + "\x1aTriggerSubscriptionRequest\x12F\n" + "\rsubscriptions\x18\x01 \x03(\v2 .sdk.v1alpha.TriggerSubscriptionR\rsubscriptions\"I\n" + "\aTrigger\x12\x0e\n" + "\x02id\x18\x01 \x01(\x04R\x02id\x12.\n" + - "\apayload\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\apayload\",\n" + + "\apayload\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\apayload\"#\n" + + "\aRegions\x12\x18\n" + + "\aregions\x18\x01 \x03(\tR\aregions\"e\n" + + "\x12TeeTypesAndRegions\x12O\n" + + "\x14tee_type_and_regions\x18\x01 \x03(\v2\x1e.sdk.v1alpha.TeeTypeAndRegionsR\x11teeTypeAndRegions\"\x9c\x01\n" + + "\x03Tee\x127\n" + + "\vany_regions\x18\x01 \x01(\v2\x14.sdk.v1alpha.RegionsH\x00R\n" + + "anyRegions\x12T\n" + + "\x15tee_types_and_regions\x18\x02 \x01(\v2\x1f.sdk.v1alpha.TeeTypesAndRegionsH\x00R\x12teeTypesAndRegionsB\x06\n" + + "\x04item\"2\n" + + "\fRequirements\x12\"\n" + + "\x03tee\x18\x01 \x01(\v2\x10.sdk.v1alpha.TeeR\x03tee\",\n" + "\x18AwaitCapabilitiesRequest\x12\x10\n" + "\x03ids\x18\x01 \x03(\x05R\x03ids\"\xcf\x01\n" + "\x19AwaitCapabilitiesResponse\x12S\n" + "\tresponses\x18\x01 \x03(\v25.sdk.v1alpha.AwaitCapabilitiesResponse.ResponsesEntryR\tresponses\x1a]\n" + "\x0eResponsesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\x05R\x03key\x125\n" + - "\x05value\x18\x02 \x01(\v2\x1f.sdk.v1alpha.CapabilityResponseR\x05value:\x028\x01\"\xc9\x01\n" + + "\x05value\x18\x02 \x01(\v2\x1f.sdk.v1alpha.CapabilityResponseR\x05value:\x028\x01\"\xfc\x01\n" + "\x0eExecuteRequest\x12\x16\n" + "\x06config\x18\x01 \x01(\fR\x06config\x126\n" + "\tsubscribe\x18\x02 \x01(\v2\x16.google.protobuf.EmptyH\x00R\tsubscribe\x120\n" + - "\atrigger\x18\x03 \x01(\v2\x14.sdk.v1alpha.TriggerH\x00R\atrigger\x12*\n" + + "\atrigger\x18\x03 \x01(\v2\x14.sdk.v1alpha.TriggerH\x00R\atrigger\x121\n" + + "\bpre_hook\x18\x05 \x01(\v2\x14.sdk.v1alpha.TriggerH\x00R\apreHook\x12*\n" + "\x11max_response_size\x18\x04 \x01(\x04R\x0fmaxResponseSizeB\t\n" + - "\arequest\"\xbd\x01\n" + + "\arequest\"\xfe\x01\n" + "\x0fExecutionResult\x12(\n" + "\x05value\x18\x01 \x01(\v2\x10.values.v1.ValueH\x00R\x05value\x12\x16\n" + "\x05error\x18\x02 \x01(\tH\x00R\x05error\x12^\n" + - "\x15trigger_subscriptions\x18\x03 \x01(\v2'.sdk.v1alpha.TriggerSubscriptionRequestH\x00R\x14triggerSubscriptionsB\b\n" + + "\x15trigger_subscriptions\x18\x03 \x01(\v2'.sdk.v1alpha.TriggerSubscriptionRequestH\x00R\x14triggerSubscriptions\x12?\n" + + "\frestrictions\x18\x04 \x01(\v2\x19.sdk.v1alpha.RestrictionsH\x00R\frestrictionsB\b\n" + "\x06result\"l\n" + "\x11GetSecretsRequest\x126\n" + "\brequests\x18\x01 \x03(\v2\x1a.sdk.v1alpha.SecretRequestR\brequests\x12\x1f\n" + @@ -1700,7 +2556,34 @@ const file_sdk_v1alpha_sdk_proto_rawDesc = "" + "\n" + "\bresponse\"L\n" + "\x0fSecretResponses\x129\n" + - "\tresponses\x18\x01 \x03(\v2\x1b.sdk.v1alpha.SecretResponseR\tresponses*\xdd\x01\n" + + "\tresponses\x18\x01 \x03(\v2\x1b.sdk.v1alpha.SecretResponseR\tresponses\"X\n" + + "\x11MethodRestriction\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + + "\x06method\x18\x02 \x01(\tR\x06method\x12\x1b\n" + + "\tmax_calls\x18\x03 \x01(\rR\bmaxCalls\"`\n" + + "\x15CapabilityRestriction\x128\n" + + "\x06method\x18\x01 \x01(\v2\x1e.sdk.v1alpha.MethodRestrictionH\x00R\x06methodB\r\n" + + "\vrestriction\"\xc4\x01\n" + + "\x16CapabilityRestrictions\x12F\n" + + "\frestrictions\x18\x01 \x03(\v2\".sdk.v1alpha.CapabilityRestrictionR\frestrictions\x12&\n" + + "\x0fmax_total_calls\x18\x02 \x01(\rR\rmaxTotalCalls\x12:\n" + + "\x04type\x18\x03 \x01(\x0e2&.sdk.v1alpha.CapabilityRestrictionTypeR\x04type\"p\n" + + "\x17SecretPrefixRestriction\x12\x16\n" + + "\x06prefix\x18\x01 \x01(\tR\x06prefix\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x1f\n" + + "\vmax_secrets\x18\x03 \x01(\rR\n" + + "maxSecrets\"\xad\x01\n" + + "\x11SecretRestriction\x128\n" + + "\fexact_secret\x18\x01 \x01(\v2\x13.sdk.v1alpha.SecretH\x00R\vexactSecret\x12O\n" + + "\x0fprefixed_secret\x18\x02 \x01(\v2$.sdk.v1alpha.SecretPrefixRestrictionH\x00R\x0eprefixedSecretB\r\n" + + "\vrestriction\"y\n" + + "\x12SecretsRestritions\x12B\n" + + "\frestrictions\x18\x01 \x03(\v2\x1e.sdk.v1alpha.SecretRestrictionR\frestrictions\x12\x1f\n" + + "\vmax_secrets\x18\x02 \x01(\rR\n" + + "maxSecrets\"\x92\x01\n" + + "\fRestrictions\x129\n" + + "\asecrets\x18\x01 \x01(\v2\x1f.sdk.v1alpha.SecretsRestritionsR\asecrets\x12G\n" + + "\fcapabilities\x18\x02 \x01(\v2#.sdk.v1alpha.CapabilityRestrictionsR\fcapabilities*\xdd\x01\n" + "\x0fAggregationType\x12 \n" + "\x1cAGGREGATION_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n" + "\x17AGGREGATION_TYPE_MEDIAN\x10\x01\x12\x1e\n" + @@ -1711,7 +2594,13 @@ const file_sdk_v1alpha_sdk_proto_rawDesc = "" + "\x04Mode\x12\x14\n" + "\x10MODE_UNSPECIFIED\x10\x00\x12\f\n" + "\bMODE_DON\x10\x01\x12\r\n" + - "\tMODE_NODE\x10\x02b\x06proto3" + "\tMODE_NODE\x10\x02*;\n" + + "\aTeeType\x12\x18\n" + + "\x14TEE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n" + + "\x12TEE_TYPE_AWS_NITRO\x10\x01*i\n" + + "\x19CapabilityRestrictionType\x12&\n" + + "\"CAPABILITY_RESTRICTION_TYPE_CLOSED\x10\x00\x12$\n" + + " CAPABILITY_RESTRICTION_TYPE_OPEN\x10\x01b\x06proto3" var ( file_sdk_v1alpha_sdk_proto_rawDescOnce sync.Once @@ -1725,72 +2614,102 @@ func file_sdk_v1alpha_sdk_proto_rawDescGZIP() []byte { return file_sdk_v1alpha_sdk_proto_rawDescData } -var file_sdk_v1alpha_sdk_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_sdk_v1alpha_sdk_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_sdk_v1alpha_sdk_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_sdk_v1alpha_sdk_proto_msgTypes = make([]protoimpl.MessageInfo, 38) var file_sdk_v1alpha_sdk_proto_goTypes = []any{ (AggregationType)(0), // 0: sdk.v1alpha.AggregationType (Mode)(0), // 1: sdk.v1alpha.Mode - (*SimpleConsensusInputs)(nil), // 2: sdk.v1alpha.SimpleConsensusInputs - (*FieldsMap)(nil), // 3: sdk.v1alpha.FieldsMap - (*ConsensusDescriptor)(nil), // 4: sdk.v1alpha.ConsensusDescriptor - (*ReportRequest)(nil), // 5: sdk.v1alpha.ReportRequest - (*ReportResponse)(nil), // 6: sdk.v1alpha.ReportResponse - (*AttributedSignature)(nil), // 7: sdk.v1alpha.AttributedSignature - (*CapabilityRequest)(nil), // 8: sdk.v1alpha.CapabilityRequest - (*CapabilityResponse)(nil), // 9: sdk.v1alpha.CapabilityResponse - (*TriggerSubscription)(nil), // 10: sdk.v1alpha.TriggerSubscription - (*TriggerSubscriptionRequest)(nil), // 11: sdk.v1alpha.TriggerSubscriptionRequest - (*Trigger)(nil), // 12: sdk.v1alpha.Trigger - (*AwaitCapabilitiesRequest)(nil), // 13: sdk.v1alpha.AwaitCapabilitiesRequest - (*AwaitCapabilitiesResponse)(nil), // 14: sdk.v1alpha.AwaitCapabilitiesResponse - (*ExecuteRequest)(nil), // 15: sdk.v1alpha.ExecuteRequest - (*ExecutionResult)(nil), // 16: sdk.v1alpha.ExecutionResult - (*GetSecretsRequest)(nil), // 17: sdk.v1alpha.GetSecretsRequest - (*AwaitSecretsRequest)(nil), // 18: sdk.v1alpha.AwaitSecretsRequest - (*AwaitSecretsResponse)(nil), // 19: sdk.v1alpha.AwaitSecretsResponse - (*SecretRequest)(nil), // 20: sdk.v1alpha.SecretRequest - (*Secret)(nil), // 21: sdk.v1alpha.Secret - (*SecretError)(nil), // 22: sdk.v1alpha.SecretError - (*SecretResponse)(nil), // 23: sdk.v1alpha.SecretResponse - (*SecretResponses)(nil), // 24: sdk.v1alpha.SecretResponses - nil, // 25: sdk.v1alpha.FieldsMap.FieldsEntry - nil, // 26: sdk.v1alpha.AwaitCapabilitiesResponse.ResponsesEntry - nil, // 27: sdk.v1alpha.AwaitSecretsResponse.ResponsesEntry - (*pb.Value)(nil), // 28: values.v1.Value - (*anypb.Any)(nil), // 29: google.protobuf.Any - (*emptypb.Empty)(nil), // 30: google.protobuf.Empty + (TeeType)(0), // 2: sdk.v1alpha.TeeType + (CapabilityRestrictionType)(0), // 3: sdk.v1alpha.CapabilityRestrictionType + (*SimpleConsensusInputs)(nil), // 4: sdk.v1alpha.SimpleConsensusInputs + (*FieldsMap)(nil), // 5: sdk.v1alpha.FieldsMap + (*ConsensusDescriptor)(nil), // 6: sdk.v1alpha.ConsensusDescriptor + (*ReportRequest)(nil), // 7: sdk.v1alpha.ReportRequest + (*ReportResponse)(nil), // 8: sdk.v1alpha.ReportResponse + (*AttributedSignature)(nil), // 9: sdk.v1alpha.AttributedSignature + (*CapabilityRequest)(nil), // 10: sdk.v1alpha.CapabilityRequest + (*CapabilityResponse)(nil), // 11: sdk.v1alpha.CapabilityResponse + (*TriggerSubscription)(nil), // 12: sdk.v1alpha.TriggerSubscription + (*TeeTypeAndRegions)(nil), // 13: sdk.v1alpha.TeeTypeAndRegions + (*TriggerSubscriptionRequest)(nil), // 14: sdk.v1alpha.TriggerSubscriptionRequest + (*Trigger)(nil), // 15: sdk.v1alpha.Trigger + (*Regions)(nil), // 16: sdk.v1alpha.Regions + (*TeeTypesAndRegions)(nil), // 17: sdk.v1alpha.TeeTypesAndRegions + (*Tee)(nil), // 18: sdk.v1alpha.Tee + (*Requirements)(nil), // 19: sdk.v1alpha.Requirements + (*AwaitCapabilitiesRequest)(nil), // 20: sdk.v1alpha.AwaitCapabilitiesRequest + (*AwaitCapabilitiesResponse)(nil), // 21: sdk.v1alpha.AwaitCapabilitiesResponse + (*ExecuteRequest)(nil), // 22: sdk.v1alpha.ExecuteRequest + (*ExecutionResult)(nil), // 23: sdk.v1alpha.ExecutionResult + (*GetSecretsRequest)(nil), // 24: sdk.v1alpha.GetSecretsRequest + (*AwaitSecretsRequest)(nil), // 25: sdk.v1alpha.AwaitSecretsRequest + (*AwaitSecretsResponse)(nil), // 26: sdk.v1alpha.AwaitSecretsResponse + (*SecretRequest)(nil), // 27: sdk.v1alpha.SecretRequest + (*Secret)(nil), // 28: sdk.v1alpha.Secret + (*SecretError)(nil), // 29: sdk.v1alpha.SecretError + (*SecretResponse)(nil), // 30: sdk.v1alpha.SecretResponse + (*SecretResponses)(nil), // 31: sdk.v1alpha.SecretResponses + (*MethodRestriction)(nil), // 32: sdk.v1alpha.MethodRestriction + (*CapabilityRestriction)(nil), // 33: sdk.v1alpha.CapabilityRestriction + (*CapabilityRestrictions)(nil), // 34: sdk.v1alpha.CapabilityRestrictions + (*SecretPrefixRestriction)(nil), // 35: sdk.v1alpha.SecretPrefixRestriction + (*SecretRestriction)(nil), // 36: sdk.v1alpha.SecretRestriction + (*SecretsRestritions)(nil), // 37: sdk.v1alpha.SecretsRestritions + (*Restrictions)(nil), // 38: sdk.v1alpha.Restrictions + nil, // 39: sdk.v1alpha.FieldsMap.FieldsEntry + nil, // 40: sdk.v1alpha.AwaitCapabilitiesResponse.ResponsesEntry + nil, // 41: sdk.v1alpha.AwaitSecretsResponse.ResponsesEntry + (*pb.Value)(nil), // 42: values.v1.Value + (*anypb.Any)(nil), // 43: google.protobuf.Any + (*emptypb.Empty)(nil), // 44: google.protobuf.Empty } var file_sdk_v1alpha_sdk_proto_depIdxs = []int32{ - 28, // 0: sdk.v1alpha.SimpleConsensusInputs.value:type_name -> values.v1.Value - 4, // 1: sdk.v1alpha.SimpleConsensusInputs.descriptors:type_name -> sdk.v1alpha.ConsensusDescriptor - 28, // 2: sdk.v1alpha.SimpleConsensusInputs.default:type_name -> values.v1.Value - 25, // 3: sdk.v1alpha.FieldsMap.fields:type_name -> sdk.v1alpha.FieldsMap.FieldsEntry + 42, // 0: sdk.v1alpha.SimpleConsensusInputs.value:type_name -> values.v1.Value + 6, // 1: sdk.v1alpha.SimpleConsensusInputs.descriptors:type_name -> sdk.v1alpha.ConsensusDescriptor + 42, // 2: sdk.v1alpha.SimpleConsensusInputs.default:type_name -> values.v1.Value + 39, // 3: sdk.v1alpha.FieldsMap.fields:type_name -> sdk.v1alpha.FieldsMap.FieldsEntry 0, // 4: sdk.v1alpha.ConsensusDescriptor.aggregation:type_name -> sdk.v1alpha.AggregationType - 3, // 5: sdk.v1alpha.ConsensusDescriptor.fields_map:type_name -> sdk.v1alpha.FieldsMap - 7, // 6: sdk.v1alpha.ReportResponse.sigs:type_name -> sdk.v1alpha.AttributedSignature - 29, // 7: sdk.v1alpha.CapabilityRequest.payload:type_name -> google.protobuf.Any - 29, // 8: sdk.v1alpha.CapabilityResponse.payload:type_name -> google.protobuf.Any - 29, // 9: sdk.v1alpha.TriggerSubscription.payload:type_name -> google.protobuf.Any - 10, // 10: sdk.v1alpha.TriggerSubscriptionRequest.subscriptions:type_name -> sdk.v1alpha.TriggerSubscription - 29, // 11: sdk.v1alpha.Trigger.payload:type_name -> google.protobuf.Any - 26, // 12: sdk.v1alpha.AwaitCapabilitiesResponse.responses:type_name -> sdk.v1alpha.AwaitCapabilitiesResponse.ResponsesEntry - 30, // 13: sdk.v1alpha.ExecuteRequest.subscribe:type_name -> google.protobuf.Empty - 12, // 14: sdk.v1alpha.ExecuteRequest.trigger:type_name -> sdk.v1alpha.Trigger - 28, // 15: sdk.v1alpha.ExecutionResult.value:type_name -> values.v1.Value - 11, // 16: sdk.v1alpha.ExecutionResult.trigger_subscriptions:type_name -> sdk.v1alpha.TriggerSubscriptionRequest - 20, // 17: sdk.v1alpha.GetSecretsRequest.requests:type_name -> sdk.v1alpha.SecretRequest - 27, // 18: sdk.v1alpha.AwaitSecretsResponse.responses:type_name -> sdk.v1alpha.AwaitSecretsResponse.ResponsesEntry - 21, // 19: sdk.v1alpha.SecretResponse.secret:type_name -> sdk.v1alpha.Secret - 22, // 20: sdk.v1alpha.SecretResponse.error:type_name -> sdk.v1alpha.SecretError - 23, // 21: sdk.v1alpha.SecretResponses.responses:type_name -> sdk.v1alpha.SecretResponse - 4, // 22: sdk.v1alpha.FieldsMap.FieldsEntry.value:type_name -> sdk.v1alpha.ConsensusDescriptor - 9, // 23: sdk.v1alpha.AwaitCapabilitiesResponse.ResponsesEntry.value:type_name -> sdk.v1alpha.CapabilityResponse - 24, // 24: sdk.v1alpha.AwaitSecretsResponse.ResponsesEntry.value:type_name -> sdk.v1alpha.SecretResponses - 25, // [25:25] is the sub-list for method output_type - 25, // [25:25] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 5, // 5: sdk.v1alpha.ConsensusDescriptor.fields_map:type_name -> sdk.v1alpha.FieldsMap + 9, // 6: sdk.v1alpha.ReportResponse.sigs:type_name -> sdk.v1alpha.AttributedSignature + 43, // 7: sdk.v1alpha.CapabilityRequest.payload:type_name -> google.protobuf.Any + 43, // 8: sdk.v1alpha.CapabilityResponse.payload:type_name -> google.protobuf.Any + 43, // 9: sdk.v1alpha.TriggerSubscription.payload:type_name -> google.protobuf.Any + 19, // 10: sdk.v1alpha.TriggerSubscription.requirements:type_name -> sdk.v1alpha.Requirements + 2, // 11: sdk.v1alpha.TeeTypeAndRegions.type:type_name -> sdk.v1alpha.TeeType + 12, // 12: sdk.v1alpha.TriggerSubscriptionRequest.subscriptions:type_name -> sdk.v1alpha.TriggerSubscription + 43, // 13: sdk.v1alpha.Trigger.payload:type_name -> google.protobuf.Any + 13, // 14: sdk.v1alpha.TeeTypesAndRegions.tee_type_and_regions:type_name -> sdk.v1alpha.TeeTypeAndRegions + 16, // 15: sdk.v1alpha.Tee.any_regions:type_name -> sdk.v1alpha.Regions + 17, // 16: sdk.v1alpha.Tee.tee_types_and_regions:type_name -> sdk.v1alpha.TeeTypesAndRegions + 18, // 17: sdk.v1alpha.Requirements.tee:type_name -> sdk.v1alpha.Tee + 40, // 18: sdk.v1alpha.AwaitCapabilitiesResponse.responses:type_name -> sdk.v1alpha.AwaitCapabilitiesResponse.ResponsesEntry + 44, // 19: sdk.v1alpha.ExecuteRequest.subscribe:type_name -> google.protobuf.Empty + 15, // 20: sdk.v1alpha.ExecuteRequest.trigger:type_name -> sdk.v1alpha.Trigger + 15, // 21: sdk.v1alpha.ExecuteRequest.pre_hook:type_name -> sdk.v1alpha.Trigger + 42, // 22: sdk.v1alpha.ExecutionResult.value:type_name -> values.v1.Value + 14, // 23: sdk.v1alpha.ExecutionResult.trigger_subscriptions:type_name -> sdk.v1alpha.TriggerSubscriptionRequest + 38, // 24: sdk.v1alpha.ExecutionResult.restrictions:type_name -> sdk.v1alpha.Restrictions + 27, // 25: sdk.v1alpha.GetSecretsRequest.requests:type_name -> sdk.v1alpha.SecretRequest + 41, // 26: sdk.v1alpha.AwaitSecretsResponse.responses:type_name -> sdk.v1alpha.AwaitSecretsResponse.ResponsesEntry + 28, // 27: sdk.v1alpha.SecretResponse.secret:type_name -> sdk.v1alpha.Secret + 29, // 28: sdk.v1alpha.SecretResponse.error:type_name -> sdk.v1alpha.SecretError + 30, // 29: sdk.v1alpha.SecretResponses.responses:type_name -> sdk.v1alpha.SecretResponse + 32, // 30: sdk.v1alpha.CapabilityRestriction.method:type_name -> sdk.v1alpha.MethodRestriction + 33, // 31: sdk.v1alpha.CapabilityRestrictions.restrictions:type_name -> sdk.v1alpha.CapabilityRestriction + 3, // 32: sdk.v1alpha.CapabilityRestrictions.type:type_name -> sdk.v1alpha.CapabilityRestrictionType + 28, // 33: sdk.v1alpha.SecretRestriction.exact_secret:type_name -> sdk.v1alpha.Secret + 35, // 34: sdk.v1alpha.SecretRestriction.prefixed_secret:type_name -> sdk.v1alpha.SecretPrefixRestriction + 36, // 35: sdk.v1alpha.SecretsRestritions.restrictions:type_name -> sdk.v1alpha.SecretRestriction + 37, // 36: sdk.v1alpha.Restrictions.secrets:type_name -> sdk.v1alpha.SecretsRestritions + 34, // 37: sdk.v1alpha.Restrictions.capabilities:type_name -> sdk.v1alpha.CapabilityRestrictions + 6, // 38: sdk.v1alpha.FieldsMap.FieldsEntry.value:type_name -> sdk.v1alpha.ConsensusDescriptor + 11, // 39: sdk.v1alpha.AwaitCapabilitiesResponse.ResponsesEntry.value:type_name -> sdk.v1alpha.CapabilityResponse + 31, // 40: sdk.v1alpha.AwaitSecretsResponse.ResponsesEntry.value:type_name -> sdk.v1alpha.SecretResponses + 41, // [41:41] is the sub-list for method output_type + 41, // [41:41] is the sub-list for method input_type + 41, // [41:41] is the sub-list for extension type_name + 41, // [41:41] is the sub-list for extension extendee + 0, // [0:41] is the sub-list for field type_name } func init() { file_sdk_v1alpha_sdk_proto_init() } @@ -1810,26 +2729,39 @@ func file_sdk_v1alpha_sdk_proto_init() { (*CapabilityResponse_Payload)(nil), (*CapabilityResponse_Error)(nil), } - file_sdk_v1alpha_sdk_proto_msgTypes[13].OneofWrappers = []any{ + file_sdk_v1alpha_sdk_proto_msgTypes[14].OneofWrappers = []any{ + (*Tee_AnyRegions)(nil), + (*Tee_TeeTypesAndRegions)(nil), + } + file_sdk_v1alpha_sdk_proto_msgTypes[18].OneofWrappers = []any{ (*ExecuteRequest_Subscribe)(nil), (*ExecuteRequest_Trigger)(nil), + (*ExecuteRequest_PreHook)(nil), } - file_sdk_v1alpha_sdk_proto_msgTypes[14].OneofWrappers = []any{ + file_sdk_v1alpha_sdk_proto_msgTypes[19].OneofWrappers = []any{ (*ExecutionResult_Value)(nil), (*ExecutionResult_Error)(nil), (*ExecutionResult_TriggerSubscriptions)(nil), + (*ExecutionResult_Restrictions)(nil), } - file_sdk_v1alpha_sdk_proto_msgTypes[21].OneofWrappers = []any{ + file_sdk_v1alpha_sdk_proto_msgTypes[26].OneofWrappers = []any{ (*SecretResponse_Secret)(nil), (*SecretResponse_Error)(nil), } + file_sdk_v1alpha_sdk_proto_msgTypes[29].OneofWrappers = []any{ + (*CapabilityRestriction_Method)(nil), + } + file_sdk_v1alpha_sdk_proto_msgTypes[32].OneofWrappers = []any{ + (*SecretRestriction_ExactSecret)(nil), + (*SecretRestriction_PrefixedSecret)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_sdk_v1alpha_sdk_proto_rawDesc), len(file_sdk_v1alpha_sdk_proto_rawDesc)), - NumEnums: 2, - NumMessages: 26, + NumEnums: 4, + NumMessages: 38, NumExtensions: 0, NumServices: 0, }, diff --git a/cre/go/tools/generator/cre_metadata.pb.go b/cre/go/tools/generator/cre_metadata.pb.go index 7026ea3f..655b2f0e 100644 --- a/cre/go/tools/generator/cre_metadata.pb.go +++ b/cre/go/tools/generator/cre_metadata.pb.go @@ -23,6 +23,52 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type AdditionalEnvironments int32 + +const ( + AdditionalEnvironments_ADDITIONAL_ENVIRONMENTS_UNSPECIFIED AdditionalEnvironments = 0 + AdditionalEnvironments_ADDITIONAL_ENVIRONMENTS_TEE AdditionalEnvironments = 1 +) + +// Enum value maps for AdditionalEnvironments. +var ( + AdditionalEnvironments_name = map[int32]string{ + 0: "ADDITIONAL_ENVIRONMENTS_UNSPECIFIED", + 1: "ADDITIONAL_ENVIRONMENTS_TEE", + } + AdditionalEnvironments_value = map[string]int32{ + "ADDITIONAL_ENVIRONMENTS_UNSPECIFIED": 0, + "ADDITIONAL_ENVIRONMENTS_TEE": 1, + } +) + +func (x AdditionalEnvironments) Enum() *AdditionalEnvironments { + p := new(AdditionalEnvironments) + *p = x + return p +} + +func (x AdditionalEnvironments) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AdditionalEnvironments) Descriptor() protoreflect.EnumDescriptor { + return file_tools_generator_v1alpha_cre_metadata_proto_enumTypes[0].Descriptor() +} + +func (AdditionalEnvironments) Type() protoreflect.EnumType { + return &file_tools_generator_v1alpha_cre_metadata_proto_enumTypes[0] +} + +func (x AdditionalEnvironments) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AdditionalEnvironments.Descriptor instead. +func (AdditionalEnvironments) EnumDescriptor() ([]byte, []int) { + return file_tools_generator_v1alpha_cre_metadata_proto_rawDescGZIP(), []int{0} +} + type StringLabel struct { state protoimpl.MessageState `protogen:"open.v1"` Defaults map[string]string `protobuf:"bytes,1,rep,name=defaults,proto3" json:"defaults,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` @@ -374,12 +420,13 @@ func (*Label_Uint32Label) isLabel_Kind() {} func (*Label_Int32Label) isLabel_Kind() {} type CapabilityMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - Mode sdk.Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=sdk.v1alpha.Mode" json:"mode,omitempty"` - CapabilityId string `protobuf:"bytes,2,opt,name=capability_id,json=capabilityId,proto3" json:"capability_id,omitempty"` - Labels map[string]*Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Mode sdk.Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=sdk.v1alpha.Mode" json:"mode,omitempty"` + CapabilityId string `protobuf:"bytes,2,opt,name=capability_id,json=capabilityId,proto3" json:"capability_id,omitempty"` + Labels map[string]*Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + AdditionalEnvironments []AdditionalEnvironments `protobuf:"varint,4,rep,packed,name=additional_environments,json=additionalEnvironments,proto3,enum=tools.generator.v1alpha.AdditionalEnvironments" json:"additional_environments,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CapabilityMetadata) Reset() { @@ -433,6 +480,13 @@ func (x *CapabilityMetadata) GetLabels() map[string]*Label { return nil } +func (x *CapabilityMetadata) GetAdditionalEnvironments() []AdditionalEnvironments { + if x != nil { + return x.AdditionalEnvironments + } + return nil +} + type CapabilityMethodMetadata struct { state protoimpl.MessageState `protogen:"open.v1"` MapToUntypedApi bool `protobuf:"varint,1,opt,name=map_to_untyped_api,json=mapToUntypedApi,proto3" json:"map_to_untyped_api,omitempty"` @@ -548,16 +602,20 @@ const file_tools_generator_v1alpha_cre_metadata_proto_rawDesc = "" + "\fuint32_label\x18\x04 \x01(\v2$.tools.generator.v1alpha.Uint32LabelH\x00R\vuint32Label\x12F\n" + "\vint32_label\x18\x05 \x01(\v2#.tools.generator.v1alpha.Int32LabelH\x00R\n" + "int32LabelB\x06\n" + - "\x04kind\"\x8c\x02\n" + + "\x04kind\"\xf6\x02\n" + "\x12CapabilityMetadata\x12%\n" + "\x04mode\x18\x01 \x01(\x0e2\x11.sdk.v1alpha.ModeR\x04mode\x12#\n" + "\rcapability_id\x18\x02 \x01(\tR\fcapabilityId\x12O\n" + - "\x06labels\x18\x03 \x03(\v27.tools.generator.v1alpha.CapabilityMetadata.LabelsEntryR\x06labels\x1aY\n" + + "\x06labels\x18\x03 \x03(\v27.tools.generator.v1alpha.CapabilityMetadata.LabelsEntryR\x06labels\x12h\n" + + "\x17additional_environments\x18\x04 \x03(\x0e2/.tools.generator.v1alpha.AdditionalEnvironmentsR\x16additionalEnvironments\x1aY\n" + "\vLabelsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x124\n" + "\x05value\x18\x02 \x01(\v2\x1e.tools.generator.v1alpha.LabelR\x05value:\x028\x01\"G\n" + "\x18CapabilityMethodMetadata\x12+\n" + - "\x12map_to_untyped_api\x18\x01 \x01(\bR\x0fmapToUntypedApi:n\n" + + "\x12map_to_untyped_api\x18\x01 \x01(\bR\x0fmapToUntypedApi*b\n" + + "\x16AdditionalEnvironments\x12'\n" + + "#ADDITIONAL_ENVIRONMENTS_UNSPECIFIED\x10\x00\x12\x1f\n" + + "\x1bADDITIONAL_ENVIRONMENTS_TEE\x10\x01:n\n" + "\n" + "capability\x12\x1f.google.protobuf.ServiceOptions\x18І\x03 \x01(\v2+.tools.generator.v1alpha.CapabilityMetadataR\n" + "capability:k\n" + @@ -575,49 +633,52 @@ func file_tools_generator_v1alpha_cre_metadata_proto_rawDescGZIP() []byte { return file_tools_generator_v1alpha_cre_metadata_proto_rawDescData } +var file_tools_generator_v1alpha_cre_metadata_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_tools_generator_v1alpha_cre_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_tools_generator_v1alpha_cre_metadata_proto_goTypes = []any{ - (*StringLabel)(nil), // 0: tools.generator.v1alpha.StringLabel - (*Uint64Label)(nil), // 1: tools.generator.v1alpha.Uint64Label - (*Uint32Label)(nil), // 2: tools.generator.v1alpha.Uint32Label - (*Int64Label)(nil), // 3: tools.generator.v1alpha.Int64Label - (*Int32Label)(nil), // 4: tools.generator.v1alpha.Int32Label - (*Label)(nil), // 5: tools.generator.v1alpha.Label - (*CapabilityMetadata)(nil), // 6: tools.generator.v1alpha.CapabilityMetadata - (*CapabilityMethodMetadata)(nil), // 7: tools.generator.v1alpha.CapabilityMethodMetadata - nil, // 8: tools.generator.v1alpha.StringLabel.DefaultsEntry - nil, // 9: tools.generator.v1alpha.Uint64Label.DefaultsEntry - nil, // 10: tools.generator.v1alpha.Uint32Label.DefaultsEntry - nil, // 11: tools.generator.v1alpha.Int64Label.DefaultsEntry - nil, // 12: tools.generator.v1alpha.Int32Label.DefaultsEntry - nil, // 13: tools.generator.v1alpha.CapabilityMetadata.LabelsEntry - (sdk.Mode)(0), // 14: sdk.v1alpha.Mode - (*descriptorpb.ServiceOptions)(nil), // 15: google.protobuf.ServiceOptions - (*descriptorpb.MethodOptions)(nil), // 16: google.protobuf.MethodOptions + (AdditionalEnvironments)(0), // 0: tools.generator.v1alpha.AdditionalEnvironments + (*StringLabel)(nil), // 1: tools.generator.v1alpha.StringLabel + (*Uint64Label)(nil), // 2: tools.generator.v1alpha.Uint64Label + (*Uint32Label)(nil), // 3: tools.generator.v1alpha.Uint32Label + (*Int64Label)(nil), // 4: tools.generator.v1alpha.Int64Label + (*Int32Label)(nil), // 5: tools.generator.v1alpha.Int32Label + (*Label)(nil), // 6: tools.generator.v1alpha.Label + (*CapabilityMetadata)(nil), // 7: tools.generator.v1alpha.CapabilityMetadata + (*CapabilityMethodMetadata)(nil), // 8: tools.generator.v1alpha.CapabilityMethodMetadata + nil, // 9: tools.generator.v1alpha.StringLabel.DefaultsEntry + nil, // 10: tools.generator.v1alpha.Uint64Label.DefaultsEntry + nil, // 11: tools.generator.v1alpha.Uint32Label.DefaultsEntry + nil, // 12: tools.generator.v1alpha.Int64Label.DefaultsEntry + nil, // 13: tools.generator.v1alpha.Int32Label.DefaultsEntry + nil, // 14: tools.generator.v1alpha.CapabilityMetadata.LabelsEntry + (sdk.Mode)(0), // 15: sdk.v1alpha.Mode + (*descriptorpb.ServiceOptions)(nil), // 16: google.protobuf.ServiceOptions + (*descriptorpb.MethodOptions)(nil), // 17: google.protobuf.MethodOptions } var file_tools_generator_v1alpha_cre_metadata_proto_depIdxs = []int32{ - 8, // 0: tools.generator.v1alpha.StringLabel.defaults:type_name -> tools.generator.v1alpha.StringLabel.DefaultsEntry - 9, // 1: tools.generator.v1alpha.Uint64Label.defaults:type_name -> tools.generator.v1alpha.Uint64Label.DefaultsEntry - 10, // 2: tools.generator.v1alpha.Uint32Label.defaults:type_name -> tools.generator.v1alpha.Uint32Label.DefaultsEntry - 11, // 3: tools.generator.v1alpha.Int64Label.defaults:type_name -> tools.generator.v1alpha.Int64Label.DefaultsEntry - 12, // 4: tools.generator.v1alpha.Int32Label.defaults:type_name -> tools.generator.v1alpha.Int32Label.DefaultsEntry - 0, // 5: tools.generator.v1alpha.Label.string_label:type_name -> tools.generator.v1alpha.StringLabel - 1, // 6: tools.generator.v1alpha.Label.uint64_label:type_name -> tools.generator.v1alpha.Uint64Label - 3, // 7: tools.generator.v1alpha.Label.int64_label:type_name -> tools.generator.v1alpha.Int64Label - 2, // 8: tools.generator.v1alpha.Label.uint32_label:type_name -> tools.generator.v1alpha.Uint32Label - 4, // 9: tools.generator.v1alpha.Label.int32_label:type_name -> tools.generator.v1alpha.Int32Label - 14, // 10: tools.generator.v1alpha.CapabilityMetadata.mode:type_name -> sdk.v1alpha.Mode - 13, // 11: tools.generator.v1alpha.CapabilityMetadata.labels:type_name -> tools.generator.v1alpha.CapabilityMetadata.LabelsEntry - 5, // 12: tools.generator.v1alpha.CapabilityMetadata.LabelsEntry.value:type_name -> tools.generator.v1alpha.Label - 15, // 13: tools.generator.v1alpha.capability:extendee -> google.protobuf.ServiceOptions - 16, // 14: tools.generator.v1alpha.method:extendee -> google.protobuf.MethodOptions - 6, // 15: tools.generator.v1alpha.capability:type_name -> tools.generator.v1alpha.CapabilityMetadata - 7, // 16: tools.generator.v1alpha.method:type_name -> tools.generator.v1alpha.CapabilityMethodMetadata - 17, // [17:17] is the sub-list for method output_type - 17, // [17:17] is the sub-list for method input_type - 15, // [15:17] is the sub-list for extension type_name - 13, // [13:15] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 9, // 0: tools.generator.v1alpha.StringLabel.defaults:type_name -> tools.generator.v1alpha.StringLabel.DefaultsEntry + 10, // 1: tools.generator.v1alpha.Uint64Label.defaults:type_name -> tools.generator.v1alpha.Uint64Label.DefaultsEntry + 11, // 2: tools.generator.v1alpha.Uint32Label.defaults:type_name -> tools.generator.v1alpha.Uint32Label.DefaultsEntry + 12, // 3: tools.generator.v1alpha.Int64Label.defaults:type_name -> tools.generator.v1alpha.Int64Label.DefaultsEntry + 13, // 4: tools.generator.v1alpha.Int32Label.defaults:type_name -> tools.generator.v1alpha.Int32Label.DefaultsEntry + 1, // 5: tools.generator.v1alpha.Label.string_label:type_name -> tools.generator.v1alpha.StringLabel + 2, // 6: tools.generator.v1alpha.Label.uint64_label:type_name -> tools.generator.v1alpha.Uint64Label + 4, // 7: tools.generator.v1alpha.Label.int64_label:type_name -> tools.generator.v1alpha.Int64Label + 3, // 8: tools.generator.v1alpha.Label.uint32_label:type_name -> tools.generator.v1alpha.Uint32Label + 5, // 9: tools.generator.v1alpha.Label.int32_label:type_name -> tools.generator.v1alpha.Int32Label + 15, // 10: tools.generator.v1alpha.CapabilityMetadata.mode:type_name -> sdk.v1alpha.Mode + 14, // 11: tools.generator.v1alpha.CapabilityMetadata.labels:type_name -> tools.generator.v1alpha.CapabilityMetadata.LabelsEntry + 0, // 12: tools.generator.v1alpha.CapabilityMetadata.additional_environments:type_name -> tools.generator.v1alpha.AdditionalEnvironments + 6, // 13: tools.generator.v1alpha.CapabilityMetadata.LabelsEntry.value:type_name -> tools.generator.v1alpha.Label + 16, // 14: tools.generator.v1alpha.capability:extendee -> google.protobuf.ServiceOptions + 17, // 15: tools.generator.v1alpha.method:extendee -> google.protobuf.MethodOptions + 7, // 16: tools.generator.v1alpha.capability:type_name -> tools.generator.v1alpha.CapabilityMetadata + 8, // 17: tools.generator.v1alpha.method:type_name -> tools.generator.v1alpha.CapabilityMethodMetadata + 18, // [18:18] is the sub-list for method output_type + 18, // [18:18] is the sub-list for method input_type + 16, // [16:18] is the sub-list for extension type_name + 14, // [14:16] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_tools_generator_v1alpha_cre_metadata_proto_init() } @@ -637,13 +698,14 @@ func file_tools_generator_v1alpha_cre_metadata_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_tools_generator_v1alpha_cre_metadata_proto_rawDesc), len(file_tools_generator_v1alpha_cre_metadata_proto_rawDesc)), - NumEnums: 0, + NumEnums: 1, NumMessages: 14, NumExtensions: 2, NumServices: 0, }, GoTypes: file_tools_generator_v1alpha_cre_metadata_proto_goTypes, DependencyIndexes: file_tools_generator_v1alpha_cre_metadata_proto_depIdxs, + EnumInfos: file_tools_generator_v1alpha_cre_metadata_proto_enumTypes, MessageInfos: file_tools_generator_v1alpha_cre_metadata_proto_msgTypes, ExtensionInfos: file_tools_generator_v1alpha_cre_metadata_proto_extTypes, }.Build() diff --git a/cre/sdk/v1alpha/sdk.proto b/cre/sdk/v1alpha/sdk.proto index 2117e2d8..2367ea11 100644 --- a/cre/sdk/v1alpha/sdk.proto +++ b/cre/sdk/v1alpha/sdk.proto @@ -79,6 +79,18 @@ message TriggerSubscription { string id = 1; google.protobuf.Any payload = 2; string method = 3; + Requirements requirements = 4; + bool pre_hook = 5; +} + +enum TeeType { + TEE_TYPE_UNSPECIFIED = 0; + TEE_TYPE_AWS_NITRO = 1; +} + +message TeeTypeAndRegions { + TeeType type = 1; + repeated string regions = 3; } message TriggerSubscriptionRequest { @@ -90,6 +102,25 @@ message Trigger { google.protobuf.Any payload = 2; } +message Regions { + repeated string regions = 1; +} + +message TeeTypesAndRegions { + repeated TeeTypeAndRegions tee_type_and_regions = 1; +} + +message Tee { + oneof item { + Regions any_regions = 1; + TeeTypesAndRegions tee_types_and_regions = 2; + } +} + +message Requirements { + Tee tee = 1; +} + message AwaitCapabilitiesRequest { repeated int32 ids = 1; } @@ -102,6 +133,7 @@ message ExecuteRequest { oneof request { google.protobuf.Empty subscribe = 2; Trigger trigger = 3; + Trigger pre_hook = 5; } uint64 max_response_size = 4; } @@ -111,6 +143,7 @@ message ExecutionResult { values.v1.Value value = 1; string error = 2; TriggerSubscriptionRequest trigger_subscriptions = 3; + Restrictions restrictions = 4; } } @@ -156,3 +189,49 @@ message SecretResponse { message SecretResponses { repeated SecretResponse responses = 1; } + +message MethodRestriction { + string id = 1; + string method = 2; + uint32 max_calls = 3; +} + +message CapabilityRestriction { + oneof restriction { + MethodRestriction method = 1; + } +} + +enum CapabilityRestrictionType { + CAPABILITY_RESTRICTION_TYPE_CLOSED = 0; + CAPABILITY_RESTRICTION_TYPE_OPEN = 1; +} + +message CapabilityRestrictions { + repeated CapabilityRestriction restrictions = 1; + uint32 max_total_calls = 2; + CapabilityRestrictionType type = 3; +} + +message SecretPrefixRestriction { + string prefix = 1; + string namespace = 2; + uint32 max_secrets = 3; +} + +message SecretRestriction { + oneof restriction { + Secret exact_secret = 1; + SecretPrefixRestriction prefixed_secret = 2; + } +} + +message SecretsRestritions { + repeated SecretRestriction restrictions = 1; + uint32 max_secrets = 2; +} + +message Restrictions { + SecretsRestritions secrets = 1; + CapabilityRestrictions capabilities = 2; +} diff --git a/cre/tools/generator/v1alpha/cre_metadata.proto b/cre/tools/generator/v1alpha/cre_metadata.proto index cc947db8..25b1f301 100644 --- a/cre/tools/generator/v1alpha/cre_metadata.proto +++ b/cre/tools/generator/v1alpha/cre_metadata.proto @@ -35,10 +35,16 @@ message Label { } } +enum AdditionalEnvironments { + ADDITIONAL_ENVIRONMENTS_UNSPECIFIED = 0; + ADDITIONAL_ENVIRONMENTS_TEE = 1; +} + message CapabilityMetadata { sdk.v1alpha.Mode mode = 1; string capability_id = 2; map labels = 3; + repeated AdditionalEnvironments additional_environments = 4; } extend google.protobuf.ServiceOptions {