continuous_validation_logging.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. syntax = "proto3";
  15. package google.cloud.binaryauthorization.v1beta1;
  16. import "google/protobuf/timestamp.proto";
  17. option cc_enable_arenas = true;
  18. option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1Beta1";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1;binaryauthorization";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "ContinuousValidationLoggingProto";
  22. option java_package = "com.google.cloud.binaryauthorization.v1beta1";
  23. option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1beta1";
  24. option ruby_package = "Google::Cloud::BinaryAuthorization::V1beta1";
  25. // Represents an auditing event from Continuous Validation.
  26. message ContinuousValidationEvent {
  27. // An auditing event for one Pod.
  28. message ContinuousValidationPodEvent {
  29. // Audit time policy conformance verdict.
  30. enum PolicyConformanceVerdict {
  31. // We should always have a verdict. This is an error.
  32. POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0;
  33. // The pod violates the policy.
  34. VIOLATES_POLICY = 1;
  35. }
  36. // Container image with auditing details.
  37. message ImageDetails {
  38. // Result of the audit.
  39. enum AuditResult {
  40. // Unspecified result. This is an error.
  41. AUDIT_RESULT_UNSPECIFIED = 0;
  42. // Image is allowed.
  43. ALLOW = 1;
  44. // Image is denied.
  45. DENY = 2;
  46. }
  47. // The name of the image.
  48. string image = 1;
  49. // The result of the audit for this image.
  50. AuditResult result = 2;
  51. // Description of the above result.
  52. string description = 3;
  53. }
  54. // The k8s namespace of the Pod.
  55. string pod_namespace = 7;
  56. // The name of the Pod.
  57. string pod = 1;
  58. // Deploy time of the Pod from k8s.
  59. google.protobuf.Timestamp deploy_time = 2;
  60. // Termination time of the Pod from k8s, or nothing if still running.
  61. google.protobuf.Timestamp end_time = 3;
  62. // Auditing verdict for this Pod.
  63. PolicyConformanceVerdict verdict = 4;
  64. // List of images with auditing details.
  65. repeated ImageDetails images = 5;
  66. }
  67. // An event describing that the project policy is unsupported by CV.
  68. message UnsupportedPolicyEvent {
  69. // A description of the unsupported policy.
  70. string description = 1;
  71. }
  72. // Type of CV event.
  73. oneof event_type {
  74. // Pod event.
  75. ContinuousValidationPodEvent pod_event = 1;
  76. // Unsupported policy event.
  77. UnsupportedPolicyEvent unsupported_policy_event = 2;
  78. }
  79. }