-
Notifications
You must be signed in to change notification settings - Fork 355
/
Copy pathkubearmor.proto
128 lines (99 loc) · 2.21 KB
/
kubearmor.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
syntax = "proto3";
package feeder;
option go_package="github.com/kubearmor/KubeArmor/protobuf";
// Health check
message NonceMessage {
int32 nonce = 1;
}
// message struct
message Message {
int64 Timestamp = 1;
string UpdatedTime = 2;
string ClusterName = 3;
string HostName = 4;
string HostIP = 5;
string Type = 6;
string Level = 7;
string Message = 8;
}
// podowner struct
message Podowner {
string Ref = 1;
string Name = 2;
string Namespace = 3;
}
// alert struct
message Alert {
int64 Timestamp = 1;
string UpdatedTime = 2;
string ClusterName = 3;
string HostName = 4;
string NamespaceName = 5;
Podowner Owner = 31;
string PodName = 6;
string Labels = 29;
string ContainerID = 7;
string ContainerName = 8;
string ContainerImage = 24;
int32 HostPPID = 27;
int32 HostPID = 9;
int32 PPID = 10;
int32 PID = 11;
int32 UID = 12;
string ParentProcessName = 25;
string ProcessName = 26;
string PolicyName = 13;
string Severity = 14;
string Tags = 15;
repeated string ATags = 30;
string Message = 16;
string Type = 17;
string Source = 18;
string Operation = 19;
string Resource = 20;
string Data = 21;
string Enforcer = 28;
string Action = 22;
string Result = 23;
}
// log struct
message Log {
int64 Timestamp = 1;
string UpdatedTime = 2;
string ClusterName = 3;
string HostName = 4;
string NamespaceName = 5;
Podowner Owner = 24;
string PodName = 6;
string Labels = 23;
string ContainerID = 7;
string ContainerName = 8;
string ContainerImage = 19;
string ParentProcessName = 20;
string ProcessName = 21;
int32 HostPPID = 22;
int32 HostPID = 9;
int32 PPID = 10;
int32 PID = 11;
int32 UID = 12;
string Type = 13;
string Source = 14;
string Operation = 15;
string Resource = 16;
string Data = 17;
string Result = 18;
}
// request message
message RequestMessage {
string Filter = 1;
}
// reply message
message ReplyMessage {
int32 Retval = 1;
}
service LogService {
rpc HealthCheck(NonceMessage) returns (ReplyMessage);
rpc WatchMessages(RequestMessage) returns (stream Message);
rpc WatchAlerts(RequestMessage) returns (stream Alert);
rpc WatchLogs(RequestMessage) returns (stream Log);
}