xref: /aosp_15_r20/external/googleapis/google/cloud/securityposture/v1/sha_constraints.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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.securityposture.v1;
18
19import "google/api/field_behavior.proto";
20import "google/cloud/securityposture/v1/sha_custom_config.proto";
21
22option go_package = "cloud.google.com/go/securityposture/apiv1/securityposturepb;securityposturepb";
23option java_multiple_files = true;
24option java_outer_classname = "ShaConstraintsProto";
25option java_package = "com.google.cloud.securityposture.v1";
26
27// Possible enablement states of a service or module.
28enum EnablementState {
29  // Default value. This value is unused.
30  ENABLEMENT_STATE_UNSPECIFIED = 0;
31
32  // State is enabled.
33  ENABLED = 1;
34
35  // State is disabled.
36  DISABLED = 2;
37}
38
39// Message for Security Health Analytics built-in detector.
40message SecurityHealthAnalyticsModule {
41  // Required. The name of the module eg: BIGQUERY_TABLE_CMEK_DISABLED.
42  string module_name = 1 [(google.api.field_behavior) = REQUIRED];
43
44  // The state of enablement for the module at its level of the resource
45  // hierarchy.
46  EnablementState module_enablement_state = 2;
47}
48
49// Message for SHA Custom Module
50message SecurityHealthAnalyticsCustomModule {
51  // Output only. Immutable. The id of the custom module.
52  // The id is server-generated and is not user settable.
53  // It will be a numeric id containing 1-20 digits.
54  string id = 1 [
55    (google.api.field_behavior) = IMMUTABLE,
56    (google.api.field_behavior) = OUTPUT_ONLY
57  ];
58
59  // Optional. The display name of the Security Health Analytics custom module.
60  // This display name becomes the finding category for all findings that are
61  // returned by this custom module. The display name must be between 1 and
62  // 128 characters, start with a lowercase letter, and contain alphanumeric
63  // characters or underscores only.
64  string display_name = 2 [(google.api.field_behavior) = OPTIONAL];
65
66  // Required. custom module details
67  CustomConfig config = 3 [(google.api.field_behavior) = REQUIRED];
68
69  // The state of enablement for the module at its level of the resource
70  // hierarchy.
71  EnablementState module_enablement_state = 4;
72}
73