Skip to content

Commit 027e977

Browse files
Google APIscopybara-github
Google APIs
authored andcommitted
feat: Add Resource to the vp1beta1 NotificationMessage, which contains resource-related fields associated to the Finding notification.
feat!: Removed 'having' as a field for the Group and List APIs for both Assets and Findings. docs: Adjusted wording from Cloud SCC to Security Command Center, and updated filtering docs for List APIs. BREAKING CHANGE: Removed 'having' as a field in the List and Group Finding and Asset requests. PiperOrigin-RevId: 315725809
1 parent 49e84e1 commit 027e977

13 files changed

+180
-123
lines changed

google/cloud/securitycenter/v1p1beta1/BUILD.bazel

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ proto_library(
1717
"notification_config.proto",
1818
"notification_message.proto",
1919
"organization_settings.proto",
20+
"resource.proto",
2021
"run_asset_discovery_response.proto",
2122
"security_marks.proto",
2223
"securitycenter_service.proto",
@@ -136,8 +137,8 @@ go_gapic_library(
136137
deps = [
137138
":securitycenter_go_proto",
138139
"//google/iam/v1:iam_go_proto",
139-
"//google/longrunning:longrunning_go_gapic",
140140
"//google/longrunning:longrunning_go_proto",
141+
"@com_google_cloud_go//longrunning/autogen:go_default_library",
141142
"@com_google_cloud_go//longrunning:go_default_library",
142143
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
143144
"@io_bazel_rules_go//proto/wkt:struct_go_proto",

google/cloud/securitycenter/v1p1beta1/asset.proto

+26-24
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2020 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

@@ -30,30 +29,31 @@ option java_package = "com.google.cloud.securitycenter.v1p1beta1";
3029
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1";
3130
option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1";
3231

33-
// Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud
34-
// Platform (GCP) resource.
32+
// Security Command Center representation of a Google Cloud
33+
// resource.
3534
//
36-
// The Asset is a Cloud SCC resource that captures information about a single
37-
// GCP resource. All modifications to an Asset are only within the context of
38-
// Cloud SCC and don't affect the referenced GCP resource.
35+
// The Asset is a Security Command Center resource that captures information
36+
// about a single Google Cloud resource. All modifications to an Asset are only
37+
// within the context of Security Command Center and don't affect the referenced
38+
// Google Cloud resource.
3939
message Asset {
4040
option (google.api.resource) = {
4141
type: "securitycenter.googleapis.com/Asset"
4242
pattern: "organizations/{organization}/assets/{asset}"
4343
};
4444

45-
// Cloud SCC managed properties. These properties are managed by Cloud SCC and
46-
// cannot be modified by the user.
45+
// Security Command Center managed properties. These properties are managed by
46+
// Security Command Center and cannot be modified by the user.
4747
message SecurityCenterProperties {
48-
// The full resource name of the GCP resource this asset
48+
// The full resource name of the Google Cloud resource this asset
4949
// represents. This field is immutable after create time. See:
5050
// https://cloud.google.com/apis/design/resource_names#full_resource_name
5151
string resource_name = 1;
5252

53-
// The type of the GCP resource. Examples include: APPLICATION,
53+
// The type of the Google Cloud resource. Examples include: APPLICATION,
5454
// PROJECT, and ORGANIZATION. This is a case insensitive field defined by
55-
// Cloud SCC and/or the producer of the resource and is immutable
56-
// after create time.
55+
// Security Command Center and/or the producer of the resource and is
56+
// immutable after create time.
5757
string resource_type = 2;
5858

5959
// The full resource name of the immediate parent of the resource. See:
@@ -77,12 +77,13 @@ message Asset {
7777
string resource_project_display_name = 8;
7878
}
7979

80-
// IAM Policy information associated with the GCP resource described by the
81-
// Cloud SCC asset. This information is managed and defined by the GCP
82-
// resource and cannot be modified by the user.
80+
// Cloud IAM Policy information associated with the Google Cloud resource
81+
// described by the Security Command Center asset. This information is managed
82+
// and defined by the Google Cloud resource and cannot be modified by the
83+
// user.
8384
message IamPolicy {
8485
// The JSON representation of the Policy associated with the asset.
85-
// See https://cloud.google.com/iam/reference/rest/v1/Policy for
86+
// See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for
8687
// format details.
8788
string policy_blob = 1;
8889
}
@@ -93,27 +94,28 @@ message Asset {
9394
// "organizations/{organization_id}/assets/{asset_id}".
9495
string name = 1;
9596

96-
// Cloud SCC managed properties. These properties are managed by
97-
// Cloud SCC and cannot be modified by the user.
97+
// Security Command Center managed properties. These properties are managed by
98+
// Security Command Center and cannot be modified by the user.
9899
SecurityCenterProperties security_center_properties = 2;
99100

100101
// Resource managed properties. These properties are managed and defined by
101-
// the GCP resource and cannot be modified by the user.
102+
// the Google Cloud resource and cannot be modified by the user.
102103
map<string, google.protobuf.Value> resource_properties = 7;
103104

104105
// User specified security marks. These marks are entirely managed by the user
105106
// and come from the SecurityMarks resource that belongs to the asset.
106107
SecurityMarks security_marks = 8;
107108

108-
// The time at which the asset was created in Cloud SCC.
109+
// The time at which the asset was created in Security Command Center.
109110
google.protobuf.Timestamp create_time = 9;
110111

111112
// The time at which the asset was last updated, added, or deleted in Cloud
112113
// SCC.
113114
google.protobuf.Timestamp update_time = 10;
114115

115-
// IAM Policy information associated with the GCP resource described by the
116-
// Cloud SCC asset. This information is managed and defined by the GCP
117-
// resource and cannot be modified by the user.
116+
// Cloud IAM Policy information associated with the Google Cloud resource
117+
// described by the Security Command Center asset. This information is managed
118+
// and defined by the Google Cloud resource and cannot be modified by the
119+
// user.
118120
IamPolicy iam_policy = 11;
119121
}

google/cloud/securitycenter/v1p1beta1/finding.proto

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2020 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

@@ -31,12 +30,12 @@ option java_package = "com.google.cloud.securitycenter.v1p1beta1";
3130
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1";
3231
option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1";
3332

34-
// Cloud Security Command Center (Cloud SCC) finding.
33+
// Security Command Center finding.
3534
//
3635
// A finding is a record of assessment data (security, risk, health or privacy)
37-
// ingested into Cloud SCC for presentation, notification, analysis,
38-
// policy testing, and enforcement. For example, an XSS vulnerability in an
39-
// App Engine application is a finding.
36+
// ingested into Security Command Center for presentation, notification,
37+
// analysis, policy testing, and enforcement. For example, an XSS vulnerability
38+
// in an App Engine application is a finding.
4039
message Finding {
4140
option (google.api.resource) = {
4241
type: "securitycenter.googleapis.com/Finding"
@@ -69,12 +68,12 @@ message Finding {
6968
// "organizations/{organization_id}/sources/{source_id}"
7069
string parent = 2;
7170

72-
// For findings on Google Cloud Platform (GCP) resources, the full resource
73-
// name of the GCP resource this finding is for. See:
71+
// For findings on Google Cloud resources, the full resource
72+
// name of the Google Cloud resource this finding is for. See:
7473
// https://cloud.google.com/apis/design/resource_names#full_resource_name
75-
// When the finding is for a non-GCP resource, the resourceName can be a
76-
// customer or partner defined string.
77-
// This field is immutable after creation time.
74+
// When the finding is for a non-Google Cloud resource, the resourceName can
75+
// be a customer or partner defined string. This field is immutable after
76+
// creation time.
7877
string resource_name = 3;
7978

8079
// The state of the finding.
@@ -85,9 +84,9 @@ message Finding {
8584
// Example: "XSS_FLASH_INJECTION"
8685
string category = 5;
8786

88-
// The URI that, if available, points to a web page outside of Cloud SCC
89-
// where additional information about the finding can be found. This field is
90-
// guaranteed to be either empty or a well formed URL.
87+
// The URI that, if available, points to a web page outside of Security
88+
// Command Center where additional information about the finding can be found.
89+
// This field is guaranteed to be either empty or a well formed URL.
9190
string external_uri = 6;
9291

9392
// Source specific properties. These properties are managed by the source
@@ -106,6 +105,6 @@ message Finding {
106105
// the firewall became open. The accuracy is determined by the detector.
107106
google.protobuf.Timestamp event_time = 9;
108107

109-
// The time at which the finding was created in Cloud SCC.
108+
// The time at which the finding was created in Security Command Center.
110109
google.protobuf.Timestamp create_time = 10;
111110
}

google/cloud/securitycenter/v1p1beta1/notification_config.proto

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2020 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

@@ -27,19 +26,16 @@ option java_multiple_files = true;
2726
option java_package = "com.google.cloud.securitycenter.v1p1beta1";
2827
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1";
2928
option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1";
30-
31-
// The Pub/Sub Topic resource definition is in google/cloud/pubsub/v1/,
32-
// but we do not import that proto directly; therefore, we redefine the
33-
// pattern here.
3429
option (google.api.resource_definition) = {
3530
type: "pubsub.googleapis.com/Topic"
3631
pattern: "projects/{project}/topics/{topic}"
3732
};
3833

39-
// Cloud Security Command Center (Cloud SCC) notification configs.
34+
// Security Command Center notification configs.
4035
//
41-
// A notification config is a Cloud SCC resource that contains the configuration
42-
// to send notifications for create/update events of findings, assets and etc.
36+
// A notification config is a Security Command Center resource that contains the
37+
// configuration to send notifications for create/update events of findings,
38+
// assets and etc.
4339
message NotificationConfig {
4440
option (google.api.resource) = {
4541
type: "securitycenter.googleapis.com/NotificationConfig"
@@ -94,14 +90,14 @@ message NotificationConfig {
9490
// The type of events the config is for, e.g. FINDING.
9591
EventType event_type = 3;
9692

97-
// The PubSub topic to send notifications to. Its format is
93+
// The Pub/Sub topic to send notifications to. Its format is
9894
// "projects/[project_id]/topics/[topic]".
9995
string pubsub_topic = 4 [
10096
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
10197
];
10298

10399
// Output only. The service account that needs "pubsub.topics.publish"
104-
// permission to publish to the PubSub topic.
100+
// permission to publish to the Pub/Sub topic.
105101
string service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
106102

107103
// The config for triggering notifications.

google/cloud/securitycenter/v1p1beta1/notification_message.proto

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2020 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

@@ -20,6 +19,7 @@ package google.cloud.securitycenter.v1p1beta1;
2019
import "google/api/annotations.proto";
2120
import "google/cloud/securitycenter/v1p1beta1/asset.proto";
2221
import "google/cloud/securitycenter/v1p1beta1/finding.proto";
22+
import "google/cloud/securitycenter/v1p1beta1/resource.proto";
2323

2424
option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1";
2525
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter";
@@ -28,7 +28,7 @@ option java_package = "com.google.cloud.securitycenter.v1p1beta1";
2828
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1";
2929
option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1";
3030

31-
// Cloud SCC's Notification
31+
// Security Command Center's Notification
3232
message NotificationMessage {
3333
// Name of the notification config that generated current notification.
3434
string notification_config_name = 1;
@@ -39,4 +39,7 @@ message NotificationMessage {
3939
// populated.
4040
Finding finding = 2;
4141
}
42+
43+
// The Cloud resource tied to the notification.
44+
Resource resource = 3;
4245
}

google/cloud/securitycenter/v1p1beta1/organization_settings.proto

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2020 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

@@ -27,8 +26,8 @@ option java_package = "com.google.cloud.securitycenter.v1p1beta1";
2726
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1";
2827
option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1";
2928

30-
// User specified settings that are attached to the Cloud Security Command
31-
// Center (Cloud SCC) organization.
29+
// User specified settings that are attached to the Security Command
30+
// Center organization.
3231
message OrganizationSettings {
3332
option (google.api.resource) = {
3433
type: "securitycenter.googleapis.com/OrganizationSettings"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
15+
syntax = "proto3";
16+
17+
package google.cloud.securitycenter.v1p1beta1;
18+
19+
import "google/api/annotations.proto";
20+
21+
option csharp_namespace = "Google.Cloud.SecurityCenter.V1p1Beta1";
22+
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "ResourceProto";
25+
option java_package = "com.google.cloud.securitycenter.v1p1beta1";
26+
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1";
27+
option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1";
28+
29+
// Information related to the Google Cloud resource.
30+
message Resource {
31+
// The full resource name of the resource. See:
32+
// https://cloud.google.com/apis/design/resource_names#full_resource_name
33+
string name = 1;
34+
35+
// The full resource name of project that the resource belongs to.
36+
string project = 2;
37+
38+
// The human readable name of project that the resource belongs to.
39+
string project_display_name = 3;
40+
41+
// The full resource name of resource's parent.
42+
string parent = 4;
43+
44+
// The human readable name of resource's parent.
45+
string parent_display_name = 5;
46+
}

google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2020 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

0 commit comments

Comments
 (0)