component_settings.proto 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. // Copyright 2020 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.securitycenter.settings.v1beta1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/timestamp.proto";
  19. option cc_enable_arenas = true;
  20. option csharp_namespace = "Google.Cloud.SecurityCenter.Settings.V1Beta1";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/settings/v1beta1;settings";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "ComponentSettingsProto";
  24. option java_package = "com.google.cloud.securitycenter.settings.v1beta1";
  25. option php_namespace = "Google\\Cloud\\SecurityCenter\\Settings\\V1beta1";
  26. option ruby_package = "Google::Cloud::SecurityCenter::Settings::V1beta1";
  27. // Component Settings for Security Command Center
  28. message ComponentSettings {
  29. option (google.api.resource) = {
  30. type: "securitycenter.googleapis.com/ComponentSettings"
  31. pattern: "organizations/{organization}/components/{component}/settings"
  32. pattern: "folders/{folder}/components/{component}/settings"
  33. pattern: "projects/{project}/components/{component}/settings"
  34. pattern: "projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings"
  35. pattern: "projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings"
  36. pattern: "projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings"
  37. };
  38. // Settings for each detector.
  39. message DetectorSettings {
  40. // ENABLE to enable component, DISABLE to disable and INHERIT to inherit
  41. // setting from ancestors.
  42. ComponentEnablementState state = 1;
  43. }
  44. // The relative resource name of the component settings.
  45. // Formats:
  46. // * `organizations/{organization}/components/{component}/settings`
  47. // * `folders/{folder}/components/{component}/settings`
  48. // * `projects/{project}/components/{component}/settings`
  49. // * `projects/{project}/locations/{location}/clusters/{cluster}/components/{component}/settings`
  50. // * `projects/{project}/regions/{region}/clusters/{cluster}/components/{component}/settings`
  51. // * `projects/{project}/zones/{zone}/clusters/{cluster}/components/{component}/settings`
  52. string name = 1;
  53. // ENABLE to enable component, DISABLE to disable and INHERIT to inherit
  54. // setting from ancestors.
  55. ComponentEnablementState state = 2;
  56. // Output only. The service account to be used for security center component.
  57. // The component must have permission to "act as" the service account.
  58. string project_service_account = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  59. // Settings for detectors. Not all detectors must have settings present at
  60. // each and every level in the hierarchy. If it is not present the setting
  61. // will be inherited from its ancestors folders, organizations or the
  62. // defaults.
  63. map<string, DetectorSettings> detector_settings = 4;
  64. // Output only. An fingerprint used for optimistic concurrency. If none is provided
  65. // on updates then the existing metadata will be blindly overwritten.
  66. string etag = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  67. // Output only. The time these settings were last updated.
  68. google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  69. // Component specific settings. This must match the component value.
  70. oneof specific_settings {
  71. // Container Threate Detection specific settings
  72. // For component, expect CONTAINER_THREAT_DETECTION
  73. ContainerThreatDetectionSettings container_threat_detection_settings = 41;
  74. // Event Threat Detection specific settings
  75. // For component, expect EVENT_THREAT_DETECTION
  76. EventThreatDetectionSettings event_threat_detection_settings = 42;
  77. // Security Health Analytics specific settings
  78. // For component, expect SECURITY_HEALTH_ANALYTICS
  79. SecurityHealthAnalyticsSettings security_health_analytics_settings = 44;
  80. // Web Security Scanner specific settings
  81. // For component, expect WEB_SECURITY_SCANNER
  82. WebSecurityScanner web_security_scanner_settings = 40;
  83. }
  84. }
  85. // User specified settings for Web Security Scanner
  86. message WebSecurityScanner {
  87. }
  88. // User specified settings for KTD
  89. message ContainerThreatDetectionSettings {
  90. }
  91. // User specified settings for ETD
  92. message EventThreatDetectionSettings {
  93. }
  94. // User specified settings for Security Health Analytics
  95. message SecurityHealthAnalyticsSettings {
  96. // Settings for "NON_ORG_IAM_MEMBER" scanner.
  97. message NonOrgIamMemberSettings {
  98. // User emails ending in the provided identities are allowed to have IAM
  99. // permissions on a project or the organization. Otherwise a finding will
  100. // be created.
  101. // A valid identity can be:
  102. // * a domain that starts with "@", e.g. "@yourdomain.com".
  103. // * a fully specified email address that does not start with "@", e.g.
  104. // "abc@gmail.com"
  105. // Regular expressions are not supported.
  106. // Service accounts are not examined by the scanner and will be omitted if
  107. // added to the list.
  108. // If not specified, only Gmail accounts will be considered as non-approved.
  109. repeated string approved_identities = 1;
  110. }
  111. // Settings for "ADMIN_SERVICE_ACCOUNT" scanner.
  112. message AdminServiceAccountSettings {
  113. // User-created service accounts ending in the provided identities are
  114. // allowed to have Admin, Owner or Editor roles granted to them. Otherwise
  115. // a finding will be created.
  116. // A valid identity can be:
  117. // * a partilly specified service account that starts with "@", e.g.
  118. // "@myproject.iam.gserviceaccount.com". This approves all the service
  119. // accounts suffixed with the specified identity.
  120. // * a fully specified service account that does not start with "@", e.g.
  121. // "myadmin@myproject.iam.gserviceaccount.com".
  122. // Google-created service accounts are all approved.
  123. repeated string approved_identities = 1;
  124. }
  125. // Settings for "NON_ORG_IAM_MEMBER" scanner.
  126. NonOrgIamMemberSettings non_org_iam_member_settings = 1;
  127. // Settings for "ADMIN_SERVICE_ACCOUNT" scanner.
  128. AdminServiceAccountSettings admin_service_account_settings = 2;
  129. }
  130. // Valid states for a component
  131. enum ComponentEnablementState {
  132. // No state specified, equivalent of INHERIT
  133. COMPONENT_ENABLEMENT_STATE_UNSPECIFIED = 0;
  134. // Disable the component
  135. DISABLE = 1;
  136. // Enable the component
  137. ENABLE = 2;
  138. // Inherit the state from resources parent folder or organization.
  139. INHERIT = 3;
  140. }