@@ -43,8 +43,8 @@ class ContinuousValidationEvent(proto.Message):
43
43
Pod event.
44
44
45
45
This field is a member of `oneof`_ ``event_type``.
46
- unsupported_policy_event (google.cloud.binaryauthorization_v1beta1.types.ContinuousValidationEvent.UnsupportedPolicyEvent ):
47
- Unsupported policy event.
46
+ config_error_event (google.cloud.binaryauthorization_v1beta1.types.ContinuousValidationEvent.ConfigErrorEvent ):
47
+ Config error event.
48
48
49
49
This field is a member of `oneof`_ ``event_type``.
50
50
"""
@@ -57,6 +57,8 @@ class ContinuousValidationPodEvent(proto.Message):
57
57
The k8s namespace of the Pod.
58
58
pod (str):
59
59
The name of the Pod.
60
+ policy_name (str):
61
+ The name of the policy.
60
62
deploy_time (google.protobuf.timestamp_pb2.Timestamp):
61
63
Deploy time of the Pod from k8s.
62
64
end_time (google.protobuf.timestamp_pb2.Timestamp):
@@ -91,6 +93,8 @@ class ImageDetails(proto.Message):
91
93
The result of the audit for this image.
92
94
description (str):
93
95
Description of the above result.
96
+ check_results (MutableSequence[google.cloud.binaryauthorization_v1beta1.types.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult]):
97
+ List of check results.
94
98
"""
95
99
96
100
class AuditResult (proto .Enum ):
@@ -108,6 +112,115 @@ class AuditResult(proto.Enum):
108
112
ALLOW = 1
109
113
DENY = 2
110
114
115
+ class CheckResult (proto .Message ):
116
+ r"""
117
+
118
+ Attributes:
119
+ check_set_index (str):
120
+ The index of the check set.
121
+ check_set_name (str):
122
+ The name of the check set.
123
+ check_set_scope (google.cloud.binaryauthorization_v1beta1.types.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope):
124
+ The scope of the check set.
125
+ check_index (str):
126
+ The index of the check.
127
+ check_name (str):
128
+ The name of the check.
129
+ check_type (str):
130
+ The type of the check.
131
+ verdict (google.cloud.binaryauthorization_v1beta1.types.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict):
132
+ The verdict of this check.
133
+ explanation (str):
134
+ User-friendly explanation of this check
135
+ result.
136
+ """
137
+
138
+ class CheckVerdict (proto .Enum ):
139
+ r"""Result of evaluating one check.
140
+
141
+ Values:
142
+ CHECK_VERDICT_UNSPECIFIED (0):
143
+ We should always have a verdict. This is an
144
+ error.
145
+ NON_CONFORMANT (1):
146
+ The check was successfully evaluated and the
147
+ image did not satisfy the check.
148
+ """
149
+ CHECK_VERDICT_UNSPECIFIED = 0
150
+ NON_CONFORMANT = 1
151
+
152
+ class CheckSetScope (proto .Message ):
153
+ r"""A scope specifier for check sets.
154
+
155
+ This message has `oneof`_ fields (mutually exclusive fields).
156
+ For each oneof, at most one member field can be set at the same time.
157
+ Setting any member of the oneof automatically clears all other
158
+ members.
159
+
160
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
161
+
162
+ Attributes:
163
+ kubernetes_service_account (str):
164
+ Matches a single Kubernetes service account, e.g.
165
+ 'my-namespace:my-service-account'.
166
+ ``kubernetes_service_account`` scope is always more specific
167
+ than ``kubernetes_namespace`` scope for the same namespace.
168
+
169
+ This field is a member of `oneof`_ ``scope``.
170
+ kubernetes_namespace (str):
171
+ Matches all Kubernetes service accounts in the provided
172
+ namespace, unless a more specific
173
+ ``kubernetes_service_account`` scope already matched.
174
+
175
+ This field is a member of `oneof`_ ``scope``.
176
+ """
177
+
178
+ kubernetes_service_account : str = proto .Field (
179
+ proto .STRING ,
180
+ number = 1 ,
181
+ oneof = "scope" ,
182
+ )
183
+ kubernetes_namespace : str = proto .Field (
184
+ proto .STRING ,
185
+ number = 2 ,
186
+ oneof = "scope" ,
187
+ )
188
+
189
+ check_set_index : str = proto .Field (
190
+ proto .STRING ,
191
+ number = 1 ,
192
+ )
193
+ check_set_name : str = proto .Field (
194
+ proto .STRING ,
195
+ number = 2 ,
196
+ )
197
+ check_set_scope : "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope" = proto .Field (
198
+ proto .MESSAGE ,
199
+ number = 3 ,
200
+ message = "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope" ,
201
+ )
202
+ check_index : str = proto .Field (
203
+ proto .STRING ,
204
+ number = 4 ,
205
+ )
206
+ check_name : str = proto .Field (
207
+ proto .STRING ,
208
+ number = 5 ,
209
+ )
210
+ check_type : str = proto .Field (
211
+ proto .STRING ,
212
+ number = 6 ,
213
+ )
214
+ verdict : "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict" = proto .Field (
215
+ proto .ENUM ,
216
+ number = 7 ,
217
+ enum = "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict" ,
218
+ )
219
+ explanation : str = proto .Field (
220
+ proto .STRING ,
221
+ number = 8 ,
222
+ )
223
+
111
224
image : str = proto .Field (
112
225
proto .STRING ,
113
226
number = 1 ,
@@ -121,6 +234,13 @@ class AuditResult(proto.Enum):
121
234
proto .STRING ,
122
235
number = 3 ,
123
236
)
237
+ check_results : MutableSequence [
238
+ "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult"
239
+ ] = proto .RepeatedField (
240
+ proto .MESSAGE ,
241
+ number = 4 ,
242
+ message = "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult" ,
243
+ )
124
244
125
245
pod_namespace : str = proto .Field (
126
246
proto .STRING ,
@@ -130,6 +250,10 @@ class AuditResult(proto.Enum):
130
250
proto .STRING ,
131
251
number = 1 ,
132
252
)
253
+ policy_name : str = proto .Field (
254
+ proto .STRING ,
255
+ number = 8 ,
256
+ )
133
257
deploy_time : timestamp_pb2 .Timestamp = proto .Field (
134
258
proto .MESSAGE ,
135
259
number = 2 ,
@@ -153,13 +277,13 @@ class AuditResult(proto.Enum):
153
277
message = "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails" ,
154
278
)
155
279
156
- class UnsupportedPolicyEvent (proto .Message ):
157
- r"""An event describing that the project policy is unsupported by
158
- CV .
280
+ class ConfigErrorEvent (proto .Message ):
281
+ r"""An event describing a user-actionable configuration issue
282
+ that prevents CV from auditing .
159
283
160
284
Attributes:
161
285
description (str):
162
- A description of the unsupported policy .
286
+ A description of the issue .
163
287
"""
164
288
165
289
description : str = proto .Field (
@@ -173,11 +297,11 @@ class UnsupportedPolicyEvent(proto.Message):
173
297
oneof = "event_type" ,
174
298
message = ContinuousValidationPodEvent ,
175
299
)
176
- unsupported_policy_event : UnsupportedPolicyEvent = proto .Field (
300
+ config_error_event : ConfigErrorEvent = proto .Field (
177
301
proto .MESSAGE ,
178
- number = 2 ,
302
+ number = 4 ,
179
303
oneof = "event_type" ,
180
- message = UnsupportedPolicyEvent ,
304
+ message = ConfigErrorEvent ,
181
305
)
182
306
183
307
0 commit comments