From 0f02c412af2f3e1adfda41e5c2cdd5badb135713 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 15 Jan 2024 18:58:48 -0500 Subject: [PATCH] feat: add top-level compliance_profile field This abstracts provider-specific compliance settings away so customers can just tick a single box and have that apply to their infrastructure regardless of their specified cloud. --- generated/go/porter/v1/contract.pb.go | 178 ++++++++++++++------ generated/js/src/porter/v1/contract_pb.d.ts | 39 +++++ generated/js/src/porter/v1/contract_pb.js | 13 ++ porter/v1/contract.proto | 10 ++ 4 files changed, 192 insertions(+), 48 deletions(-) diff --git a/generated/go/porter/v1/contract.pb.go b/generated/go/porter/v1/contract.pb.go index 614070fd..9ec9f8c4 100644 --- a/generated/go/porter/v1/contract.pb.go +++ b/generated/go/porter/v1/contract.pb.go @@ -26,8 +26,12 @@ type Contract struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // cluster is a cluster object Cluster *Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + // user is the user that triggered a contract create/update + User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + // compliance_profile is the compliance profile that the cluster should be configured with + ComplianceProfile *ComplianceProfile `protobuf:"bytes,3,opt,name=compliance_profile,json=complianceProfile,proto3" json:"compliance_profile,omitempty"` } func (x *Contract) Reset() { @@ -76,6 +80,62 @@ func (x *Contract) GetUser() *User { return nil } +func (x *Contract) GetComplianceProfile() *ComplianceProfile { + if x != nil { + return x.ComplianceProfile + } + return nil +} + +// ComplianceProfile +type ComplianceProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // soc2_type1 is a boolean that represents whether the cluster should be configured with SOC2 Type 1 + Soc2Type1 bool `protobuf:"varint,1,opt,name=soc2_type1,json=soc2Type1,proto3" json:"soc2_type1,omitempty"` +} + +func (x *ComplianceProfile) Reset() { + *x = ComplianceProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_porter_v1_contract_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComplianceProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComplianceProfile) ProtoMessage() {} + +func (x *ComplianceProfile) ProtoReflect() protoreflect.Message { + mi := &file_porter_v1_contract_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ComplianceProfile.ProtoReflect.Descriptor instead. +func (*ComplianceProfile) Descriptor() ([]byte, []int) { + return file_porter_v1_contract_proto_rawDescGZIP(), []int{1} +} + +func (x *ComplianceProfile) GetSoc2Type1() bool { + if x != nil { + return x.Soc2Type1 + } + return false +} + // ContractRevision represents a contract revision which should be acted upon, depending on the stream // that is was passed through. This approach goes against microservice architectures, by expecting every consumer // to read the specific contract from the database @@ -95,7 +155,7 @@ type ContractRevision struct { func (x *ContractRevision) Reset() { *x = ContractRevision{} if protoimpl.UnsafeEnabled { - mi := &file_porter_v1_contract_proto_msgTypes[1] + mi := &file_porter_v1_contract_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -108,7 +168,7 @@ func (x *ContractRevision) String() string { func (*ContractRevision) ProtoMessage() {} func (x *ContractRevision) ProtoReflect() protoreflect.Message { - mi := &file_porter_v1_contract_proto_msgTypes[1] + mi := &file_porter_v1_contract_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -121,7 +181,7 @@ func (x *ContractRevision) ProtoReflect() protoreflect.Message { // Deprecated: Use ContractRevision.ProtoReflect.Descriptor instead. func (*ContractRevision) Descriptor() ([]byte, []int) { - return file_porter_v1_contract_proto_rawDescGZIP(), []int{1} + return file_porter_v1_contract_proto_rawDescGZIP(), []int{2} } func (x *ContractRevision) GetClusterId() int32 { @@ -157,7 +217,7 @@ type User struct { func (x *User) Reset() { *x = User{} if protoimpl.UnsafeEnabled { - mi := &file_porter_v1_contract_proto_msgTypes[2] + mi := &file_porter_v1_contract_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -170,7 +230,7 @@ func (x *User) String() string { func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { - mi := &file_porter_v1_contract_proto_msgTypes[2] + mi := &file_porter_v1_contract_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -183,7 +243,7 @@ func (x *User) ProtoReflect() protoreflect.Message { // Deprecated: Use User.ProtoReflect.Descriptor instead. func (*User) Descriptor() ([]byte, []int) { - return file_porter_v1_contract_proto_rawDescGZIP(), []int{2} + return file_porter_v1_contract_proto_rawDescGZIP(), []int{3} } func (x *User) GetId() int32 { @@ -199,33 +259,41 @@ var file_porter_v1_contract_proto_rawDesc = []byte{ 0x0a, 0x18, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, - 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, - 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x71, 0x0a, - 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0x16, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x42, 0xa8, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, - 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2d, 0x64, - 0x65, 0x76, 0x2f, 0x61, 0x70, 0x69, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, - 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x15, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, + 0x01, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x4b, + 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, + 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x32, 0x0a, 0x11, 0x43, + 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x63, 0x32, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x31, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x32, 0x54, 0x79, 0x70, 0x65, 0x31, 0x22, + 0x71, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x22, 0x16, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x42, 0xa8, 0x01, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x70, 0x69, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x67, 0x6f, 0x2f, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x65, + 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x15, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x65, + 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -240,21 +308,23 @@ func file_porter_v1_contract_proto_rawDescGZIP() []byte { return file_porter_v1_contract_proto_rawDescData } -var file_porter_v1_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_porter_v1_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_porter_v1_contract_proto_goTypes = []interface{}{ - (*Contract)(nil), // 0: porter.v1.Contract - (*ContractRevision)(nil), // 1: porter.v1.ContractRevision - (*User)(nil), // 2: porter.v1.User - (*Cluster)(nil), // 3: porter.v1.Cluster + (*Contract)(nil), // 0: porter.v1.Contract + (*ComplianceProfile)(nil), // 1: porter.v1.ComplianceProfile + (*ContractRevision)(nil), // 2: porter.v1.ContractRevision + (*User)(nil), // 3: porter.v1.User + (*Cluster)(nil), // 4: porter.v1.Cluster } var file_porter_v1_contract_proto_depIdxs = []int32{ - 3, // 0: porter.v1.Contract.cluster:type_name -> porter.v1.Cluster - 2, // 1: porter.v1.Contract.user:type_name -> porter.v1.User - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 4, // 0: porter.v1.Contract.cluster:type_name -> porter.v1.Cluster + 3, // 1: porter.v1.Contract.user:type_name -> porter.v1.User + 1, // 2: porter.v1.Contract.compliance_profile:type_name -> porter.v1.ComplianceProfile + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_porter_v1_contract_proto_init() } @@ -277,7 +347,7 @@ func file_porter_v1_contract_proto_init() { } } file_porter_v1_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContractRevision); i { + switch v := v.(*ComplianceProfile); i { case 0: return &v.state case 1: @@ -289,6 +359,18 @@ func file_porter_v1_contract_proto_init() { } } file_porter_v1_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContractRevision); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_porter_v1_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*User); i { case 0: return &v.state @@ -307,7 +389,7 @@ func file_porter_v1_contract_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_porter_v1_contract_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/generated/js/src/porter/v1/contract_pb.d.ts b/generated/js/src/porter/v1/contract_pb.d.ts index f7c166c3..e7efa0b9 100644 --- a/generated/js/src/porter/v1/contract_pb.d.ts +++ b/generated/js/src/porter/v1/contract_pb.d.ts @@ -14,15 +14,26 @@ import type { Cluster } from "./cluster_pb.js"; */ export declare class Contract extends Message { /** + * cluster is a cluster object + * * @generated from field: porter.v1.Cluster cluster = 1; */ cluster?: Cluster; /** + * user is the user that triggered a contract create/update + * * @generated from field: porter.v1.User user = 2; */ user?: User; + /** + * compliance_profile is the compliance profile that the cluster should be configured with + * + * @generated from field: porter.v1.ComplianceProfile compliance_profile = 3; + */ + complianceProfile?: ComplianceProfile; + constructor(data?: PartialMessage); static readonly runtime: typeof proto3; @@ -38,6 +49,34 @@ export declare class Contract extends Message { static equals(a: Contract | PlainMessage | undefined, b: Contract | PlainMessage | undefined): boolean; } +/** + * ComplianceProfile + * + * @generated from message porter.v1.ComplianceProfile + */ +export declare class ComplianceProfile extends Message { + /** + * soc2_type1 is a boolean that represents whether the cluster should be configured with SOC2 Type 1 + * + * @generated from field: bool soc2_type1 = 1; + */ + soc2Type1: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "porter.v1.ComplianceProfile"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ComplianceProfile; + + static fromJson(jsonValue: JsonValue, options?: Partial): ComplianceProfile; + + static fromJsonString(jsonString: string, options?: Partial): ComplianceProfile; + + static equals(a: ComplianceProfile | PlainMessage | undefined, b: ComplianceProfile | PlainMessage | undefined): boolean; +} + /** * ContractRevision represents a contract revision which should be acted upon, depending on the stream * that is was passed through. This approach goes against microservice architectures, by expecting every consumer diff --git a/generated/js/src/porter/v1/contract_pb.js b/generated/js/src/porter/v1/contract_pb.js index fbf96e17..ada278d2 100644 --- a/generated/js/src/porter/v1/contract_pb.js +++ b/generated/js/src/porter/v1/contract_pb.js @@ -16,6 +16,19 @@ export const Contract = proto3.makeMessageType( () => [ { no: 1, name: "cluster", kind: "message", T: Cluster }, { no: 2, name: "user", kind: "message", T: User }, + { no: 3, name: "compliance_profile", kind: "message", T: ComplianceProfile }, + ], +); + +/** + * ComplianceProfile + * + * @generated from message porter.v1.ComplianceProfile + */ +export const ComplianceProfile = proto3.makeMessageType( + "porter.v1.ComplianceProfile", + () => [ + { no: 1, name: "soc2_type1", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, ], ); diff --git a/porter/v1/contract.proto b/porter/v1/contract.proto index 8b5c8df1..ff8ca153 100644 --- a/porter/v1/contract.proto +++ b/porter/v1/contract.proto @@ -6,8 +6,18 @@ import "porter/v1/cluster.proto"; // Contract represents the API contract for Porter, commonly known as "porter.yaml" message Contract { + // cluster is a cluster object Cluster cluster = 1; + // user is the user that triggered a contract create/update User user = 2; + // compliance_profile is the compliance profile that the cluster should be configured with + ComplianceProfile compliance_profile = 3; +} + +// ComplianceProfile +message ComplianceProfile { + // soc2_type1 is a boolean that represents whether the cluster should be configured with SOC2 Type 1 + bool soc2_type1 = 1; } // ContractRevision represents a contract revision which should be acted upon, depending on the stream