go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/resultdb/proto/config/project_config.pb.go (about) 1 // Copyright 2022 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Code generated by protoc-gen-go. DO NOT EDIT. 16 // versions: 17 // protoc-gen-go v1.31.0 18 // protoc v3.21.7 19 // source: go.chromium.org/luci/resultdb/proto/config/project_config.proto 20 21 package resultpb 22 23 import ( 24 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 25 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 26 reflect "reflect" 27 sync "sync" 28 ) 29 30 const ( 31 // Verify that this generated code is sufficiently up-to-date. 32 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 33 // Verify that runtime/protoimpl is sufficiently up-to-date. 34 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 35 ) 36 37 // ProjectConfig is the project-specific configuration data for Luci ResultDB. 38 type ProjectConfig struct { 39 state protoimpl.MessageState 40 sizeCache protoimpl.SizeCache 41 unknownFields protoimpl.UnknownFields 42 43 // Per user allow list to control GCS buckets that can be referenced as 44 // artifacts in ResultDB invocations. 45 // Since ResultDB returns GCS artifacts through signed urls, the allow list 46 // is needed to prevent potential exploit where user could gain access to 47 // artifacts in GCS buckets they don't have access to by feigning the 48 // uploaded artifact GCS path. 49 GcsAllowList []*GcsAllowList `protobuf:"bytes,1,rep,name=gcs_allow_list,json=gcsAllowList,proto3" json:"gcs_allow_list,omitempty"` 50 } 51 52 func (x *ProjectConfig) Reset() { 53 *x = ProjectConfig{} 54 if protoimpl.UnsafeEnabled { 55 mi := &file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_msgTypes[0] 56 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 57 ms.StoreMessageInfo(mi) 58 } 59 } 60 61 func (x *ProjectConfig) String() string { 62 return protoimpl.X.MessageStringOf(x) 63 } 64 65 func (*ProjectConfig) ProtoMessage() {} 66 67 func (x *ProjectConfig) ProtoReflect() protoreflect.Message { 68 mi := &file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_msgTypes[0] 69 if protoimpl.UnsafeEnabled && x != nil { 70 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 71 if ms.LoadMessageInfo() == nil { 72 ms.StoreMessageInfo(mi) 73 } 74 return ms 75 } 76 return mi.MessageOf(x) 77 } 78 79 // Deprecated: Use ProjectConfig.ProtoReflect.Descriptor instead. 80 func (*ProjectConfig) Descriptor() ([]byte, []int) { 81 return file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDescGZIP(), []int{0} 82 } 83 84 func (x *ProjectConfig) GetGcsAllowList() []*GcsAllowList { 85 if x != nil { 86 return x.GcsAllowList 87 } 88 return nil 89 } 90 91 // Capture the per user GCS bucket allow list. 92 type GcsAllowList struct { 93 state protoimpl.MessageState 94 sizeCache protoimpl.SizeCache 95 unknownFields protoimpl.UnknownFields 96 97 // The users allowed to reference the specified buckets. 98 // Each user is a LUCI Auth identity string, e.g. user:username@email.com 99 // For all available identity kinds see luci/auth/identity/identity.go 100 Users []string `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` 101 // GCS buckets the user is allowed to reference. 102 Buckets []string `protobuf:"bytes,2,rep,name=buckets,proto3" json:"buckets,omitempty"` 103 } 104 105 func (x *GcsAllowList) Reset() { 106 *x = GcsAllowList{} 107 if protoimpl.UnsafeEnabled { 108 mi := &file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_msgTypes[1] 109 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 110 ms.StoreMessageInfo(mi) 111 } 112 } 113 114 func (x *GcsAllowList) String() string { 115 return protoimpl.X.MessageStringOf(x) 116 } 117 118 func (*GcsAllowList) ProtoMessage() {} 119 120 func (x *GcsAllowList) ProtoReflect() protoreflect.Message { 121 mi := &file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_msgTypes[1] 122 if protoimpl.UnsafeEnabled && x != nil { 123 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 124 if ms.LoadMessageInfo() == nil { 125 ms.StoreMessageInfo(mi) 126 } 127 return ms 128 } 129 return mi.MessageOf(x) 130 } 131 132 // Deprecated: Use GcsAllowList.ProtoReflect.Descriptor instead. 133 func (*GcsAllowList) Descriptor() ([]byte, []int) { 134 return file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDescGZIP(), []int{1} 135 } 136 137 func (x *GcsAllowList) GetUsers() []string { 138 if x != nil { 139 return x.Users 140 } 141 return nil 142 } 143 144 func (x *GcsAllowList) GetBuckets() []string { 145 if x != nil { 146 return x.Buckets 147 } 148 return nil 149 } 150 151 var File_go_chromium_org_luci_resultdb_proto_config_project_config_proto protoreflect.FileDescriptor 152 153 var file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDesc = []byte{ 154 0x0a, 0x3f, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 155 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64, 0x62, 0x2f, 156 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x70, 0x72, 0x6f, 157 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 158 0x6f, 0x12, 0x14, 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64, 0x62, 159 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x59, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x6a, 0x65, 160 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48, 0x0a, 0x0e, 0x67, 0x63, 0x73, 0x5f, 161 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 162 0x32, 0x22, 0x2e, 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64, 0x62, 163 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 164 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0c, 0x67, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 165 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x0c, 0x47, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 166 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 167 0x09, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 168 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 169 0x74, 0x73, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 170 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x6c, 171 0x74, 0x64, 0x62, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 172 0x3b, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 173 0x33, 174 } 175 176 var ( 177 file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDescOnce sync.Once 178 file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDescData = file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDesc 179 ) 180 181 func file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDescGZIP() []byte { 182 file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDescOnce.Do(func() { 183 file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDescData) 184 }) 185 return file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDescData 186 } 187 188 var file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 189 var file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_goTypes = []interface{}{ 190 (*ProjectConfig)(nil), // 0: luci.resultdb.config.ProjectConfig 191 (*GcsAllowList)(nil), // 1: luci.resultdb.config.GcsAllowList 192 } 193 var file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_depIdxs = []int32{ 194 1, // 0: luci.resultdb.config.ProjectConfig.gcs_allow_list:type_name -> luci.resultdb.config.GcsAllowList 195 1, // [1:1] is the sub-list for method output_type 196 1, // [1:1] is the sub-list for method input_type 197 1, // [1:1] is the sub-list for extension type_name 198 1, // [1:1] is the sub-list for extension extendee 199 0, // [0:1] is the sub-list for field type_name 200 } 201 202 func init() { file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_init() } 203 func file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_init() { 204 if File_go_chromium_org_luci_resultdb_proto_config_project_config_proto != nil { 205 return 206 } 207 if !protoimpl.UnsafeEnabled { 208 file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 209 switch v := v.(*ProjectConfig); i { 210 case 0: 211 return &v.state 212 case 1: 213 return &v.sizeCache 214 case 2: 215 return &v.unknownFields 216 default: 217 return nil 218 } 219 } 220 file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 221 switch v := v.(*GcsAllowList); i { 222 case 0: 223 return &v.state 224 case 1: 225 return &v.sizeCache 226 case 2: 227 return &v.unknownFields 228 default: 229 return nil 230 } 231 } 232 } 233 type x struct{} 234 out := protoimpl.TypeBuilder{ 235 File: protoimpl.DescBuilder{ 236 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 237 RawDescriptor: file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDesc, 238 NumEnums: 0, 239 NumMessages: 2, 240 NumExtensions: 0, 241 NumServices: 0, 242 }, 243 GoTypes: file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_goTypes, 244 DependencyIndexes: file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_depIdxs, 245 MessageInfos: file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_msgTypes, 246 }.Build() 247 File_go_chromium_org_luci_resultdb_proto_config_project_config_proto = out.File 248 file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_rawDesc = nil 249 file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_goTypes = nil 250 file_go_chromium_org_luci_resultdb_proto_config_project_config_proto_depIdxs = nil 251 }