@ -1,4 +1,4 @@
/ / Copyright 2020 Google LLC
/ / Copyright 2021 Google LLC
/ /
/ / Licensed under the Apache License , Version 2.0 ( the "License" ) ;
/ / you may not use this file except in compliance with the License.
@ -24,6 +24,7 @@ import "google/api/field_behavior.proto";
import "google/api/resource.proto" ;
import "google/cloud/securitycenter/v1p1beta1/asset.proto" ;
import "google/cloud/securitycenter/v1p1beta1/finding.proto" ;
import "google/cloud/securitycenter/v1p1beta1/folder.proto" ;
import "google/cloud/securitycenter/v1p1beta1/notification_config.proto" ;
import "google/cloud/securitycenter/v1p1beta1/organization_settings.proto" ;
import "google/cloud/securitycenter/v1p1beta1/security_marks.proto" ;
@ -126,6 +127,14 @@ service SecurityCenter {
option ( google.api.http ) = {
post : "/v1p1beta1/{parent=organizations/*}/assets:group"
body : "*"
additional_bindings {
post : "/v1p1beta1/{parent=folders/*}/assets:group"
body : "*"
}
additional_bindings {
post : "/v1p1beta1/{parent=projects/*}/assets:group"
body : "*"
}
} ;
}
@ -133,11 +142,21 @@ service SecurityCenter {
/ / specified properties.
/ /
/ / To group across all sources provide a ` - ` as the source id.
/ / Example : / v1p1beta1 / organizations / { organization_id } / sources / - / findings
/ / Example : / v1 / organizations / { organization_id } / sources / - / findings ,
/ / / v1 / folders / { folder_id } / sources / - / findings ,
/ / / v1 / projects / { project_id } / sources / - / findings
rpc GroupFindings ( GroupFindingsRequest ) returns ( GroupFindingsResponse ) {
option ( google.api.http ) = {
post : "/v1p1beta1/{parent=organizations/*/sources/*}/findings:group"
body : "*"
additional_bindings {
post : "/v1p1beta1/{parent=folders/*/sources/*}/findings:group"
body : "*"
}
additional_bindings {
post : "/v1p1beta1/{parent=projects/*/sources/*}/findings:group"
body : "*"
}
} ;
option ( google.api.method_signature ) = "parent,group_by" ;
}
@ -146,6 +165,12 @@ service SecurityCenter {
rpc ListAssets ( ListAssetsRequest ) returns ( ListAssetsResponse ) {
option ( google.api.http ) = {
get : "/v1p1beta1/{parent=organizations/*}/assets"
additional_bindings {
get : "/v1p1beta1/{parent=folders/*}/assets"
}
additional_bindings {
get : "/v1p1beta1/{parent=projects/*}/assets"
}
} ;
option ( google.api.method_signature ) = "parent" ;
}
@ -157,6 +182,12 @@ service SecurityCenter {
rpc ListFindings ( ListFindingsRequest ) returns ( ListFindingsResponse ) {
option ( google.api.http ) = {
get : "/v1p1beta1/{parent=organizations/*/sources/*}/findings"
additional_bindings {
get : "/v1p1beta1/{parent=folders/*/sources/*}/findings"
}
additional_bindings {
get : "/v1p1beta1/{parent=projects/*/sources/*}/findings"
}
} ;
option ( google.api.method_signature ) = "parent" ;
}
@ -173,6 +204,12 @@ service SecurityCenter {
rpc ListSources ( ListSourcesRequest ) returns ( ListSourcesResponse ) {
option ( google.api.http ) = {
get : "/v1p1beta1/{parent=organizations/*}/sources"
additional_bindings {
get : "/v1p1beta1/{parent=folders/*}/sources"
}
additional_bindings {
get : "/v1p1beta1/{parent=projects/*}/sources"
}
} ;
option ( google.api.method_signature ) = "parent" ;
}
@ -200,6 +237,14 @@ service SecurityCenter {
option ( google.api.http ) = {
post : "/v1p1beta1/{name=organizations/*/sources/*/findings/*}:setState"
body : "*"
additional_bindings {
post : "/v1p1beta1/{name=folders/*/sources/*/findings/*}:setState"
body : "*"
}
additional_bindings {
post : "/v1p1beta1/{name=projects/*/sources/*/findings/*}:setState"
body : "*"
}
} ;
option ( google.api.method_signature ) = "name,state,start_time" ;
}
@ -228,6 +273,14 @@ service SecurityCenter {
option ( google.api.http ) = {
patch : "/v1p1beta1/{finding.name=organizations/*/sources/*/findings/*}"
body : "finding"
additional_bindings {
patch : "/v1p1beta1/{finding.name=folders/*/sources/*/findings/*}"
body : "finding"
}
additional_bindings {
patch : "/v1p1beta1/{finding.name=projects/*/sources/*/findings/*}"
body : "finding"
}
} ;
option ( google.api.method_signature ) = "finding" ;
option ( google.api.method_signature ) = "finding,update_mask" ;
@ -268,10 +321,26 @@ service SecurityCenter {
option ( google.api.http ) = {
patch : "/v1p1beta1/{security_marks.name=organizations/*/assets/*/securityMarks}"
body : "security_marks"
additional_bindings {
patch : "/v1p1beta1/{security_marks.name=folders/*/assets/*/securityMarks}"
body : "security_marks"
}
additional_bindings {
patch : "/v1p1beta1/{security_marks.name=projects/*/assets/*/securityMarks}"
body : "security_marks"
}
additional_bindings {
patch : "/v1p1beta1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}"
body : "security_marks"
}
additional_bindings {
patch : "/v1p1beta1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}"
body : "security_marks"
}
additional_bindings {
patch : "/v1p1beta1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}"
body : "security_marks"
}
} ;
option ( google.api.method_signature ) = "security_marks" ;
option ( google.api.method_signature ) = "security_marks,update_mask" ;
@ -385,11 +454,12 @@ message GetSourceRequest {
/ / Request message for grouping by assets.
message GroupAssetsRequest {
/ / Required. Name of the organization to groupBy. Its format is
/ / "organizations/[organization_id]" .
/ / " organizations / [ organization_id ] , folders / [ folder_id ] , or
/ / projects / [ project_id ] " .
string parent = 1 [
( google.api.field_behavior ) = REQUIRED ,
( google.api.resource_reference ) = {
type : "cloudresourcemanager.googleapis.com/Organization "
child_ type: "securitycenter.googleapis.com/Asset "
}
] ;
@ -543,9 +613,12 @@ message GroupAssetsResponse {
/ / Request message for grouping by findings.
message GroupFindingsRequest {
/ / Required. Name of the source to groupBy. Its format is
/ / "organizations/[organization_id]/sources/[source_id]" . To groupBy across
/ / all sources provide a source_id of ` - ` . For example :
/ / organizations / { organization_id } / sources / -
/ / "organizations/[organization_id]/sources/[source_id]" ,
/ / folders / [ folder_id ] / sources / [ source_id ] , or
/ / projects / [ project_id ] / sources / [ source_id ] . To groupBy across all sources
/ / provide a source_id of ` - ` . For example :
/ / organizations / { organization_id } / sources / - , folders / { folder_id } / sources / - ,
/ / or projects / { project_id } / sources / -
string parent = 1 [
( google.api.field_behavior ) = REQUIRED ,
( google.api.resource_reference ) = {
@ -733,11 +806,12 @@ message ListNotificationConfigsResponse {
/ / Request message for listing sources.
message ListSourcesRequest {
/ / Required. Resource name of the parent of sources to list. Its format should be
/ / "organizations/[organization_id]" .
/ / " organizations / [ organization_id ] , folders / [ folder_id ] , or
/ / projects / [ project_id ] " .
string parent = 1 [
( google.api.field_behavior ) = REQUIRED ,
( google.api.resource_reference ) = {
type : "cloudresourcemanager.googleapis.com/Organization "
child_ type: "securitycenter.googleapis.com/Source "
}
] ;
@ -764,11 +838,12 @@ message ListSourcesResponse {
/ / Request message for listing assets.
message ListAssetsRequest {
/ / Required. Name of the organization assets should belong to . Its format is
/ / "organizations/[organization_id]" .
/ / " organizations / [ organization_id ] , folders / [ folder_id ] , or
/ / projects / [ project_id ] " .
string parent = 1 [
( google.api.field_behavior ) = REQUIRED ,
( google.api.resource_reference ) = {
type : "cloudresourcemanager.googleapis.com/Organization "
child_ type: "securitycenter.googleapis.com/Asset "
}
] ;
@ -954,9 +1029,12 @@ message ListAssetsResponse {
/ / Request message for listing findings.
message ListFindingsRequest {
/ / Required. Name of the source the findings belong to . Its format is
/ / "organizations/[organization_id]/sources/[source_id]" . To list across all
/ / sources provide a source_id of ` - ` . For example :
/ / organizations / { organization_id } / sources / -
/ / " organizations / [ organization_id ] / sources / [ source_id ] ,
/ / folders / [ folder_id ] / sources / [ source_id ] , or
/ / projects / [ project_id ] / sources / [ source_id ] " . To list across all sources
/ / provide a source_id of ` - ` . For example :
/ / organizations / { organization_id } / sources / - , folders / { folder_id } / sources / - or
/ / projects / { projects_id } / sources / -
string parent = 1 [
( google.api.field_behavior ) = REQUIRED ,
( google.api.resource_reference ) = {
@ -1110,6 +1188,11 @@ message ListFindingsResponse {
/ / The human readable name of resource ' s parent.
string parent_display_name = 5 ;
/ / Contains a Folder message for each folder in the assets ancestry.
/ / The first folder is the deepest nested folder , and the last folder is
/ / the folder directly under the Organization.
repeated Folder folders = 10 ;
}
/ / The change in state of the finding.