forwarder/proto/security_report.pb.go (277 lines of code) (raw):
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.12.4
// source: security_report.proto
package securityreport
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Policy disposition
type SecurityReport_Disposition int32
const (
SecurityReport_DISPOSITION_UNKNOWN SecurityReport_Disposition = 0
SecurityReport_REPORTING SecurityReport_Disposition = 1
SecurityReport_ENFORCED SecurityReport_Disposition = 2
)
// Enum value maps for SecurityReport_Disposition.
var (
SecurityReport_Disposition_name = map[int32]string{
0: "DISPOSITION_UNKNOWN",
1: "REPORTING",
2: "ENFORCED",
}
SecurityReport_Disposition_value = map[string]int32{
"DISPOSITION_UNKNOWN": 0,
"REPORTING": 1,
"ENFORCED": 2,
}
)
func (x SecurityReport_Disposition) Enum() *SecurityReport_Disposition {
p := new(SecurityReport_Disposition)
*p = x
return p
}
func (x SecurityReport_Disposition) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SecurityReport_Disposition) Descriptor() protoreflect.EnumDescriptor {
return file_security_report_proto_enumTypes[0].Descriptor()
}
func (SecurityReport_Disposition) Type() protoreflect.EnumType {
return &file_security_report_proto_enumTypes[0]
}
func (x SecurityReport_Disposition) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SecurityReport_Disposition.Descriptor instead.
func (SecurityReport_Disposition) EnumDescriptor() ([]byte, []int) {
return file_security_report_proto_rawDescGZIP(), []int{0, 0}
}
type SecurityReport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// This report's checksum is computed according to the subtype of the
// report. Used for deduplication.
ReportChecksum string `protobuf:"bytes,1,opt,name=report_checksum,json=reportChecksum,proto3" json:"report_checksum,omitempty"`
// When was this report generated? (milliseconds)
ReportTime int64 `protobuf:"varint,2,opt,name=report_time,json=reportTime,proto3" json:"report_time,omitempty"`
// Number of times we saw this report (always 1 until aggregation happens)
ReportCount int64 `protobuf:"varint,3,opt,name=report_count,json=reportCount,proto3" json:"report_count,omitempty"`
// Unparsed UA + parsed browser name and major version
UserAgent string `protobuf:"bytes,4,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
BrowserName string `protobuf:"bytes,5,opt,name=browser_name,json=browserName,proto3" json:"browser_name,omitempty"`
BrowserMajorVersion int32 `protobuf:"varint,6,opt,name=browser_major_version,json=browserMajorVersion,proto3" json:"browser_major_version,omitempty"`
Disposition SecurityReport_Disposition `protobuf:"varint,7,opt,name=disposition,proto3,enum=securityreport.SecurityReport_Disposition" json:"disposition,omitempty"`
// this field will hold an extension of the base SecurityReport,
// only one extension can be set for any given request
//
// Types that are assignable to ReportExtension:
// *SecurityReport_CspReport
// *SecurityReport_DeprecationReport
ReportExtension isSecurityReport_ReportExtension `protobuf_oneof:"ReportExtension"`
}
func (x *SecurityReport) Reset() {
*x = SecurityReport{}
if protoimpl.UnsafeEnabled {
mi := &file_security_report_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SecurityReport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SecurityReport) ProtoMessage() {}
func (x *SecurityReport) ProtoReflect() protoreflect.Message {
mi := &file_security_report_proto_msgTypes[0]
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 SecurityReport.ProtoReflect.Descriptor instead.
func (*SecurityReport) Descriptor() ([]byte, []int) {
return file_security_report_proto_rawDescGZIP(), []int{0}
}
func (x *SecurityReport) GetReportChecksum() string {
if x != nil {
return x.ReportChecksum
}
return ""
}
func (x *SecurityReport) GetReportTime() int64 {
if x != nil {
return x.ReportTime
}
return 0
}
func (x *SecurityReport) GetReportCount() int64 {
if x != nil {
return x.ReportCount
}
return 0
}
func (x *SecurityReport) GetUserAgent() string {
if x != nil {
return x.UserAgent
}
return ""
}
func (x *SecurityReport) GetBrowserName() string {
if x != nil {
return x.BrowserName
}
return ""
}
func (x *SecurityReport) GetBrowserMajorVersion() int32 {
if x != nil {
return x.BrowserMajorVersion
}
return 0
}
func (x *SecurityReport) GetDisposition() SecurityReport_Disposition {
if x != nil {
return x.Disposition
}
return SecurityReport_DISPOSITION_UNKNOWN
}
func (m *SecurityReport) GetReportExtension() isSecurityReport_ReportExtension {
if m != nil {
return m.ReportExtension
}
return nil
}
func (x *SecurityReport) GetCspReport() *CspReport {
if x, ok := x.GetReportExtension().(*SecurityReport_CspReport); ok {
return x.CspReport
}
return nil
}
func (x *SecurityReport) GetDeprecationReport() *DeprecationReport {
if x, ok := x.GetReportExtension().(*SecurityReport_DeprecationReport); ok {
return x.DeprecationReport
}
return nil
}
type isSecurityReport_ReportExtension interface {
isSecurityReport_ReportExtension()
}
type SecurityReport_CspReport struct {
CspReport *CspReport `protobuf:"bytes,8,opt,name=csp_report,json=cspReport,proto3,oneof"`
}
type SecurityReport_DeprecationReport struct {
DeprecationReport *DeprecationReport `protobuf:"bytes,9,opt,name=deprecation_report,json=deprecationReport,proto3,oneof"`
}
func (*SecurityReport_CspReport) isSecurityReport_ReportExtension() {}
func (*SecurityReport_DeprecationReport) isSecurityReport_ReportExtension() {}
var File_security_report_proto protoreflect.FileDescriptor
var file_security_report_proto_rawDesc = []byte{
0x0a, 0x15, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72,
0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
0x79, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x13, 0x63, 0x73, 0x70, 0x5f, 0x76, 0x69, 0x6f,
0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x64, 0x65,
0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x04, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72,
0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70,
0x6f, 0x72, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73,
0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54,
0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6f, 0x72,
0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61,
0x67, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72,
0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72,
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x72, 0x6f,
0x77, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x62, 0x72, 0x6f, 0x77,
0x73, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72,
0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x0b,
0x64, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x2a, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x72, 0x65, 0x70, 0x6f,
0x72, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72,
0x74, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64,
0x69, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x73,
0x70, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e,
0x43, 0x73, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x09, 0x63, 0x73, 0x70,
0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x52, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x72, 0x65, 0x70,
0x6f, 0x72, 0x74, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x11, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x43, 0x0a, 0x0b, 0x44, 0x69,
0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x49, 0x53,
0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x49, 0x4e, 0x47, 0x10,
0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x10, 0x02, 0x42,
0x11, 0x0a, 0x0f, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x3b, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
0x79, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_security_report_proto_rawDescOnce sync.Once
file_security_report_proto_rawDescData = file_security_report_proto_rawDesc
)
func file_security_report_proto_rawDescGZIP() []byte {
file_security_report_proto_rawDescOnce.Do(func() {
file_security_report_proto_rawDescData = protoimpl.X.CompressGZIP(file_security_report_proto_rawDescData)
})
return file_security_report_proto_rawDescData
}
var file_security_report_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_security_report_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_security_report_proto_goTypes = []interface{}{
(SecurityReport_Disposition)(0), // 0: securityreport.SecurityReport.Disposition
(*SecurityReport)(nil), // 1: securityreport.SecurityReport
(*CspReport)(nil), // 2: securityreport.CspReport
(*DeprecationReport)(nil), // 3: securityreport.DeprecationReport
}
var file_security_report_proto_depIdxs = []int32{
0, // 0: securityreport.SecurityReport.disposition:type_name -> securityreport.SecurityReport.Disposition
2, // 1: securityreport.SecurityReport.csp_report:type_name -> securityreport.CspReport
3, // 2: securityreport.SecurityReport.deprecation_report:type_name -> securityreport.DeprecationReport
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_security_report_proto_init() }
func file_security_report_proto_init() {
if File_security_report_proto != nil {
return
}
file_csp_violation_proto_init()
file_deprecation_report_proto_init()
if !protoimpl.UnsafeEnabled {
file_security_report_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SecurityReport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_security_report_proto_msgTypes[0].OneofWrappers = []interface{}{
(*SecurityReport_CspReport)(nil),
(*SecurityReport_DeprecationReport)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_security_report_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_security_report_proto_goTypes,
DependencyIndexes: file_security_report_proto_depIdxs,
EnumInfos: file_security_report_proto_enumTypes,
MessageInfos: file_security_report_proto_msgTypes,
}.Build()
File_security_report_proto = out.File
file_security_report_proto_rawDesc = nil
file_security_report_proto_goTypes = nil
file_security_report_proto_depIdxs = nil
}