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
This commit is contained in:
Google APIs 2019-12-18 14:13:45 -08:00 committed by Copybara-Service
parent 73cebb2043
commit cb2f1eefd6
7 changed files with 51 additions and 7 deletions

View file

@ -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

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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.

View file

@ -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";