settings.proto 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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/cloud/securitycenter/settings/v1beta1/billing_settings.proto";
  19. import "google/cloud/securitycenter/settings/v1beta1/component_settings.proto";
  20. import "google/cloud/securitycenter/settings/v1beta1/sink_settings.proto";
  21. import "google/protobuf/timestamp.proto";
  22. import "google/api/annotations.proto";
  23. option cc_enable_arenas = true;
  24. option csharp_namespace = "Google.Cloud.SecurityCenter.Settings.V1Beta1";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/settings/v1beta1;settings";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "SettingsProto";
  28. option java_package = "com.google.cloud.securitycenter.settings.v1beta1";
  29. option php_namespace = "Google\\Cloud\\SecurityCenter\\Settings\\V1beta1";
  30. option ruby_package = "Google::Cloud::SecurityCenter::Settings::V1beta1";
  31. // Common configuration settings for all of Security Center.
  32. message Settings {
  33. option (google.api.resource) = {
  34. type: "securitycenter.googleapis.com/Settings"
  35. pattern: "organizations/{organization}/settings"
  36. pattern: "folders/{folder}/settings"
  37. pattern: "projects/{project}/settings"
  38. pattern: "projects/{project}/locations/{location}/clusters/{cluster}/settings"
  39. pattern: "projects/{project}/regions/{region}/clusters/{cluster}/settings"
  40. pattern: "projects/{project}/zones/{zone}/clusters/{cluster}/settings"
  41. };
  42. // The DetectorGroupSettings define the configuration for a detector group.
  43. message DetectorGroupSettings {
  44. // The state determines if the group is enabled or not.
  45. ComponentEnablementState state = 1;
  46. }
  47. // Defines the onboarding states for SCC
  48. //
  49. // Potentially is just an indicator that a user has reviewed some subset of
  50. // our configuration surface, even if it's still currently set to its
  51. // API-default state.
  52. enum OnboardingState {
  53. // No onboarding state has been set. Should not be seen in practice, but
  54. // should be functionally equivalent to DISABLED.
  55. ONBOARDING_STATE_UNSPECIFIED = 0;
  56. // SCC is fully on boarded
  57. ENABLED = 1;
  58. // SCC has been disabled after being on boarded
  59. DISABLED = 2;
  60. // SCC's onboarding tier has been explicitly set
  61. BILLING_SELECTED = 3;
  62. // SCC's CTD FindingsProviders have been chosen
  63. PROVIDERS_SELECTED = 4;
  64. // SCC's Service-Resource mappings have been set
  65. RESOURCES_SELECTED = 5;
  66. // SCC's core Service Account was created
  67. ORG_SERVICE_ACCOUNT_CREATED = 6;
  68. }
  69. // The relative resource name of the settings resource.
  70. // Formats:
  71. // * `organizations/{organization}/settings`
  72. // * `folders/{folder}/settings`
  73. // * `projects/{project}/settings`
  74. // * `projects/{project}/locations/{location}/clusters/{cluster}/settings`
  75. // * `projects/{project}/regions/{region}/clusters/{cluster}/settings`
  76. // * `projects/{project}/zones/{zone}/clusters/{cluster}/settings`
  77. string name = 1;
  78. // Billing settings
  79. BillingSettings billing_settings = 2;
  80. // An enum representing the current on boarding state of SCC.
  81. OnboardingState state = 3;
  82. // Output only. The organization-level service account to be used for security center
  83. // components. The component must have permission to "act as" the service
  84. // account.
  85. string org_service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  86. // Sink settings.
  87. SinkSettings sink_settings = 6;
  88. // The settings for detectors and/or scanners.
  89. map<string, ComponentSettings> component_settings = 7;
  90. // Detector group settings for all Security Center components.
  91. // The key is the name of the detector group and the value is the settings for
  92. // that group.
  93. map<string, DetectorGroupSettings> detector_group_settings = 8;
  94. // A fingerprint used for optimistic concurrency. If none is provided
  95. // on updates then the existing metadata will be blindly overwritten.
  96. string etag = 9;
  97. // Output only. The time these settings were last updated.
  98. google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  99. }