1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.cloud.securitycenter.v2; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/timestamp.proto"; 22 23option csharp_namespace = "Google.Cloud.SecurityCenter.V2"; 24option go_package = "cloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb"; 25option java_multiple_files = true; 26option java_outer_classname = "MuteConfigProto"; 27option java_package = "com.google.cloud.securitycenter.v2"; 28option php_namespace = "Google\\Cloud\\SecurityCenter\\V2"; 29option ruby_package = "Google::Cloud::SecurityCenter::V2"; 30 31// A mute config is a Cloud SCC resource that contains the configuration 32// to mute create/update events of findings. 33message MuteConfig { 34 option (google.api.resource) = { 35 type: "securitycenter.googleapis.com/MuteConfig" 36 pattern: "organizations/{organization}/muteConfigs/{mute_config}" 37 pattern: "organizations/{organization}/locations/{location}/muteConfigs/{mute_config}" 38 pattern: "folders/{folder}/muteConfigs/{mute_config}" 39 pattern: "folders/{folder}/locations/{location}/muteConfigs/{mute_config}" 40 pattern: "projects/{project}/muteConfigs/{mute_config}" 41 pattern: "projects/{project}/locations/{location}/muteConfigs/{mute_config}" 42 plural: "muteConfigs" 43 singular: "muteConfig" 44 }; 45 46 // The type of MuteConfig. 47 enum MuteConfigType { 48 // Unused. 49 MUTE_CONFIG_TYPE_UNSPECIFIED = 0; 50 51 // A static mute config, which sets the static mute state of future matching 52 // findings to muted. Once the static mute state has been set, finding or 53 // config modifications will not affect the state. 54 STATIC = 1; 55 } 56 57 // This field will be ignored if provided on config creation. The following 58 // list shows some examples of the format: 59 // 60 // + `organizations/{organization}/muteConfigs/{mute_config}` 61 // + 62 // `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` 63 // + `folders/{folder}/muteConfigs/{mute_config}` 64 // + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` 65 // + `projects/{project}/muteConfigs/{mute_config}` 66 // + `projects/{project}/locations/{location}/muteConfigs/{mute_config}` 67 string name = 1; 68 69 // A description of the mute config. 70 string description = 2; 71 72 // Required. An expression that defines the filter to apply across 73 // create/update events of findings. While creating a filter string, be 74 // mindful of the scope in which the mute configuration is being created. 75 // E.g., If a filter contains project = X but is created under the project = Y 76 // scope, it might not match any findings. 77 // 78 // The following field and operator combinations are supported: 79 // 80 // * severity: `=`, `:` 81 // * category: `=`, `:` 82 // * resource.name: `=`, `:` 83 // * resource.project_name: `=`, `:` 84 // * resource.project_display_name: `=`, `:` 85 // * resource.folders.resource_folder: `=`, `:` 86 // * resource.parent_name: `=`, `:` 87 // * resource.parent_display_name: `=`, `:` 88 // * resource.type: `=`, `:` 89 // * finding_class: `=`, `:` 90 // * indicator.ip_addresses: `=`, `:` 91 // * indicator.domains: `=`, `:` 92 string filter = 3 [(google.api.field_behavior) = REQUIRED]; 93 94 // Output only. The time at which the mute config was created. 95 // This field is set by the server and will be ignored if provided on config 96 // creation. 97 google.protobuf.Timestamp create_time = 4 98 [(google.api.field_behavior) = OUTPUT_ONLY]; 99 100 // Output only. The most recent time at which the mute config was updated. 101 // This field is set by the server and will be ignored if provided on config 102 // creation or update. 103 google.protobuf.Timestamp update_time = 5 104 [(google.api.field_behavior) = OUTPUT_ONLY]; 105 106 // Output only. Email address of the user who last edited the mute config. 107 // This field is set by the server and will be ignored if provided on config 108 // creation or update. 109 string most_recent_editor = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 110 111 // Required. The type of the mute config, which determines what type of mute 112 // state the config affects. Immutable after creation. 113 MuteConfigType type = 8 [(google.api.field_behavior) = REQUIRED]; 114} 115