settings.proto 4.6 KB

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