WAF增加多个动作

This commit is contained in:
GoEdgeLab
2021-07-18 16:26:45 +08:00
parent 9291406262
commit 1812fe7b09
14 changed files with 326 additions and 123 deletions

View File

@@ -19,6 +19,7 @@ var sharedNodeConfig *NodeConfig = nil
type NodeConfig struct {
Id int64 `yaml:"id" json:"id"`
NodeId string `yaml:"nodeId" json:"nodeId"`
Secret string `yaml:"secret" json:"secret"`
IsOn bool `yaml:"isOn" json:"isOn"`
Servers []*serverconfigs.ServerConfig `yaml:"servers" json:"servers"`
Version int64 `yaml:"version" json:"version"`

View File

@@ -82,6 +82,8 @@ type HTTPAccessLog struct {
FirewallRuleGroupId int64 `protobuf:"varint,45,opt,name=firewallRuleGroupId,proto3" json:"firewallRuleGroupId,omitempty"`
FirewallRuleSetId int64 `protobuf:"varint,46,opt,name=firewallRuleSetId,proto3" json:"firewallRuleSetId,omitempty"`
FirewallRuleId int64 `protobuf:"varint,47,opt,name=firewallRuleId,proto3" json:"firewallRuleId,omitempty"`
FirewallActions []string `protobuf:"bytes,49,rep,name=firewallActions,proto3" json:"firewallActions,omitempty"`
Tags []string `protobuf:"bytes,50,rep,name=tags,proto3" json:"tags,omitempty"`
}
func (x *HTTPAccessLog) Reset() {
@@ -445,6 +447,20 @@ func (x *HTTPAccessLog) GetFirewallRuleId() int64 {
return 0
}
func (x *HTTPAccessLog) GetFirewallActions() []string {
if x != nil {
return x.FirewallActions
}
return nil
}
func (x *HTTPAccessLog) GetTags() []string {
if x != nil {
return x.Tags
}
return nil
}
type Strings struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -497,7 +513,7 @@ var File_models_model_http_access_log_proto protoreflect.FileDescriptor
var file_models_model_http_access_log_proto_rawDesc = []byte{
0x0a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68,
0x74, 0x74, 0x70, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xdf, 0x0e, 0x0a, 0x0d, 0x48, 0x54, 0x54,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x9d, 0x0f, 0x0a, 0x0d, 0x48, 0x54, 0x54,
0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x30, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76,
@@ -599,26 +615,30 @@ var file_models_model_http_access_log_proto_rawDesc = []byte{
0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x2f, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0e, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x49,
0x64, 0x1a, 0x4a, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e,
0x67, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a,
0x0b, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x64, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x41, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x31, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x66, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74,
0x61, 0x67, 0x73, 0x18, 0x32, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a,
0x4a, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x43,
0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38,
0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x21, 0x0a, 0x07, 0x53, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x21, 0x0a, 0x07, 0x53, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -163,6 +163,86 @@ func (x *ComposeFirewallGlobalBoardResponse) GetHourlyStats() []*ComposeFirewall
return nil
}
// 发送告警(notify)消息
type NotifyHTTPFirewallEventRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"`
HttpFirewallPolicyId int64 `protobuf:"varint,2,opt,name=httpFirewallPolicyId,proto3" json:"httpFirewallPolicyId,omitempty"`
HttpFirewallRuleGroupId int64 `protobuf:"varint,3,opt,name=httpFirewallRuleGroupId,proto3" json:"httpFirewallRuleGroupId,omitempty"`
HttpFirewallRuleSetId int64 `protobuf:"varint,4,opt,name=httpFirewallRuleSetId,proto3" json:"httpFirewallRuleSetId,omitempty"`
CreatedAt int64 `protobuf:"varint,5,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
}
func (x *NotifyHTTPFirewallEventRequest) Reset() {
*x = NotifyHTTPFirewallEventRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_firewall_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NotifyHTTPFirewallEventRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NotifyHTTPFirewallEventRequest) ProtoMessage() {}
func (x *NotifyHTTPFirewallEventRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_firewall_proto_msgTypes[2]
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 NotifyHTTPFirewallEventRequest.ProtoReflect.Descriptor instead.
func (*NotifyHTTPFirewallEventRequest) Descriptor() ([]byte, []int) {
return file_service_firewall_proto_rawDescGZIP(), []int{2}
}
func (x *NotifyHTTPFirewallEventRequest) GetServerId() int64 {
if x != nil {
return x.ServerId
}
return 0
}
func (x *NotifyHTTPFirewallEventRequest) GetHttpFirewallPolicyId() int64 {
if x != nil {
return x.HttpFirewallPolicyId
}
return 0
}
func (x *NotifyHTTPFirewallEventRequest) GetHttpFirewallRuleGroupId() int64 {
if x != nil {
return x.HttpFirewallRuleGroupId
}
return 0
}
func (x *NotifyHTTPFirewallEventRequest) GetHttpFirewallRuleSetId() int64 {
if x != nil {
return x.HttpFirewallRuleSetId
}
return 0
}
func (x *NotifyHTTPFirewallEventRequest) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
type ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -175,7 +255,7 @@ type ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat struct {
func (x *ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat) Reset() {
*x = ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat{}
if protoimpl.UnsafeEnabled {
mi := &file_service_firewall_proto_msgTypes[2]
mi := &file_service_firewall_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -188,7 +268,7 @@ func (x *ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat) String()
func (*ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat) ProtoMessage() {}
func (x *ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat) ProtoReflect() protoreflect.Message {
mi := &file_service_firewall_proto_msgTypes[2]
mi := &file_service_firewall_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -232,7 +312,7 @@ type ComposeFirewallGlobalBoardResponse_HourlyStat struct {
func (x *ComposeFirewallGlobalBoardResponse_HourlyStat) Reset() {
*x = ComposeFirewallGlobalBoardResponse_HourlyStat{}
if protoimpl.UnsafeEnabled {
mi := &file_service_firewall_proto_msgTypes[3]
mi := &file_service_firewall_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -245,7 +325,7 @@ func (x *ComposeFirewallGlobalBoardResponse_HourlyStat) String() string {
func (*ComposeFirewallGlobalBoardResponse_HourlyStat) ProtoMessage() {}
func (x *ComposeFirewallGlobalBoardResponse_HourlyStat) ProtoReflect() protoreflect.Message {
mi := &file_service_firewall_proto_msgTypes[3]
mi := &file_service_firewall_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -303,7 +383,7 @@ type ComposeFirewallGlobalBoardResponse_DailyStat struct {
func (x *ComposeFirewallGlobalBoardResponse_DailyStat) Reset() {
*x = ComposeFirewallGlobalBoardResponse_DailyStat{}
if protoimpl.UnsafeEnabled {
mi := &file_service_firewall_proto_msgTypes[4]
mi := &file_service_firewall_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -316,7 +396,7 @@ func (x *ComposeFirewallGlobalBoardResponse_DailyStat) String() string {
func (*ComposeFirewallGlobalBoardResponse_DailyStat) ProtoMessage() {}
func (x *ComposeFirewallGlobalBoardResponse_DailyStat) ProtoReflect() protoreflect.Message {
mi := &file_service_firewall_proto_msgTypes[4]
mi := &file_service_firewall_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -364,78 +444,101 @@ var File_service_firewall_proto protoreflect.FileDescriptor
var file_service_firewall_proto_rawDesc = []byte{
0x0a, 0x16, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2b, 0x6d, 0x6f,
0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f,
0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x23, 0x0a, 0x21, 0x43, 0x6f, 0x6d,
0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62,
0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x85,
0x07, 0x0a, 0x22, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61,
0x69, 0x6c, 0x79, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x2a, 0x0a,
0x10, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61,
0x69, 0x6c, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79,
0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x57, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x03, 0x52, 0x11, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x42,
0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x78, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18,
0x1e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f,
0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c,
0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72,
0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x52, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12,
0x50, 0x0a, 0x0a, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x1f, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f,
0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x69, 0x6c,
0x79, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0a, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74,
0x73, 0x12, 0x53, 0x0a, 0x0b, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73,
0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70,
0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61,
0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48,
0x6f, 0x75, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0b, 0x68, 0x6f, 0x75, 0x72, 0x6c,
0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x82, 0x01, 0x0a, 0x19, 0x48, 0x54, 0x54, 0x50, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x53, 0x74, 0x61, 0x74, 0x12, 0x4f, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x15,
0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65,
0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x84, 0x01, 0x0a, 0x0a,
0x48, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f,
0x75, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x75, 0x72, 0x12, 0x1c,
0x0a, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0c,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x18, 0x03, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61,
0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18,
0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63,
0x6b, 0x73, 0x1a, 0x81, 0x01, 0x0a, 0x09, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74,
0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64,
0x61, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73,
0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x70,
0x74, 0x63, 0x68, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x32, 0x7e, 0x0a, 0x0f, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x1a, 0x63, 0x6f, 0x6d,
0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62,
0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d,
0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62,
0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26,
0x6c, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x19, 0x6d, 0x6f,
0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f,
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x66, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x23, 0x0a, 0x21, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61,
0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x85, 0x07, 0x0a, 0x22, 0x43, 0x6f,
0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f,
0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4c, 0x6f,
0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44,
0x61, 0x69, 0x6c, 0x79, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01,
0x28, 0x03, 0x52, 0x10, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x42, 0x6c,
0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x69,
0x6c, 0x79, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
0x11, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x61, 0x70, 0x74, 0x63,
0x68, 0x61, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x65, 0x65, 0x6b, 0x6c,
0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x57, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73,
0x12, 0x78, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x40, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74,
0x61, 0x74, 0x52, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x50, 0x0a, 0x0a, 0x64, 0x61,
0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74,
0x52, 0x0a, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x53, 0x0a, 0x0b,
0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x20, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x31, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x6f, 0x75, 0x72, 0x6c, 0x79,
0x53, 0x74, 0x61, 0x74, 0x52, 0x0b, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74,
0x73, 0x1a, 0x82, 0x01, 0x0a, 0x19, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x12,
0x4f, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52,
0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x15, 0x68, 0x74, 0x74, 0x70, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x84, 0x01, 0x0a, 0x0a, 0x48, 0x6f, 0x75, 0x72, 0x6c,
0x79, 0x53, 0x74, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x75, 0x72, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x75, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x81, 0x01,
0x0a, 0x09, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64,
0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x61, 0x79, 0x12, 0x1c, 0x0a,
0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x12,
0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x73, 0x22, 0xfe, 0x01, 0x0a, 0x1e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x48, 0x54, 0x54, 0x50,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64,
0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14,
0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x34,
0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75,
0x6c, 0x65, 0x53, 0x65, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x68,
0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53,
0x65, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x41, 0x74, 0x32, 0xcd, 0x01, 0x0a, 0x0f, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73,
0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42,
0x6f, 0x61, 0x72, 0x64, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73,
0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42,
0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x70, 0x62,
0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x48, 0x54, 0x54,
0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x22,
0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65,
0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@@ -450,24 +553,28 @@ func file_service_firewall_proto_rawDescGZIP() []byte {
return file_service_firewall_proto_rawDescData
}
var file_service_firewall_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_service_firewall_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_service_firewall_proto_goTypes = []interface{}{
(*ComposeFirewallGlobalBoardRequest)(nil), // 0: pb.ComposeFirewallGlobalBoardRequest
(*ComposeFirewallGlobalBoardResponse)(nil), // 1: pb.ComposeFirewallGlobalBoardResponse
(*ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat)(nil), // 2: pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat
(*ComposeFirewallGlobalBoardResponse_HourlyStat)(nil), // 3: pb.ComposeFirewallGlobalBoardResponse.HourlyStat
(*ComposeFirewallGlobalBoardResponse_DailyStat)(nil), // 4: pb.ComposeFirewallGlobalBoardResponse.DailyStat
(*HTTPFirewallRuleGroup)(nil), // 5: pb.HTTPFirewallRuleGroup
(*NotifyHTTPFirewallEventRequest)(nil), // 2: pb.NotifyHTTPFirewallEventRequest
(*ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat)(nil), // 3: pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat
(*ComposeFirewallGlobalBoardResponse_HourlyStat)(nil), // 4: pb.ComposeFirewallGlobalBoardResponse.HourlyStat
(*ComposeFirewallGlobalBoardResponse_DailyStat)(nil), // 5: pb.ComposeFirewallGlobalBoardResponse.DailyStat
(*HTTPFirewallRuleGroup)(nil), // 6: pb.HTTPFirewallRuleGroup
(*RPCSuccess)(nil), // 7: pb.RPCSuccess
}
var file_service_firewall_proto_depIdxs = []int32{
2, // 0: pb.ComposeFirewallGlobalBoardResponse.httpFirewallRuleGroups:type_name -> pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat
4, // 1: pb.ComposeFirewallGlobalBoardResponse.dailyStats:type_name -> pb.ComposeFirewallGlobalBoardResponse.DailyStat
3, // 2: pb.ComposeFirewallGlobalBoardResponse.hourlyStats:type_name -> pb.ComposeFirewallGlobalBoardResponse.HourlyStat
5, // 3: pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat.httpFirewallRuleGroup:type_name -> pb.HTTPFirewallRuleGroup
3, // 0: pb.ComposeFirewallGlobalBoardResponse.httpFirewallRuleGroups:type_name -> pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat
5, // 1: pb.ComposeFirewallGlobalBoardResponse.dailyStats:type_name -> pb.ComposeFirewallGlobalBoardResponse.DailyStat
4, // 2: pb.ComposeFirewallGlobalBoardResponse.hourlyStats:type_name -> pb.ComposeFirewallGlobalBoardResponse.HourlyStat
6, // 3: pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat.httpFirewallRuleGroup:type_name -> pb.HTTPFirewallRuleGroup
0, // 4: pb.FirewallService.composeFirewallGlobalBoard:input_type -> pb.ComposeFirewallGlobalBoardRequest
1, // 5: pb.FirewallService.composeFirewallGlobalBoard:output_type -> pb.ComposeFirewallGlobalBoardResponse
5, // [5:6] is the sub-list for method output_type
4, // [4:5] is the sub-list for method input_type
2, // 5: pb.FirewallService.notifyHTTPFirewallEvent:input_type -> pb.NotifyHTTPFirewallEventRequest
1, // 6: pb.FirewallService.composeFirewallGlobalBoard:output_type -> pb.ComposeFirewallGlobalBoardResponse
7, // 7: pb.FirewallService.notifyHTTPFirewallEvent:output_type -> pb.RPCSuccess
6, // [6:8] is the sub-list for method output_type
4, // [4:6] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
@@ -478,6 +585,7 @@ func file_service_firewall_proto_init() {
if File_service_firewall_proto != nil {
return
}
file_models_rpc_messages_proto_init()
file_models_model_http_firewall_rule_group_proto_init()
if !protoimpl.UnsafeEnabled {
file_service_firewall_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
@@ -505,7 +613,7 @@ func file_service_firewall_proto_init() {
}
}
file_service_firewall_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat); i {
switch v := v.(*NotifyHTTPFirewallEventRequest); i {
case 0:
return &v.state
case 1:
@@ -517,7 +625,7 @@ func file_service_firewall_proto_init() {
}
}
file_service_firewall_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeFirewallGlobalBoardResponse_HourlyStat); i {
switch v := v.(*ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat); i {
case 0:
return &v.state
case 1:
@@ -529,6 +637,18 @@ func file_service_firewall_proto_init() {
}
}
file_service_firewall_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeFirewallGlobalBoardResponse_HourlyStat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_firewall_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeFirewallGlobalBoardResponse_DailyStat); i {
case 0:
return &v.state
@@ -547,7 +667,7 @@ func file_service_firewall_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_firewall_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
@@ -575,6 +695,8 @@ const _ = grpc.SupportPackageIsVersion6
type FirewallServiceClient interface {
// 组合看板数据
ComposeFirewallGlobalBoard(ctx context.Context, in *ComposeFirewallGlobalBoardRequest, opts ...grpc.CallOption) (*ComposeFirewallGlobalBoardResponse, error)
// 发送告警(notify)消息
NotifyHTTPFirewallEvent(ctx context.Context, in *NotifyHTTPFirewallEventRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type firewallServiceClient struct {
@@ -594,10 +716,21 @@ func (c *firewallServiceClient) ComposeFirewallGlobalBoard(ctx context.Context,
return out, nil
}
func (c *firewallServiceClient) NotifyHTTPFirewallEvent(ctx context.Context, in *NotifyHTTPFirewallEventRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.FirewallService/notifyHTTPFirewallEvent", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FirewallServiceServer is the server API for FirewallService service.
type FirewallServiceServer interface {
// 组合看板数据
ComposeFirewallGlobalBoard(context.Context, *ComposeFirewallGlobalBoardRequest) (*ComposeFirewallGlobalBoardResponse, error)
// 发送告警(notify)消息
NotifyHTTPFirewallEvent(context.Context, *NotifyHTTPFirewallEventRequest) (*RPCSuccess, error)
}
// UnimplementedFirewallServiceServer can be embedded to have forward compatible implementations.
@@ -607,6 +740,9 @@ type UnimplementedFirewallServiceServer struct {
func (*UnimplementedFirewallServiceServer) ComposeFirewallGlobalBoard(context.Context, *ComposeFirewallGlobalBoardRequest) (*ComposeFirewallGlobalBoardResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ComposeFirewallGlobalBoard not implemented")
}
func (*UnimplementedFirewallServiceServer) NotifyHTTPFirewallEvent(context.Context, *NotifyHTTPFirewallEventRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method NotifyHTTPFirewallEvent not implemented")
}
func RegisterFirewallServiceServer(s *grpc.Server, srv FirewallServiceServer) {
s.RegisterService(&_FirewallService_serviceDesc, srv)
@@ -630,6 +766,24 @@ func _FirewallService_ComposeFirewallGlobalBoard_Handler(srv interface{}, ctx co
return interceptor(ctx, in, info, handler)
}
func _FirewallService_NotifyHTTPFirewallEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NotifyHTTPFirewallEventRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FirewallServiceServer).NotifyHTTPFirewallEvent(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.FirewallService/NotifyHTTPFirewallEvent",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FirewallServiceServer).NotifyHTTPFirewallEvent(ctx, req.(*NotifyHTTPFirewallEventRequest))
}
return interceptor(ctx, in, info, handler)
}
var _FirewallService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.FirewallService",
HandlerType: (*FirewallServiceServer)(nil),
@@ -638,6 +792,10 @@ var _FirewallService_serviceDesc = grpc.ServiceDesc{
MethodName: "composeFirewallGlobalBoard",
Handler: _FirewallService_ComposeFirewallGlobalBoard_Handler,
},
{
MethodName: "notifyHTTPFirewallEvent",
Handler: _FirewallService_NotifyHTTPFirewallEvent_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_firewall.proto",

View File

@@ -63,6 +63,10 @@ message HTTPAccessLog {
int64 firewallRuleGroupId = 45;
int64 firewallRuleSetId = 46;
int64 firewallRuleId = 47;
repeated string firewallActions = 49;
repeated string tags = 50;
}
message Strings {

View File

@@ -3,12 +3,16 @@ option go_package = "./pb";
package pb;
import "models/rpc_messages.proto";
import "models/model_http_firewall_rule_group.proto";
// 防火墙全局服务
service FirewallService {
// 组合看板数据
rpc composeFirewallGlobalBoard (ComposeFirewallGlobalBoardRequest) returns (ComposeFirewallGlobalBoardResponse);
// 发送告警(notify)消息
rpc notifyHTTPFirewallEvent (NotifyHTTPFirewallEventRequest) returns (RPCSuccess);
}
// 组合看板数据
@@ -45,3 +49,12 @@ message ComposeFirewallGlobalBoardResponse {
int64 countBlocks = 4;
}
}
// 发送告警(notify)消息
message NotifyHTTPFirewallEventRequest {
int64 serverId = 1;
int64 httpFirewallPolicyId = 2;
int64 httpFirewallRuleGroupId = 3;
int64 httpFirewallRuleSetId = 4;
int64 createdAt = 5;
}

View File

@@ -5,5 +5,5 @@ type HTTPFirewallBlockAction struct {
StatusCode int `yaml:"statusCode" json:"statusCode"`
Body string `yaml:"body" json:"body"` // supports HTML
URL string `yaml:"url" json:"url"`
Life int64 `yaml:"life" json:"life"`
Timeout int32 `yaml:"timeout" json:"timeout"`
}

View File

@@ -1,5 +1,6 @@
package firewallconfigs
type HTTPFirewallCaptchaAction struct {
Life int64 `yaml:"life" json:"life"`
Life int32 `yaml:"life" json:"life"`
Language string `yaml:"language" json:"language"` // 语言zh-CN, en-US ... TODO 需要实现目前是根据浏览器Accept-Language动态获取
}

View File

@@ -3,5 +3,5 @@
package firewallconfigs
type HTTPFirewallGet302Action struct {
Life int64 `yaml:"life" json:"life"`
Life int32 `yaml:"life" json:"life"`
}

View File

@@ -0,0 +1,6 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package firewallconfigs
type HTTPFirewallNotifyAction struct {
}

View File

@@ -3,5 +3,5 @@
package firewallconfigs
type HTTPFirewallPost307Action struct {
Life int64 `yaml:"life" json:"life"`
Life int32 `yaml:"life" json:"life"`
}

View File

@@ -6,5 +6,5 @@ type HTTPFirewallRecordIPAction struct {
Type string `yaml:"type" json:"type"`
IPListId int64 `yaml:"ipListId" json:"ipListId"`
Level string `yaml:"level" json:"level"`
Timeout int64 `yaml:"timeout" json:"timeout"`
Timeout int32 `yaml:"timeout" json:"timeout"`
}

View File

@@ -32,19 +32,19 @@ var AllActions = []*HTTPFirewallActionDefinition{
{
Name: "告警",
Code: HTTPFirewallActionNotify,
Description: "发送消息通知。",
Description: "向集群的消息接收人发送消息通知(企业版)。",
Category: HTTPFirewallActionCategoryVerify,
},
{
Name: "GET 302",
Code: HTTPFirewallActionGet302,
Description: "通过302重定向GET请求验证客户端。",
Description: "通过302重定向GET请求验证客户端真实性。",
Category: HTTPFirewallActionCategoryVerify,
},
{
Name: "POST 307",
Code: HTTPFirewallActionPost307,
Description: "通过307重定向POST请求验证客户端。",
Description: "通过307重定向POST请求验证客户端真实性。",
Category: HTTPFirewallActionCategoryVerify,
},
{

View File

@@ -24,7 +24,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{
Name: "客户端地址IP",
Prefix: "remoteAddr",
Description: "试图通过分析X-Forwarded-For等Header获取的客户端地址比如192.168.1.100",
Description: "试图通过分析X-Forwarded-For等Header获取的客户端地址比如192.168.1.100,存在伪造的可能",
IsRequest: true,
},
{