From cb2f1eefd684c7efd56fd375cde8d4084a20439e Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 18 Dec 2019 14:13:45 -0800 Subject: [PATCH] Exposing new Resource fields in the SecurityCenterProperties proto, added more comments to the filter logic for these Resource fields, and updated the response proto for the ListFindings API with the new Resource fields. PiperOrigin-RevId: 286263092 --- google/cloud/securitycenter/v1/asset.proto | 11 +++++- google/cloud/securitycenter/v1/finding.proto | 2 +- .../v1/organization_settings.proto | 2 +- .../v1/run_asset_discovery_response.proto | 2 +- .../securitycenter/v1/security_marks.proto | 2 +- .../v1/securitycenter_service.proto | 37 ++++++++++++++++++- google/cloud/securitycenter/v1/source.proto | 2 +- 7 files changed, 51 insertions(+), 7 deletions(-) diff --git a/google/cloud/securitycenter/v1/asset.proto b/google/cloud/securitycenter/v1/asset.proto index 3b99d35d11..bd4751a142 100644 --- a/google/cloud/securitycenter/v1/asset.proto +++ b/google/cloud/securitycenter/v1/asset.proto @@ -17,11 +17,11 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; @@ -66,6 +66,15 @@ message Asset { // Owners of the Google Cloud resource. repeated string resource_owners = 5; + + // The user defined display name for this resource. + string resource_display_name = 6; + + // The user defined display name for the parent of this resource. + string resource_parent_display_name = 7; + + // The user defined display name for the project of this resource. + string resource_project_display_name = 8; } // IAM Policy information associated with the GCP resource described by the diff --git a/google/cloud/securitycenter/v1/finding.proto b/google/cloud/securitycenter/v1/finding.proto index 0c64d4d79f..5d8e5a7891 100644 --- a/google/cloud/securitycenter/v1/finding.proto +++ b/google/cloud/securitycenter/v1/finding.proto @@ -17,12 +17,12 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; diff --git a/google/cloud/securitycenter/v1/organization_settings.proto b/google/cloud/securitycenter/v1/organization_settings.proto index db2097048c..aa4e80bd1a 100644 --- a/google/cloud/securitycenter/v1/organization_settings.proto +++ b/google/cloud/securitycenter/v1/organization_settings.proto @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; diff --git a/google/cloud/securitycenter/v1/run_asset_discovery_response.proto b/google/cloud/securitycenter/v1/run_asset_discovery_response.proto index 93fb58b117..e7581078da 100644 --- a/google/cloud/securitycenter/v1/run_asset_discovery_response.proto +++ b/google/cloud/securitycenter/v1/run_asset_discovery_response.proto @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; diff --git a/google/cloud/securitycenter/v1/security_marks.proto b/google/cloud/securitycenter/v1/security_marks.proto index b3ad429811..d2b5348743 100644 --- a/google/cloud/securitycenter/v1/security_marks.proto +++ b/google/cloud/securitycenter/v1/security_marks.proto @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; diff --git a/google/cloud/securitycenter/v1/securitycenter_service.proto b/google/cloud/securitycenter/v1/securitycenter_service.proto index 811fca5d65..1cd1aff20d 100644 --- a/google/cloud/securitycenter/v1/securitycenter_service.proto +++ b/google/cloud/securitycenter/v1/securitycenter_service.proto @@ -24,7 +24,6 @@ import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/asset.proto"; import "google/cloud/securitycenter/v1/finding.proto"; import "google/cloud/securitycenter/v1/organization_settings.proto"; -import "google/cloud/securitycenter/v1/run_asset_discovery_response.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/cloud/securitycenter/v1/source.proto"; import "google/iam/v1/iam_policy.proto"; @@ -345,9 +344,12 @@ message GroupAssetsRequest { // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` // * security_marks.marks: `=`, `:` // * security_center_properties.resource_name: `=`, `:` + // * security_center_properties.resource_display_name: `=`, `:` // * security_center_properties.resource_type: `=`, `:` // * security_center_properties.resource_parent: `=`, `:` + // * security_center_properties.resource_parent_display_name: `=`, `:` // * security_center_properties.resource_project: `=`, `:` + // * security_center_properties.resource_project_display_name: `=`, `:` // * security_center_properties.resource_owners: `=`, `:` // // For example, `resource_properties.size = 100` is a valid filter string. @@ -361,12 +363,16 @@ message GroupAssetsRequest { // The following fields are supported when compare_duration is not set: // // * security_center_properties.resource_project + // * security_center_properties.resource_project_display_name // * security_center_properties.resource_type // * security_center_properties.resource_parent + // * security_center_properties.resource_parent_display_name // // The following fields are supported when compare_duration is set: // // * security_center_properties.resource_type + // * security_center_properties.resource_project_display_name + // * security_center_properties.resource_parent_display_name string group_by = 3 [(google.api.field_behavior) = REQUIRED]; // When compare_duration is set, the GroupResult's "state_change" property is @@ -666,9 +672,12 @@ message ListAssetsRequest { // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` // * security_marks.marks: `=`, `:` // * security_center_properties.resource_name: `=`, `:` + // * security_center_properties.resource_display_name: `=`, `:` // * security_center_properties.resource_type: `=`, `:` // * security_center_properties.resource_parent: `=`, `:` + // * security_center_properties.resource_parent_display_name: `=`, `:` // * security_center_properties.resource_project: `=`, `:` + // * security_center_properties.resource_project_display_name: `=`, `:` // * security_center_properties.resource_owners: `=`, `:` // // For example, `resource_properties.size = 100` is a valid filter string. @@ -689,8 +698,11 @@ message ListAssetsRequest { // resource_properties // security_marks.marks // security_center_properties.resource_name + // security_center_properties.resource_display_name // security_center_properties.resource_parent + // security_center_properties.resource_parent_display_name // security_center_properties.resource_project + // security_center_properties.resource_project_display_name // security_center_properties.resource_type string order_by = 3; @@ -914,6 +926,26 @@ message ListFindingsRequest { message ListFindingsResponse { // Result containing the Finding and its StateChange. message ListFindingsResult { + // Information related to the Google Cloud Platform (GCP) resource that is + // associated with this finding. + message Resource { + // The full resource name of the resource. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string name = 1; + + // The full resource name of project that the resource belongs to. + string project_name = 2; + + // The human readable name of project that the resource belongs to. + string project_display_name = 3; + + // The full resource name of resource's parent. + string parent_name = 4; + + // The human readable name of resource's parent. + string parent_display_name = 5; + } + // The change in state of the finding. // // When querying across two points in time this describes @@ -947,6 +979,9 @@ message ListFindingsResponse { // State change of the finding between the points in time. StateChange state_change = 2; + + // Output only. Resource that is associated with this finding. + Resource resource = 3; } // Findings matching the list request. diff --git a/google/cloud/securitycenter/v1/source.proto b/google/cloud/securitycenter/v1/source.proto index 4ceff737fc..d26e042f12 100644 --- a/google/cloud/securitycenter/v1/source.proto +++ b/google/cloud/securitycenter/v1/source.proto @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";