Skip to content

Commit b174c58

Browse files
Google APIscopybara-github
authored andcommitted
feat: published Cloud IDS Service v1 Logging
PiperOrigin-RevId: 473541339
1 parent 8167bad commit b174c58

2 files changed

Lines changed: 335 additions & 0 deletions

File tree

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# This file was automatically generated by BuildFileGenerator
2+
3+
# This is an API workspace, having public visibility by default makes perfect sense.
4+
package(default_visibility = ["//visibility:public"])
5+
6+
##############################################################################
7+
# Common
8+
##############################################################################
9+
load("@rules_proto//proto:defs.bzl", "proto_library")
10+
11+
proto_library(
12+
name = "logging_proto",
13+
srcs = [
14+
"logging.proto",
15+
],
16+
deps = [
17+
"@com_google_protobuf//:duration_proto",
18+
"@com_google_protobuf//:timestamp_proto",
19+
],
20+
)
21+
22+
##############################################################################
23+
# Java
24+
##############################################################################
25+
load(
26+
"@com_google_googleapis_imports//:imports.bzl",
27+
"java_grpc_library",
28+
"java_proto_library",
29+
)
30+
31+
java_proto_library(
32+
name = "logging_java_proto",
33+
deps = [":logging_proto"],
34+
)
35+
36+
java_grpc_library(
37+
name = "logging_java_grpc",
38+
srcs = [":logging_proto"],
39+
deps = [":logging_java_proto"],
40+
)
41+
42+
##############################################################################
43+
# Go
44+
##############################################################################
45+
load(
46+
"@com_google_googleapis_imports//:imports.bzl",
47+
"go_proto_library",
48+
)
49+
50+
go_proto_library(
51+
name = "logging_go_proto",
52+
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
53+
importpath = "google.golang.org/genproto/googleapis/cloud/ids/logging/v1",
54+
protos = [":logging_proto"],
55+
deps = [
56+
],
57+
)
58+
59+
##############################################################################
60+
# Python
61+
##############################################################################
62+
load(
63+
"@com_google_googleapis_imports//:imports.bzl",
64+
"moved_proto_library",
65+
"py_grpc_library",
66+
"py_proto_library",
67+
)
68+
69+
moved_proto_library(
70+
name = "logging_moved_proto",
71+
srcs = [":logging_proto"],
72+
deps = [
73+
"@com_google_protobuf//:duration_proto",
74+
"@com_google_protobuf//:timestamp_proto",
75+
],
76+
)
77+
78+
py_proto_library(
79+
name = "logging_py_proto",
80+
deps = [":logging_moved_proto"],
81+
)
82+
83+
py_grpc_library(
84+
name = "logging_py_grpc",
85+
srcs = [":logging_moved_proto"],
86+
deps = [":logging_py_proto"],
87+
)
88+
89+
##############################################################################
90+
# PHP
91+
##############################################################################
92+
load(
93+
"@com_google_googleapis_imports//:imports.bzl",
94+
"php_grpc_library",
95+
"php_proto_library",
96+
)
97+
98+
php_proto_library(
99+
name = "logging_php_proto",
100+
deps = [":logging_proto"],
101+
)
102+
103+
php_grpc_library(
104+
name = "logging_php_grpc",
105+
srcs = [":logging_proto"],
106+
deps = [":logging_php_proto"],
107+
)
108+
109+
##############################################################################
110+
# Node.js
111+
##############################################################################
112+
load(
113+
"@com_google_googleapis_imports//:imports.bzl",
114+
"nodejs_gapic_assembly_pkg",
115+
"nodejs_gapic_library",
116+
)
117+
118+
##############################################################################
119+
# Ruby
120+
##############################################################################
121+
load(
122+
"@com_google_googleapis_imports//:imports.bzl",
123+
"ruby_grpc_library",
124+
"ruby_proto_library",
125+
)
126+
127+
ruby_proto_library(
128+
name = "logging_ruby_proto",
129+
deps = [":logging_proto"],
130+
)
131+
132+
ruby_grpc_library(
133+
name = "logging_ruby_grpc",
134+
srcs = [":logging_proto"],
135+
deps = [":logging_ruby_proto"],
136+
)
137+
138+
##############################################################################
139+
# C#
140+
##############################################################################
141+
load(
142+
"@com_google_googleapis_imports//:imports.bzl",
143+
"csharp_grpc_library",
144+
"csharp_proto_library",
145+
)
146+
147+
csharp_proto_library(
148+
name = "logging_csharp_proto",
149+
deps = [":logging_proto"],
150+
)
151+
152+
csharp_grpc_library(
153+
name = "logging_csharp_grpc",
154+
srcs = [":logging_proto"],
155+
deps = [":logging_csharp_proto"],
156+
)
157+
158+
##############################################################################
159+
# C++
160+
##############################################################################
161+
load(
162+
"@com_google_googleapis_imports//:imports.bzl",
163+
"cc_grpc_library",
164+
"cc_proto_library",
165+
)
166+
167+
cc_proto_library(
168+
name = "logging_cc_proto",
169+
deps = [":logging_proto"],
170+
)
171+
172+
cc_grpc_library(
173+
name = "logging_cc_grpc",
174+
srcs = [":logging_proto"],
175+
grpc_only = True,
176+
deps = [":logging_cc_proto"],
177+
)
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
// Copyright 2022 Google LLC
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+
syntax = "proto3";
16+
17+
package google.cloud.ids.logging.v1;
18+
19+
import "google/protobuf/duration.proto";
20+
import "google/protobuf/timestamp.proto";
21+
22+
option go_package = "google.golang.org/genproto/googleapis/cloud/ids/logging/v1;logging";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "LoggingProto";
25+
option java_package = "com.google.cloud.ids.logging.v1";
26+
27+
// A threat detected by Cloud IDS.
28+
message ThreatLog {
29+
// Describes the type of severity of the threat.
30+
enum Severity {
31+
// Default value - should never be used.
32+
SEVERITY_UNSPECIFIED = 0;
33+
34+
LOW = 2;
35+
36+
MEDIUM = 3;
37+
38+
HIGH = 4;
39+
40+
CRITICAL = 5;
41+
42+
INFORMATIONAL = 6;
43+
}
44+
45+
enum Direction {
46+
// Default value - permitted since Direction is optional.
47+
DIRECTION_UNDEFINED = 0;
48+
49+
// Ingress traffic.
50+
CLIENT_TO_SERVER = 1;
51+
52+
// Egress traffic.
53+
SERVER_TO_CLIENT = 2;
54+
}
55+
56+
// Name of the threat, e,g. "Suspicious HTTP Evasion"
57+
string name = 1;
58+
59+
// Unique ID of the threat.
60+
string threat_id = 13;
61+
62+
// The time of the alert.
63+
google.protobuf.Timestamp alert_time = 2;
64+
65+
// Severity of threat.
66+
Severity alert_severity = 19;
67+
68+
// The type of the threat, e.g. "Spyware".
69+
string type = 4;
70+
71+
// Category (sub-type) of the threat, e.g. "code-execution".
72+
string category = 18;
73+
74+
// The source IP Address of the packet, e.g. "35.191.8.79"
75+
string source_ip_address = 5;
76+
77+
// The source port of the packet, e.g. 8080
78+
int32 source_port = 6;
79+
80+
// The destination IP Address of the packet, e.g. "192.168.100.2"
81+
string destination_ip_address = 7;
82+
83+
// The destination port of the packet, e.g. 100
84+
int32 destination_port = 8;
85+
86+
// The IP protocol of the packet, e.g. "TCP".
87+
string ip_protocol = 9;
88+
89+
// The direction of the packet - an optional field.
90+
Direction direction = 10;
91+
92+
// ID of the Layer 4 session of the threat.
93+
string session_id = 14;
94+
95+
// Number of sessions with same source IP, destination IP, application, and
96+
// type seen within 5 seconds.
97+
string repeat_count = 15;
98+
99+
// Application associated with the session.
100+
string application = 16;
101+
102+
// Variable field. URI or filename of the relevant threat, if applicable.
103+
string uri_or_filename = 17;
104+
105+
// CVE IDs of the threat.
106+
repeated string cves = 20;
107+
108+
// Details of the threat reported by the IDS VM
109+
string details = 11;
110+
111+
// The network associated with the IDS Endpoint.
112+
string network = 12;
113+
}
114+
115+
// Traffic detected by Cloud IDS.
116+
// Fields taken from:
117+
// https://docs.paloaltonetworks.com/pan-os/8-1/pan-os-admin/monitoring/use-syslog-for-monitoring/syslog-field-descriptions/traffic-log-fields.html.
118+
message TrafficLog {
119+
// Time of session start.
120+
google.protobuf.Timestamp start_time = 1;
121+
122+
// Elapsed time of the session.
123+
google.protobuf.Duration elapsed_time = 2;
124+
125+
// The network associated with the IDS Endpoint.
126+
string network = 3;
127+
128+
// The source IP Address of the packet, e.g. "35.191.8.79"
129+
string source_ip_address = 4;
130+
131+
// The source port of the packet, e.g. 8080
132+
int32 source_port = 5;
133+
134+
// The destination IP Address of the packet, e.g. "192.168.100.2"
135+
string destination_ip_address = 6;
136+
137+
// The destination port of the packet, e.g. 100
138+
int32 destination_port = 7;
139+
140+
// The IP protocol of the packet, e.g. "TCP".
141+
string ip_protocol = 8;
142+
143+
// Application associated with the session.
144+
string application = 9;
145+
146+
// The direction of the packet.
147+
string session_id = 12;
148+
149+
// Number of sessions with same source IP, destination IP, application, and
150+
// type seen within 5 seconds.
151+
string repeat_count = 13;
152+
153+
// Total number of bytes transferred in the session.
154+
int64 total_bytes = 14;
155+
156+
// Total number of packets transferred in the session.
157+
int64 total_packets = 15;
158+
}

0 commit comments

Comments
 (0)