/
security_center_management.proto
1452 lines (1275 loc) · 63.7 KB
/
security_center_management.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.securitycentermanagement.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/iam/v1/policy.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
import "google/type/expr.proto";
option csharp_namespace = "Google.Cloud.SecurityCenterManagement.V1";
option go_package = "cloud.google.com/go/securitycentermanagement/apiv1/securitycentermanagementpb;securitycentermanagementpb";
option java_multiple_files = true;
option java_outer_classname = "SecurityCenterManagementProto";
option java_package = "com.google.cloud.securitycentermanagement.v1";
option php_namespace = "Google\\Cloud\\SecurityCenterManagement\\V1";
option ruby_package = "Google::Cloud::SecurityCenterManagement::V1";
option (google.api.resource_definition) = {
type: "securitycentermanagement.googleapis.com/OrganizationLocation"
pattern: "organizations/{organization}/locations/{location}"
};
option (google.api.resource_definition) = {
type: "securitycentermanagement.googleapis.com/FolderLocation"
pattern: "folders/{folder}/locations/{location}"
};
// Service describing handlers for resources
service SecurityCenterManagement {
option (google.api.default_host) = "securitycentermanagement.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";
// Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the
// given parent. This includes resident modules defined at the scope of the
// parent, and inherited modules, inherited from CRM ancestors (no
// descendants).
rpc ListEffectiveSecurityHealthAnalyticsCustomModules(
ListEffectiveSecurityHealthAnalyticsCustomModulesRequest)
returns (ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules"
additional_bindings {
get: "/v1/{parent=folders/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules"
}
additional_bindings {
get: "/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules"
}
};
option (google.api.method_signature) = "parent";
}
// Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule.
rpc GetEffectiveSecurityHealthAnalyticsCustomModule(
GetEffectiveSecurityHealthAnalyticsCustomModuleRequest)
returns (EffectiveSecurityHealthAnalyticsCustomModule) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}"
additional_bindings {
get: "/v1/{name=folders/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}"
}
additional_bindings {
get: "/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}"
}
};
option (google.api.method_signature) = "name";
}
// Returns a list of all SecurityHealthAnalyticsCustomModules for the given
// parent. This includes resident modules defined at the scope of the parent,
// and inherited modules, inherited from CRM ancestors (no descendants).
rpc ListSecurityHealthAnalyticsCustomModules(
ListSecurityHealthAnalyticsCustomModulesRequest)
returns (ListSecurityHealthAnalyticsCustomModulesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules"
additional_bindings {
get: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules"
}
additional_bindings {
get: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules"
}
};
option (google.api.method_signature) = "parent";
}
// Returns a list of all resident SecurityHealthAnalyticsCustomModules under
// the given CRM parent and all of the parent's CRM descendants.
rpc ListDescendantSecurityHealthAnalyticsCustomModules(
ListDescendantSecurityHealthAnalyticsCustomModulesRequest)
returns (ListDescendantSecurityHealthAnalyticsCustomModulesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant"
additional_bindings {
get: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant"
}
additional_bindings {
get: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant"
}
};
option (google.api.method_signature) = "parent";
}
// Retrieves a SecurityHealthAnalyticsCustomModule.
rpc GetSecurityHealthAnalyticsCustomModule(
GetSecurityHealthAnalyticsCustomModuleRequest)
returns (SecurityHealthAnalyticsCustomModule) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}"
additional_bindings {
get: "/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}"
}
additional_bindings {
get: "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}"
}
};
option (google.api.method_signature) = "name";
}
// Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the
// given CRM parent, and also creates inherited
// SecurityHealthAnalyticsCustomModules for all CRM descendants of the given
// parent. These modules are enabled by default.
rpc CreateSecurityHealthAnalyticsCustomModule(
CreateSecurityHealthAnalyticsCustomModuleRequest)
returns (SecurityHealthAnalyticsCustomModule) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules"
body: "security_health_analytics_custom_module"
additional_bindings {
post: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules"
body: "security_health_analytics_custom_module"
}
additional_bindings {
post: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules"
body: "security_health_analytics_custom_module"
}
};
option (google.api.method_signature) =
"parent,security_health_analytics_custom_module";
}
// Updates the SecurityHealthAnalyticsCustomModule under the given name based
// on the given update mask. Updating the enablement state is supported on
// both resident and inherited modules (though resident modules cannot have an
// enablement state of "inherited"). Updating the display name and custom
// config of a module is supported on resident modules only.
rpc UpdateSecurityHealthAnalyticsCustomModule(
UpdateSecurityHealthAnalyticsCustomModuleRequest)
returns (SecurityHealthAnalyticsCustomModule) {
option (google.api.http) = {
patch: "/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}"
body: "security_health_analytics_custom_module"
additional_bindings {
patch: "/v1/{security_health_analytics_custom_module.name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}"
body: "security_health_analytics_custom_module"
}
additional_bindings {
patch: "/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}"
body: "security_health_analytics_custom_module"
}
};
option (google.api.method_signature) =
"security_health_analytics_custom_module,update_mask";
}
// Deletes the specified SecurityHealthAnalyticsCustomModule and all of its
// descendants in the CRM hierarchy. This method is only supported for
// resident custom modules.
rpc DeleteSecurityHealthAnalyticsCustomModule(
DeleteSecurityHealthAnalyticsCustomModuleRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}"
additional_bindings {
delete: "/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}"
}
additional_bindings {
delete: "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}"
}
};
option (google.api.method_signature) = "name";
}
// Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
rpc SimulateSecurityHealthAnalyticsCustomModule(
SimulateSecurityHealthAnalyticsCustomModuleRequest)
returns (SimulateSecurityHealthAnalyticsCustomModuleResponse) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate"
body: "*"
additional_bindings {
post: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:simulate"
body: "*"
}
additional_bindings {
post: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate"
body: "*"
}
};
option (google.api.method_signature) = "parent,custom_config,resource";
}
// Lists all effective Event Threat Detection custom modules for the
// given parent. This includes resident modules defined at the scope of the
// parent along with modules inherited from its ancestors.
rpc ListEffectiveEventThreatDetectionCustomModules(
ListEffectiveEventThreatDetectionCustomModulesRequest)
returns (ListEffectiveEventThreatDetectionCustomModulesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModules"
additional_bindings {
get: "/v1/{parent=folders/*/locations/*}/effectiveEventThreatDetectionCustomModules"
}
additional_bindings {
get: "/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules"
}
};
option (google.api.method_signature) = "parent";
}
// Gets an effective ETD custom module. Retrieves the effective module at the
// given level. The difference between an EffectiveCustomModule and a
// CustomModule is that the fields for an EffectiveCustomModule are computed
// from ancestors if needed. For example, the enablement_state for a
// CustomModule can be either ENABLED, DISABLED, or INHERITED. Where as the
// enablement_state for an EffectiveCustomModule is always computed to ENABLED
// or DISABLED (the effective enablement_state).
rpc GetEffectiveEventThreatDetectionCustomModule(
GetEffectiveEventThreatDetectionCustomModuleRequest)
returns (EffectiveEventThreatDetectionCustomModule) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}"
additional_bindings {
get: "/v1/{name=folders/*/locations/*/effectiveEventThreatDetectionCustomModules/*}"
}
additional_bindings {
get: "/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}"
}
};
option (google.api.method_signature) = "name";
}
// Lists all Event Threat Detection custom modules for the given
// Resource Manager parent. This includes resident modules defined at the
// scope of the parent along with modules inherited from ancestors.
rpc ListEventThreatDetectionCustomModules(
ListEventThreatDetectionCustomModulesRequest)
returns (ListEventThreatDetectionCustomModulesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules"
additional_bindings {
get: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules"
}
additional_bindings {
get: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules"
}
};
option (google.api.method_signature) = "parent";
}
// Lists all resident Event Threat Detection custom modules under the
// given Resource Manager parent and its descendants.
rpc ListDescendantEventThreatDetectionCustomModules(
ListDescendantEventThreatDetectionCustomModulesRequest)
returns (ListDescendantEventThreatDetectionCustomModulesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendant"
additional_bindings {
get: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:listDescendant"
}
additional_bindings {
get: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant"
}
};
option (google.api.method_signature) = "parent";
}
// Gets an Event Threat Detection custom module.
rpc GetEventThreatDetectionCustomModule(
GetEventThreatDetectionCustomModuleRequest)
returns (EventThreatDetectionCustomModule) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}"
additional_bindings {
get: "/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}"
}
additional_bindings {
get: "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}"
}
};
option (google.api.method_signature) = "name";
}
// Creates a resident Event Threat Detection custom module at the scope of the
// given Resource Manager parent, and also creates inherited custom modules
// for all descendants of the given parent. These modules are enabled by
// default.
rpc CreateEventThreatDetectionCustomModule(
CreateEventThreatDetectionCustomModuleRequest)
returns (EventThreatDetectionCustomModule) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules"
body: "event_threat_detection_custom_module"
additional_bindings {
post: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules"
body: "event_threat_detection_custom_module"
}
additional_bindings {
post: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules"
body: "event_threat_detection_custom_module"
}
};
option (google.api.method_signature) =
"parent,event_threat_detection_custom_module";
}
// Updates the Event Threat Detection custom module with the given name based
// on the given update mask. Updating the enablement state is supported for
// both resident and inherited modules (though resident modules cannot have an
// enablement state of "inherited"). Updating the display name or
// configuration of a module is supported for resident modules only. The type
// of a module cannot be changed.
rpc UpdateEventThreatDetectionCustomModule(
UpdateEventThreatDetectionCustomModuleRequest)
returns (EventThreatDetectionCustomModule) {
option (google.api.http) = {
patch: "/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}"
body: "event_threat_detection_custom_module"
additional_bindings {
patch: "/v1/{event_threat_detection_custom_module.name=folders/*/locations/*/eventThreatDetectionCustomModules/*}"
body: "event_threat_detection_custom_module"
}
additional_bindings {
patch: "/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}"
body: "event_threat_detection_custom_module"
}
};
option (google.api.method_signature) =
"event_threat_detection_custom_module,update_mask";
}
// Deletes the specified Event Threat Detection custom module and all of its
// descendants in the Resource Manager hierarchy. This method is only
// supported for resident custom modules.
rpc DeleteEventThreatDetectionCustomModule(
DeleteEventThreatDetectionCustomModuleRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}"
additional_bindings {
delete: "/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}"
}
additional_bindings {
delete: "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}"
}
};
option (google.api.method_signature) = "name";
}
// Validates the given Event Threat Detection custom module.
rpc ValidateEventThreatDetectionCustomModule(
ValidateEventThreatDetectionCustomModuleRequest)
returns (ValidateEventThreatDetectionCustomModuleResponse) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate"
body: "*"
additional_bindings {
post: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:validate"
body: "*"
}
additional_bindings {
post: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate"
body: "*"
}
};
}
}
// An EffectiveSecurityHealthAnalyticsCustomModule is the representation of
// a Security Health Analytics custom module at a specified level of the
// resource hierarchy: organization, folder, or project. If a custom module is
// inherited from a parent organization or folder, the value of the
// `enablementState` property in EffectiveSecurityHealthAnalyticsCustomModule is
// set to the value that is effective in the parent, instead of `INHERITED`.
// For example, if the module is enabled in a parent organization or folder, the
// effective enablement_state for the module in all child folders or projects is
// also `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only.
message EffectiveSecurityHealthAnalyticsCustomModule {
option (google.api.resource) = {
type: "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule"
pattern: "organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}"
pattern: "projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}"
pattern: "folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}"
plural: "effectiveSecurityHealthAnalyticsCustomModules"
singular: "effectiveSecurityHealthAnalyticsCustomModule"
};
// The enablement state of the module.
enum EnablementState {
// Unspecified enablement state.
ENABLEMENT_STATE_UNSPECIFIED = 0;
// The module is enabled at the given level.
ENABLED = 1;
// The module is disabled at the given level.
DISABLED = 2;
}
// Identifier. The resource name of the custom module.
// Its format is
// "organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}",
// or
// "folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}",
// or
// "projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}"
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
// Output only. The user-specified configuration for the module.
CustomConfig custom_config = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The effective state of enablement for the module at the given
// level of the hierarchy.
EnablementState enablement_state = 3
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The display name for the custom module. The name must be
// between 1 and 128 characters, start with a lowercase letter, and contain
// alphanumeric characters or underscores only.
string display_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Request message for listing effective Security Health Analytics custom
// modules.
message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest {
// Required. Name of parent to list effective custom modules. Its format is
// "organizations/{organization}/locations/{location}",
// "folders/{folder}/locations/{location}",
// or
// "projects/{project}/locations/{location}"
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule"
}
];
// Optional. The maximum number of results to return in a single response.
// Default is 10, minimum is 1, maximum is 1000.
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. The value returned by the last call indicating a continuation.
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Response message for listing effective Security Health Analytics custom
// modules.
message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse {
// The list of EffectiveSecurityHealthAnalyticsCustomModule
repeated EffectiveSecurityHealthAnalyticsCustomModule
effective_security_health_analytics_custom_modules = 1;
// A token identifying a page of results the server should return.
string next_page_token = 2;
}
// Message for getting a EffectiveSecurityHealthAnalyticsCustomModule
message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest {
// Required. The resource name of the SHA custom module.
//
// Its format is:
//
// * "organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{module_id}".
// * "folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{module_id}".
// * "projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{module_id}".
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule"
}
];
}
// Represents an instance of a Security Health Analytics custom module,
// including its full module name, display name, enablement state, and last
// updated time. You can create a custom module at the organization, folder, or
// project level. Custom modules that you create at the organization or folder
// level are inherited by the child folders and projects.
message SecurityHealthAnalyticsCustomModule {
option (google.api.resource) = {
type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule"
pattern: "organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}"
pattern: "projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}"
pattern: "folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}"
plural: "securityHealthAnalyticsCustomModules"
singular: "securityHealthAnalyticsCustomModule"
};
// Possible enablement states of a custom module.
enum EnablementState {
// Unspecified enablement state.
ENABLEMENT_STATE_UNSPECIFIED = 0;
// The module is enabled at the given CRM resource.
ENABLED = 1;
// The module is disabled at the given CRM resource.
DISABLED = 2;
// State is inherited from an ancestor module. The module will either
// be effectively ENABLED or DISABLED based on its closest non-inherited
// ancestor module in the CRM hierarchy. Attempting to set a top level
// module (module with no parent) to the INHERITED state will result in an
// INVALID_ARGUMENT error.
INHERITED = 3;
}
// Identifier. The resource name of the custom module.
// Its format is
// "organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}",
// or
// "folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}",
// or
// "projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}"
//
// The id {customModule} is server-generated and is not user settable.
// It will be a numeric id containing 1-20 digits.
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
// Optional. The display name of the Security Health Analytics custom module.
// This display name becomes the finding category for all findings that are
// returned by this custom module. The display name must be between 1 and
// 128 characters, start with a lowercase letter, and contain alphanumeric
// characters or underscores only.
string display_name = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. The enablement state of the custom module.
EnablementState enablement_state = 3 [(google.api.field_behavior) = OPTIONAL];
// Output only. The time at which the custom module was last updated.
google.protobuf.Timestamp update_time = 4
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The editor that last updated the custom module.
string last_editor = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Specifies the organization or folder from which the custom
// module is inherited. If empty, indicates that the custom module was created
// in the organization, folder, or project in which you are viewing the custom
// module.
string ancestor_module = 6 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule"
}
];
// Optional. The user specified custom configuration for the module.
CustomConfig custom_config = 7 [(google.api.field_behavior) = OPTIONAL];
}
// Defines the properties in a custom module configuration for Security
// Health Analytics. Use the custom module configuration to create custom
// detectors that generate custom findings for resources that you specify.
message CustomConfig {
// A set of optional name-value pairs that define custom source properties to
// return with each finding that is generated by the custom module. The custom
// source properties that are defined here are included in the finding JSON
// under `sourceProperties`.
message CustomOutputSpec {
// An individual name-value pair that defines a custom source property.
message Property {
// Optional. Name of the property for the custom output.
string name = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. The CEL expression for the custom output. A resource property
// can be specified to return the value of the property or a text string
// enclosed in quotation marks.
google.type.Expr value_expression = 2
[(google.api.field_behavior) = OPTIONAL];
}
// Optional. A list of custom output properties to add to the finding.
repeated Property properties = 1 [(google.api.field_behavior) = OPTIONAL];
}
// Resource for selecting resource type.
message ResourceSelector {
// Optional. The resource types to run the detector on.
repeated string resource_types = 1 [(google.api.field_behavior) = OPTIONAL];
}
// Defines the valid value options for the severity of a finding.
enum Severity {
// Unspecified severity.
SEVERITY_UNSPECIFIED = 0;
// Critical severity.
CRITICAL = 1;
// High severity.
HIGH = 2;
// Medium severity.
MEDIUM = 3;
// Low severity.
LOW = 4;
}
// Optional. The CEL expression to evaluate to produce findings. When the
// expression evaluates to true against a resource, a finding is generated.
google.type.Expr predicate = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Custom output properties.
CustomOutputSpec custom_output = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. The Cloud Asset Inventory resource types that the custom module
// operates on. For information about resource types, see [Supported asset
// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types).
// Each custom module can specify up to 5 resource types.
ResourceSelector resource_selector = 3
[(google.api.field_behavior) = OPTIONAL];
// Optional. The severity to assign to findings generated by the module.
Severity severity = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. Text that describes the vulnerability or misconfiguration that
// the custom module detects. This explanation is returned with each finding
// instance to help investigators understand the detected issue. The text must
// be enclosed in quotation marks.
string description = 5 [(google.api.field_behavior) = OPTIONAL];
// Optional. An explanation of the recommended steps that security teams can
// take to resolve the detected issue. This explanation is returned with each
// finding generated by this module in the `nextSteps` property of the finding
// JSON.
string recommendation = 6 [(google.api.field_behavior) = OPTIONAL];
}
// Request message for listing Security Health Analytics custom modules.
message ListSecurityHealthAnalyticsCustomModulesRequest {
// Required. Name of parent to list custom modules. Its format is
// "organizations/{organization}/locations/{location}",
// "folders/{folder}/locations/{location}",
// or
// "projects/{project}/locations/{location}"
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule"
}
];
// Optional. The maximum number of results to return in a single response.
// Default is 10, minimum is 1, maximum is 1000.
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. A token identifying a page of results the server should return.
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Response message for listing Security Health Analytics custom modules.
message ListSecurityHealthAnalyticsCustomModulesResponse {
// The list of SecurityHealthAnalyticsCustomModules
repeated SecurityHealthAnalyticsCustomModule
security_health_analytics_custom_modules = 1;
// A token identifying a page of results the server should return.
string next_page_token = 2;
}
// Request message for listing descendant Security Health Analytics custom
// modules.
message ListDescendantSecurityHealthAnalyticsCustomModulesRequest {
// Required. Name of parent to list custom modules. Its format is
// "organizations/{organization}/locations/{location}",
// "folders/{folder}/locations/{location}",
// or
// "projects/{project}/locations/{location}"
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule"
}
];
// Optional. The maximum number of results to return in a single response.
// Default is 10, minimum is 1, maximum is 1000.
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. A token identifying a page of results the server should return.
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Response message for listing descendant Security Health Analytics custom
// modules.
message ListDescendantSecurityHealthAnalyticsCustomModulesResponse {
// The list of SecurityHealthAnalyticsCustomModules
repeated SecurityHealthAnalyticsCustomModule
security_health_analytics_custom_modules = 1;
// A token identifying a page of results the server should return.
string next_page_token = 2;
}
// Message for getting a SecurityHealthAnalyticsCustomModule
message GetSecurityHealthAnalyticsCustomModuleRequest {
// Required. Name of the resource
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule"
}
];
}
// Message for creating a SecurityHealthAnalyticsCustomModule
message CreateSecurityHealthAnalyticsCustomModuleRequest {
// Required. Name of the parent for the module. Its format is
// "organizations/{organization}/locations/{location}",
// "folders/{folder}/locations/{location}",
// or
// "projects/{project}/locations/{location}"
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule"
}
];
// Required. The resource being created
SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module =
2 [(google.api.field_behavior) = REQUIRED];
// Optional. When set to true, only validations (including IAM checks) will
// done for the request (no module will be created). An OK response indicates
// the request is valid while an error response indicates the request is
// invalid. Note that a subsequent request to actually create the module could
// still fail because:
// 1. the state could have changed (e.g. IAM permission lost) or
// 2. A failure occurred during creation of the module.
// Defaults to false.
bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Message for updating a SecurityHealthAnalyticsCustomModule
message UpdateSecurityHealthAnalyticsCustomModuleRequest {
// Required. The list of fields to be updated. The only fields that can be
// updated are `enablement_state` and `custom_config`. If empty or set to the
// wildcard value `*`, both `enablement_state` and `custom_config` are
// updated.
google.protobuf.FieldMask update_mask = 1
[(google.api.field_behavior) = REQUIRED];
// Required. The resource being updated
SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module =
2 [(google.api.field_behavior) = REQUIRED];
// Optional. When set to true, only validations (including IAM checks) will
// done for the request (module will not be updated). An OK response indicates
// the request is valid while an error response indicates the request is
// invalid. Note that a subsequent request to actually update the module could
// still fail because 1. the state could have changed (e.g. IAM permission
// lost) or
// 2. A failure occurred while trying to update the module.
bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Message for deleting a SecurityHealthAnalyticsCustomModule
message DeleteSecurityHealthAnalyticsCustomModuleRequest {
// Required. The resource name of the SHA custom module.
//
// Its format is:
//
// * "organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}".
// * "folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}".
// * "projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}".
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule"
}
];
// Optional. When set to true, only validations (including IAM checks) will
// done for the request (module will not be deleted). An OK response indicates
// the request is valid while an error response indicates the request is
// invalid. Note that a subsequent request to actually delete the module could
// still fail because 1. the state could have changed (e.g. IAM permission
// lost) or
// 2. A failure occurred while trying to delete the module.
bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL];
}
// Request message to simulate a CustomConfig against a given test resource.
// Maximum size of the request is 4 MB by default.
message SimulateSecurityHealthAnalyticsCustomModuleRequest {
// Manually constructed resource name. If the custom module evaluates against
// only the resource data, you can omit the `iam_policy_data` field. If it
// evaluates only the `iam_policy_data` field, you can omit the resource data.
message SimulatedResource {
// Required. The type of the resource, for example,
// `compute.googleapis.com/Disk`.
string resource_type = 1 [(google.api.field_behavior) = REQUIRED];
// Optional. A representation of the Google Cloud resource. Should match the
// Google Cloud resource JSON format.
google.protobuf.Struct resource_data = 2
[(google.api.field_behavior) = OPTIONAL];
// Optional. A representation of the IAM policy.
google.iam.v1.Policy iam_policy_data = 3
[(google.api.field_behavior) = OPTIONAL];
}
// Required. The relative resource name of the organization, project, or
// folder. For more information about relative resource names, see [Relative
// Resource
// Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
// Example: `organizations/{organization_id}`.
string parent = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The custom configuration that you need to test.
CustomConfig custom_config = 2 [(google.api.field_behavior) = REQUIRED];
// Required. Resource data to simulate custom module against.
SimulatedResource resource = 3 [(google.api.field_behavior) = REQUIRED];
}
// A subset of the fields of the Security Center Finding proto. The minimum set
// of fields needed to represent a simulated finding from a SHA custom module.
message SimulatedFinding {
option (google.api.resource) = {
type: "securitycenter.googleapis.com/Finding"
pattern: "organizations/{organization}/sources/{source}/findings/{finding}"
pattern: "folders/{folder}/sources/{source}/findings/{finding}"
pattern: "projects/{project}/sources/{source}/findings/{finding}"
plural: "findings"
singular: "finding"
};
// The state of the finding.
enum State {
// Unspecified state.
STATE_UNSPECIFIED = 0;
// The finding requires attention and has not been addressed yet.
ACTIVE = 1;
// The finding has been fixed, triaged as a non-issue or otherwise addressed
// and is no longer active.
INACTIVE = 2;
}
// The severity of the finding.
enum Severity {
// This value is used for findings when a source doesn't write a severity
// value.
SEVERITY_UNSPECIFIED = 0;
// Vulnerability:
// A critical vulnerability is easily discoverable by an external actor,
// exploitable, and results in the direct ability to execute arbitrary code,
// exfiltrate data, and otherwise gain additional access and privileges to
// cloud resources and workloads. Examples include publicly accessible
// unprotected user data and public SSH access with weak or no
// passwords.
//
// Threat:
// Indicates a threat that is able to access, modify, or delete data or
// execute unauthorized code within existing resources.
CRITICAL = 1;
// Vulnerability:
// A high risk vulnerability can be easily discovered and exploited in
// combination with other vulnerabilities in order to gain direct access and
// the ability to execute arbitrary code, exfiltrate data, and otherwise
// gain additional access and privileges to cloud resources and workloads.
// An example is a database with weak or no passwords that is only
// accessible internally. This database could easily be compromised by an
// actor that had access to the internal network.
//
// Threat:
// Indicates a threat that is able to create new computational resources in
// an environment but not able to access data or execute code in existing
// resources.
HIGH = 2;
// Vulnerability:
// A medium risk vulnerability could be used by an actor to gain access to
// resources or privileges that enable them to eventually (through multiple
// steps or a complex exploit) gain access and the ability to execute
// arbitrary code or exfiltrate data. An example is a service account with
// access to more projects than it should have. If an actor gains access to
// the service account, they could potentially use that access to manipulate
// a project the service account was not intended to.
//
// Threat:
// Indicates a threat that is able to cause operational impact but may not
// access data or execute unauthorized code.
MEDIUM = 3;
// Vulnerability:
// A low risk vulnerability hampers a security organization's ability to
// detect vulnerabilities or active threats in their deployment, or prevents
// the root cause investigation of security issues. An example is monitoring
// and logs being disabled for resource configurations and access.
//
// Threat:
// Indicates a threat that has obtained minimal access to an environment but
// is not able to access data, execute code, or create resources.
LOW = 4;
}
// Represents what kind of Finding it is.
enum FindingClass {
// Unspecified finding class.
FINDING_CLASS_UNSPECIFIED = 0;
// Describes unwanted or malicious activity.
THREAT = 1;
// Describes a potential weakness in software that increases risk to
// Confidentiality & Integrity & Availability.
VULNERABILITY = 2;
// Describes a potential weakness in cloud resource/asset configuration that
// increases risk.
MISCONFIGURATION = 3;
// Describes a security observation that is for informational purposes.
OBSERVATION = 4;
// Describes an error that prevents some SCC functionality.
SCC_ERROR = 5;
// Describes a potential security risk due to a change in the security
// posture.
POSTURE_VIOLATION = 6;
}
// Identifier. The [relative resource
// name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
// of the finding. Example:
// "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
// "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
// The relative resource name of the source the finding belongs to. See:
// https://cloud.google.com/apis/design/resource_names#relative_resource_name
// This field is immutable after creation time.
// For example:
// "organizations/{organization_id}/sources/{source_id}"
string parent = 2;
// For findings on Google Cloud resources, the full resource
// name of the Google Cloud resource this finding is for. See:
// https://cloud.google.com/apis/design/resource_names#full_resource_name
// When the finding is for a non-Google Cloud resource, the resourceName can
// be a customer or partner defined string. This field is immutable after
// creation time.
string resource_name = 3;
// The additional taxonomy group within findings from a given source.
// This field is immutable after creation time.
// Example: "XSS_FLASH_INJECTION"
string category = 4;
// Output only. The state of the finding.
State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Source specific properties. These properties are managed by the source
// that writes the finding. The key names in the source_properties map must be
// between 1 and 255 characters, and must start with a letter and contain
// alphanumeric characters or underscores only.
map<string, google.protobuf.Value> source_properties = 6;
// The time the finding was first detected. If an existing finding is updated,