google-cloud-security_center 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +9 -0
- data/LICENSE +201 -0
- data/README.md +69 -0
- data/lib/google/cloud/security_center.rb +141 -0
- data/lib/google/cloud/security_center/v1.rb +139 -0
- data/lib/google/cloud/security_center/v1/asset_pb.rb +37 -0
- data/lib/google/cloud/security_center/v1/credentials.rb +41 -0
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/asset.rb +96 -0
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/finding.rb +94 -0
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/organization_settings.rb +72 -0
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/security_marks.rb +44 -0
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/securitycenter_service.rb +759 -0
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/source.rb +51 -0
- data/lib/google/cloud/security_center/v1/doc/google/iam/v1/iam_policy.rb +63 -0
- data/lib/google/cloud/security_center/v1/doc/google/iam/v1/policy.rb +104 -0
- data/lib/google/cloud/security_center/v1/doc/google/longrunning/operations.rb +51 -0
- data/lib/google/cloud/security_center/v1/doc/google/protobuf/any.rb +131 -0
- data/lib/google/cloud/security_center/v1/doc/google/protobuf/duration.rb +91 -0
- data/lib/google/cloud/security_center/v1/doc/google/protobuf/field_mask.rb +222 -0
- data/lib/google/cloud/security_center/v1/doc/google/protobuf/struct.rb +74 -0
- data/lib/google/cloud/security_center/v1/doc/google/protobuf/timestamp.rb +111 -0
- data/lib/google/cloud/security_center/v1/doc/google/rpc/status.rb +87 -0
- data/lib/google/cloud/security_center/v1/finding_pb.rb +34 -0
- data/lib/google/cloud/security_center/v1/helpers.rb +87 -0
- data/lib/google/cloud/security_center/v1/organization_settings_pb.rb +29 -0
- data/lib/google/cloud/security_center/v1/security_center_client.rb +1772 -0
- data/lib/google/cloud/security_center/v1/security_center_client_config.json +116 -0
- data/lib/google/cloud/security_center/v1/security_marks_pb.rb +17 -0
- data/lib/google/cloud/security_center/v1/securitycenter_service_pb.rb +186 -0
- data/lib/google/cloud/security_center/v1/securitycenter_service_services_pb.rb +90 -0
- data/lib/google/cloud/security_center/v1/source_pb.rb +18 -0
- metadata +172 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/security_center/v1/asset.proto
|
3
|
+
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/cloud/security_center/v1/security_marks_pb'
|
9
|
+
require 'google/protobuf/struct_pb'
|
10
|
+
require 'google/protobuf/timestamp_pb'
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
|
+
add_message "google.cloud.securitycenter.v1.Asset" do
|
13
|
+
optional :name, :string, 1
|
14
|
+
optional :security_center_properties, :message, 2, "google.cloud.securitycenter.v1.Asset.SecurityCenterProperties"
|
15
|
+
map :resource_properties, :string, :message, 7, "google.protobuf.Value"
|
16
|
+
optional :security_marks, :message, 8, "google.cloud.securitycenter.v1.SecurityMarks"
|
17
|
+
optional :create_time, :message, 9, "google.protobuf.Timestamp"
|
18
|
+
optional :update_time, :message, 10, "google.protobuf.Timestamp"
|
19
|
+
optional :iam_policy, :message, 11, "google.cloud.securitycenter.v1.Asset.IamPolicy"
|
20
|
+
end
|
21
|
+
add_message "google.cloud.securitycenter.v1.Asset.SecurityCenterProperties" do
|
22
|
+
optional :resource_name, :string, 1
|
23
|
+
optional :resource_type, :string, 2
|
24
|
+
optional :resource_parent, :string, 3
|
25
|
+
optional :resource_project, :string, 4
|
26
|
+
repeated :resource_owners, :string, 5
|
27
|
+
end
|
28
|
+
add_message "google.cloud.securitycenter.v1.Asset.IamPolicy" do
|
29
|
+
optional :policy_blob, :string, 1
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
module Google::Cloud::SecurityCenter::V1
|
34
|
+
Asset = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset").msgclass
|
35
|
+
Asset::SecurityCenterProperties = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset.SecurityCenterProperties").msgclass
|
36
|
+
Asset::IamPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset.IamPolicy").msgclass
|
37
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Copyright 2019 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
|
+
# https://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
|
+
|
16
|
+
require "googleauth"
|
17
|
+
|
18
|
+
module Google
|
19
|
+
module Cloud
|
20
|
+
module SecurityCenter
|
21
|
+
module V1
|
22
|
+
class Credentials < Google::Auth::Credentials
|
23
|
+
SCOPE = [
|
24
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
25
|
+
].freeze
|
26
|
+
PATH_ENV_VARS = %w(SECURITY_CENTER_CREDENTIALS
|
27
|
+
SECURITY_CENTER_KEYFILE
|
28
|
+
GOOGLE_CLOUD_CREDENTIALS
|
29
|
+
GOOGLE_CLOUD_KEYFILE
|
30
|
+
GCLOUD_KEYFILE)
|
31
|
+
JSON_ENV_VARS = %w(SECURITY_CENTER_CREDENTIALS_JSON
|
32
|
+
SECURITY_CENTER_KEYFILE_JSON
|
33
|
+
GOOGLE_CLOUD_CREDENTIALS_JSON
|
34
|
+
GOOGLE_CLOUD_KEYFILE_JSON
|
35
|
+
GCLOUD_KEYFILE_JSON)
|
36
|
+
DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# Copyright 2019 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
|
+
# https://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
|
+
|
16
|
+
module Google
|
17
|
+
module Cloud
|
18
|
+
module Securitycenter
|
19
|
+
module V1
|
20
|
+
# Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud
|
21
|
+
# Platform (GCP) resource.
|
22
|
+
#
|
23
|
+
# The Asset is a Cloud SCC resource that captures information about a single
|
24
|
+
# GCP resource. All modifications to an Asset are only within the context of
|
25
|
+
# Cloud SCC and don't affect the referenced GCP resource.
|
26
|
+
# @!attribute [rw] name
|
27
|
+
# @return [String]
|
28
|
+
# The relative resource name of this asset. See:
|
29
|
+
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
30
|
+
# Example:
|
31
|
+
# "organizations/123/assets/456".
|
32
|
+
# @!attribute [rw] security_center_properties
|
33
|
+
# @return [Google::Cloud::SecurityCenter::V1::Asset::SecurityCenterProperties]
|
34
|
+
# Cloud SCC managed properties. These properties are managed by
|
35
|
+
# Cloud SCC and cannot be modified by the user.
|
36
|
+
# @!attribute [rw] resource_properties
|
37
|
+
# @return [Hash{String => Google::Protobuf::Value}]
|
38
|
+
# Resource managed properties. These properties are managed and defined by
|
39
|
+
# the GCP resource and cannot be modified by the user.
|
40
|
+
# @!attribute [rw] security_marks
|
41
|
+
# @return [Google::Cloud::SecurityCenter::V1::SecurityMarks]
|
42
|
+
# User specified security marks. These marks are entirely managed by the user
|
43
|
+
# and come from the SecurityMarks resource that belongs to the asset.
|
44
|
+
# @!attribute [rw] create_time
|
45
|
+
# @return [Google::Protobuf::Timestamp]
|
46
|
+
# The time at which the asset was created in Cloud SCC.
|
47
|
+
# @!attribute [rw] update_time
|
48
|
+
# @return [Google::Protobuf::Timestamp]
|
49
|
+
# The time at which the asset was last updated, added, or deleted in Cloud
|
50
|
+
# SCC.
|
51
|
+
# @!attribute [rw] iam_policy
|
52
|
+
# @return [Google::Cloud::SecurityCenter::V1::Asset::IamPolicy]
|
53
|
+
# IAM Policy information associated with the GCP resource described by the
|
54
|
+
# Cloud SCC asset. This information is managed and defined by the GCP
|
55
|
+
# resource and cannot be modified by the user.
|
56
|
+
class Asset
|
57
|
+
# Cloud SCC managed properties. These properties are managed by Cloud SCC and
|
58
|
+
# cannot be modified by the user.
|
59
|
+
# @!attribute [rw] resource_name
|
60
|
+
# @return [String]
|
61
|
+
# The full resource name of the GCP resource this asset
|
62
|
+
# represents. This field is immutable after create time. See:
|
63
|
+
# https://cloud.google.com/apis/design/resource_names#full_resource_name
|
64
|
+
# @!attribute [rw] resource_type
|
65
|
+
# @return [String]
|
66
|
+
# The type of the GCP resource. Examples include: APPLICATION,
|
67
|
+
# PROJECT, and ORGANIZATION. This is a case insensitive field defined by
|
68
|
+
# Cloud SCC and/or the producer of the resource and is immutable
|
69
|
+
# after create time.
|
70
|
+
# @!attribute [rw] resource_parent
|
71
|
+
# @return [String]
|
72
|
+
# The full resource name of the immediate parent of the resource. See:
|
73
|
+
# https://cloud.google.com/apis/design/resource_names#full_resource_name
|
74
|
+
# @!attribute [rw] resource_project
|
75
|
+
# @return [String]
|
76
|
+
# The full resource name of the project the resource belongs to. See:
|
77
|
+
# https://cloud.google.com/apis/design/resource_names#full_resource_name
|
78
|
+
# @!attribute [rw] resource_owners
|
79
|
+
# @return [Array<String>]
|
80
|
+
# Owners of the Google Cloud resource.
|
81
|
+
class SecurityCenterProperties; end
|
82
|
+
|
83
|
+
# IAM Policy information associated with the GCP resource described by the
|
84
|
+
# Cloud SCC asset. This information is managed and defined by the GCP
|
85
|
+
# resource and cannot be modified by the user.
|
86
|
+
# @!attribute [rw] policy_blob
|
87
|
+
# @return [String]
|
88
|
+
# The JSON representation of the Policy associated with the asset.
|
89
|
+
# See https://cloud.google.com/iam/reference/rest/v1/Policy for format
|
90
|
+
# details.
|
91
|
+
class IamPolicy; end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# Copyright 2019 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
|
+
# https://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
|
+
|
16
|
+
module Google
|
17
|
+
module Cloud
|
18
|
+
module Securitycenter
|
19
|
+
module V1
|
20
|
+
# Cloud Security Command Center (Cloud SCC) finding.
|
21
|
+
#
|
22
|
+
# A finding is a record of assessment data (security, risk, health or privacy)
|
23
|
+
# ingested into Cloud SCC for presentation, notification, analysis,
|
24
|
+
# policy testing, and enforcement. For example, an XSS vulnerability in an
|
25
|
+
# App Engine application is a finding.
|
26
|
+
# @!attribute [rw] name
|
27
|
+
# @return [String]
|
28
|
+
# The relative resource name of this finding. See:
|
29
|
+
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
30
|
+
# Example:
|
31
|
+
# "organizations/123/sources/456/findings/789"
|
32
|
+
# @!attribute [rw] parent
|
33
|
+
# @return [String]
|
34
|
+
# The relative resource name of the source the finding belongs to. See:
|
35
|
+
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
36
|
+
# This field is immutable after creation time.
|
37
|
+
# For example:
|
38
|
+
# "organizations/123/sources/456"
|
39
|
+
# @!attribute [rw] resource_name
|
40
|
+
# @return [String]
|
41
|
+
# The full resource name of the Google Cloud Platform (GCP) resource this
|
42
|
+
# finding is for. See:
|
43
|
+
# https://cloud.google.com/apis/design/resource_names#full_resource_name
|
44
|
+
# This field is immutable after creation time.
|
45
|
+
# @!attribute [rw] state
|
46
|
+
# @return [Google::Cloud::SecurityCenter::V1::Finding::State]
|
47
|
+
# The state of the finding.
|
48
|
+
# @!attribute [rw] category
|
49
|
+
# @return [String]
|
50
|
+
# The additional taxonomy group within findings from a given source.
|
51
|
+
# This field is immutable after creation time.
|
52
|
+
# Example: "XSS_FLASH_INJECTION"
|
53
|
+
# @!attribute [rw] external_uri
|
54
|
+
# @return [String]
|
55
|
+
# The URI that, if available, points to a web page outside of Cloud SCC
|
56
|
+
# where additional information about the finding can be found. This field is
|
57
|
+
# guaranteed to be either empty or a well formed URL.
|
58
|
+
# @!attribute [rw] source_properties
|
59
|
+
# @return [Hash{String => Google::Protobuf::Value}]
|
60
|
+
# Source specific properties. These properties are managed by the source
|
61
|
+
# that writes the finding. The key names in the source_properties map must be
|
62
|
+
# between 1 and 255 characters, and must start with a letter and contain
|
63
|
+
# alphanumeric characters or underscores only.
|
64
|
+
# @!attribute [rw] security_marks
|
65
|
+
# @return [Google::Cloud::SecurityCenter::V1::SecurityMarks]
|
66
|
+
# Output only. User specified security marks. These marks are entirely
|
67
|
+
# managed by the user and come from the SecurityMarks resource that belongs
|
68
|
+
# to the finding.
|
69
|
+
# @!attribute [rw] event_time
|
70
|
+
# @return [Google::Protobuf::Timestamp]
|
71
|
+
# The time at which the event took place. For example, if the finding
|
72
|
+
# represents an open firewall it would capture the time the open firewall was
|
73
|
+
# detected.
|
74
|
+
# @!attribute [rw] create_time
|
75
|
+
# @return [Google::Protobuf::Timestamp]
|
76
|
+
# The time at which the finding was created in Cloud SCC.
|
77
|
+
class Finding
|
78
|
+
# The state of the finding.
|
79
|
+
module State
|
80
|
+
# Unspecified state.
|
81
|
+
STATE_UNSPECIFIED = 0
|
82
|
+
|
83
|
+
# The finding requires attention and has not been addressed yet.
|
84
|
+
ACTIVE = 1
|
85
|
+
|
86
|
+
# The finding has been fixed, triaged as a non-issue or otherwise addressed
|
87
|
+
# and is no longer active.
|
88
|
+
INACTIVE = 2
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/organization_settings.rb
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# Copyright 2019 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
|
+
# https://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
|
+
|
16
|
+
module Google
|
17
|
+
module Cloud
|
18
|
+
module Securitycenter
|
19
|
+
module V1
|
20
|
+
# User specified settings that are attached to the Cloud Security Command
|
21
|
+
# Center (Cloud SCC) organization.
|
22
|
+
# @!attribute [rw] name
|
23
|
+
# @return [String]
|
24
|
+
# The relative resource name of the settings. See:
|
25
|
+
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
26
|
+
# Example:
|
27
|
+
# "organizations/123/organizationSettings".
|
28
|
+
# @!attribute [rw] enable_asset_discovery
|
29
|
+
# @return [true, false]
|
30
|
+
# A flag that indicates if Asset Discovery should be enabled. If the flag is
|
31
|
+
# set to `true`, then discovery of assets will occur. If it is set to `false,
|
32
|
+
# all historical assets will remain, but discovery of future assets will not
|
33
|
+
# occur.
|
34
|
+
# @!attribute [rw] asset_discovery_config
|
35
|
+
# @return [Google::Cloud::SecurityCenter::V1::OrganizationSettings::AssetDiscoveryConfig]
|
36
|
+
# The configuration used for Asset Discovery runs.
|
37
|
+
class OrganizationSettings
|
38
|
+
# The configuration used for Asset Discovery runs.
|
39
|
+
# @!attribute [rw] project_ids
|
40
|
+
# @return [Array<String>]
|
41
|
+
# The project ids to use for filtering asset discovery.
|
42
|
+
# @!attribute [rw] inclusion_mode
|
43
|
+
# @return [Google::Cloud::SecurityCenter::V1::OrganizationSettings::AssetDiscoveryConfig::InclusionMode]
|
44
|
+
# The mode to use for filtering asset discovery.
|
45
|
+
class AssetDiscoveryConfig
|
46
|
+
# The mode of inclusion when running Asset Discovery.
|
47
|
+
# Asset discovery can be limited by explicitly identifying projects to be
|
48
|
+
# included or excluded. If INCLUDE_ONLY is set, then only those projects
|
49
|
+
# within the organization and their children are discovered during asset
|
50
|
+
# discovery. If EXCLUDE is set, then projects that don't match those
|
51
|
+
# projects are discovered during asset discovery. If neither are set, then
|
52
|
+
# all projects within the organization are discovered during asset
|
53
|
+
# discovery.
|
54
|
+
module InclusionMode
|
55
|
+
# Unspecified. Setting the mode with this value will disable
|
56
|
+
# inclusion/exclusion filtering for Asset Discovery.
|
57
|
+
INCLUSION_MODE_UNSPECIFIED = 0
|
58
|
+
|
59
|
+
# Asset Discovery will capture only the resources within the projects
|
60
|
+
# specified. All other resources will be ignored.
|
61
|
+
INCLUDE_ONLY = 1
|
62
|
+
|
63
|
+
# Asset Discovery will ignore all resources under the projects specified.
|
64
|
+
# All other resources will be retrieved.
|
65
|
+
EXCLUDE = 2
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Copyright 2019 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
|
+
# https://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
|
+
|
16
|
+
module Google
|
17
|
+
module Cloud
|
18
|
+
module Securitycenter
|
19
|
+
module V1
|
20
|
+
# User specified security marks that are attached to the parent Cloud Security
|
21
|
+
# Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud
|
22
|
+
# SCC organization -- they can be modified and viewed by all users who have
|
23
|
+
# proper permissions on the organization.
|
24
|
+
# @!attribute [rw] name
|
25
|
+
# @return [String]
|
26
|
+
# The relative resource name of the SecurityMarks. See:
|
27
|
+
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
28
|
+
# Examples:
|
29
|
+
# "organizations/123/assets/456/securityMarks"
|
30
|
+
# "organizations/123/sources/456/findings/789/securityMarks".
|
31
|
+
# @!attribute [rw] marks
|
32
|
+
# @return [Hash{String => String}]
|
33
|
+
# Mutable user specified security marks belonging to the parent resource.
|
34
|
+
# Constraints are as follows:
|
35
|
+
# * Keys and values are treated as case insensitive
|
36
|
+
# * Keys must be between 1 - 256 characters (inclusive)
|
37
|
+
# * Keys must be letters, numbers, underscores, or dashes
|
38
|
+
# * Values have leading and trailing whitespace trimmed, remaining
|
39
|
+
# characters must be between 1 - 4096 characters (inclusive)
|
40
|
+
class SecurityMarks; end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,759 @@
|
|
1
|
+
# Copyright 2019 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
|
+
# https://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
|
+
|
16
|
+
module Google
|
17
|
+
module Cloud
|
18
|
+
module Securitycenter
|
19
|
+
module V1
|
20
|
+
# Request message for creating a finding.
|
21
|
+
# @!attribute [rw] parent
|
22
|
+
# @return [String]
|
23
|
+
# Resource name of the new finding's parent. Its format should be
|
24
|
+
# "organizations/[organization_id]/sources/[source_id]".
|
25
|
+
# @!attribute [rw] finding_id
|
26
|
+
# @return [String]
|
27
|
+
# Unique identifier provided by the client within the parent scope.
|
28
|
+
# It must be alphanumeric and less than or equal to 32 characters and
|
29
|
+
# greater than 0 characters in length.
|
30
|
+
# @!attribute [rw] finding
|
31
|
+
# @return [Google::Cloud::SecurityCenter::V1::Finding]
|
32
|
+
# The Finding being created. The name and security_marks will be ignored as
|
33
|
+
# they are both output only fields on this resource.
|
34
|
+
class CreateFindingRequest; end
|
35
|
+
|
36
|
+
# Request message for creating a source.
|
37
|
+
# @!attribute [rw] parent
|
38
|
+
# @return [String]
|
39
|
+
# Resource name of the new source's parent. Its format should be
|
40
|
+
# "organizations/[organization_id]".
|
41
|
+
# @!attribute [rw] source
|
42
|
+
# @return [Google::Cloud::SecurityCenter::V1::Source]
|
43
|
+
# The Source being created, only the display_name and description will be
|
44
|
+
# used. All other fields will be ignored.
|
45
|
+
class CreateSourceRequest; end
|
46
|
+
|
47
|
+
# Request message for getting organization settings.
|
48
|
+
# @!attribute [rw] name
|
49
|
+
# @return [String]
|
50
|
+
# Name of the organization to get organization settings for. Its format is
|
51
|
+
# "organizations/[organization_id]/organizationSettings".
|
52
|
+
class GetOrganizationSettingsRequest; end
|
53
|
+
|
54
|
+
# Request message for getting a source.
|
55
|
+
# @!attribute [rw] name
|
56
|
+
# @return [String]
|
57
|
+
# Relative resource name of the source. Its format is
|
58
|
+
# "organizations/[organization_id]/source/[source_id]".
|
59
|
+
class GetSourceRequest; end
|
60
|
+
|
61
|
+
# Request message for grouping by assets.
|
62
|
+
# @!attribute [rw] parent
|
63
|
+
# @return [String]
|
64
|
+
# Name of the organization to groupBy. Its format is
|
65
|
+
# "organizations/[organization_id]".
|
66
|
+
# @!attribute [rw] filter
|
67
|
+
# @return [String]
|
68
|
+
# Expression that defines the filter to apply across assets.
|
69
|
+
# The expression is a list of zero or more restrictions combined via logical
|
70
|
+
# operators `AND` and `OR`.
|
71
|
+
# Parentheses are supported, and `OR` has higher precedence than `AND`.
|
72
|
+
#
|
73
|
+
# Restrictions have the form `<field> <operator> <value>` and may have a `-`
|
74
|
+
# character in front of them to indicate negation. The fields map to those
|
75
|
+
# defined in the Asset resource. Examples include:
|
76
|
+
#
|
77
|
+
# * name
|
78
|
+
# * security_center_properties.resource_name
|
79
|
+
# * resource_properties.a_property
|
80
|
+
# * security_marks.marks.marka
|
81
|
+
#
|
82
|
+
# The supported operators are:
|
83
|
+
#
|
84
|
+
# * `=` for all value types.
|
85
|
+
# * `>`, `<`, `>=`, `<=` for integer values.
|
86
|
+
# * `:`, meaning substring matching, for strings.
|
87
|
+
#
|
88
|
+
# The supported value types are:
|
89
|
+
#
|
90
|
+
# * string literals in quotes.
|
91
|
+
# * integer literals without quotes.
|
92
|
+
# * boolean literals `true` and `false` without quotes.
|
93
|
+
#
|
94
|
+
# The following field and operator combinations are supported:
|
95
|
+
# name | '='
|
96
|
+
# update_time | '>', '<', '>=', '<=', '='
|
97
|
+
# create_time | '>', '<', '>=', '<=', '='
|
98
|
+
# iam_policy.policy_blob | '=', ':'
|
99
|
+
# resource_properties | '=', ':', '>', '<', '>=', '<='
|
100
|
+
# security_marks | '=', ':'
|
101
|
+
# security_center_properties.resource_name | '=', ':'
|
102
|
+
# security_center_properties.resource_type | '=', ':'
|
103
|
+
# security_center_properties.resource_parent | '=', ':'
|
104
|
+
# security_center_properties.resource_project | '=', ':'
|
105
|
+
# security_center_properties.resource_owners | '=', ':'
|
106
|
+
#
|
107
|
+
# For example, `resource_properties.size = 100` is a valid filter string.
|
108
|
+
# @!attribute [rw] group_by
|
109
|
+
# @return [String]
|
110
|
+
# Expression that defines what assets fields to use for grouping. The string
|
111
|
+
# value should follow SQL syntax: comma separated list of fields. For
|
112
|
+
# example:
|
113
|
+
# "security_center_properties.resource_project,security_center_properties.project".
|
114
|
+
#
|
115
|
+
# The following fields are supported when compare_duration is not set:
|
116
|
+
#
|
117
|
+
# * security_center_properties.resource_project
|
118
|
+
# * security_center_properties.resource_type
|
119
|
+
# * security_center_properties.resource_parent
|
120
|
+
#
|
121
|
+
# The following fields are supported when compare_duration is set:
|
122
|
+
#
|
123
|
+
# * security_center_properties.resource_type
|
124
|
+
# @!attribute [rw] compare_duration
|
125
|
+
# @return [Google::Protobuf::Duration]
|
126
|
+
# When compare_duration is set, the GroupResult's "state_change" property is
|
127
|
+
# updated to indicate whether the asset was added, removed, or remained
|
128
|
+
# present during the compare_duration period of time that precedes the
|
129
|
+
# read_time. This is the time between (read_time - compare_duration) and
|
130
|
+
# read_time.
|
131
|
+
#
|
132
|
+
# The state change value is derived based on the presence of the asset at the
|
133
|
+
# two points in time. Intermediate state changes between the two times don't
|
134
|
+
# affect the result. For example, the results aren't affected if the asset is
|
135
|
+
# removed and re-created again.
|
136
|
+
#
|
137
|
+
# Possible "state_change" values when compare_duration is specified:
|
138
|
+
#
|
139
|
+
# * "ADDED": indicates that the asset was not present at the start of
|
140
|
+
# compare_duration, but present at reference_time.
|
141
|
+
# * "REMOVED": indicates that the asset was present at the start of
|
142
|
+
# compare_duration, but not present at reference_time.
|
143
|
+
# * "ACTIVE": indicates that the asset was present at both the
|
144
|
+
# start and the end of the time period defined by
|
145
|
+
# compare_duration and reference_time.
|
146
|
+
#
|
147
|
+
# If compare_duration is not specified, then the only possible state_change
|
148
|
+
# is "UNUSED", which will be the state_change set for all assets present at
|
149
|
+
# read_time.
|
150
|
+
#
|
151
|
+
# If this field is set then `state_change` must be a specified field in
|
152
|
+
# `group_by`.
|
153
|
+
# @!attribute [rw] read_time
|
154
|
+
# @return [Google::Protobuf::Timestamp]
|
155
|
+
# Time used as a reference point when filtering assets. The filter is limited
|
156
|
+
# to assets existing at the supplied time and their values are those at that
|
157
|
+
# specific time. Absence of this field will default to the API's version of
|
158
|
+
# NOW.
|
159
|
+
# @!attribute [rw] page_token
|
160
|
+
# @return [String]
|
161
|
+
# The value returned by the last `GroupAssetsResponse`; indicates
|
162
|
+
# that this is a continuation of a prior `GroupAssets` call, and that the
|
163
|
+
# system should return the next page of data.
|
164
|
+
# @!attribute [rw] page_size
|
165
|
+
# @return [Integer]
|
166
|
+
# The maximum number of results to return in a single response. Default is
|
167
|
+
# 10, minimum is 1, maximum is 1000.
|
168
|
+
class GroupAssetsRequest; end
|
169
|
+
|
170
|
+
# Response message for grouping by assets.
|
171
|
+
# @!attribute [rw] group_by_results
|
172
|
+
# @return [Array<Google::Cloud::SecurityCenter::V1::GroupResult>]
|
173
|
+
# Group results. There exists an element for each existing unique
|
174
|
+
# combination of property/values. The element contains a count for the number
|
175
|
+
# of times those specific property/values appear.
|
176
|
+
# @!attribute [rw] read_time
|
177
|
+
# @return [Google::Protobuf::Timestamp]
|
178
|
+
# Time used for executing the groupBy request.
|
179
|
+
# @!attribute [rw] next_page_token
|
180
|
+
# @return [String]
|
181
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
182
|
+
# results.
|
183
|
+
# @!attribute [rw] total_size
|
184
|
+
# @return [Integer]
|
185
|
+
# The total number of results matching the query.
|
186
|
+
class GroupAssetsResponse; end
|
187
|
+
|
188
|
+
# Request message for grouping by findings.
|
189
|
+
# @!attribute [rw] parent
|
190
|
+
# @return [String]
|
191
|
+
# Name of the source to groupBy. Its format is
|
192
|
+
# "organizations/[organization_id]/sources/[source_id]". To groupBy across
|
193
|
+
# all sources provide a source_id of `-`. For example:
|
194
|
+
# organizations/123/sources/-
|
195
|
+
# @!attribute [rw] filter
|
196
|
+
# @return [String]
|
197
|
+
# Expression that defines the filter to apply across findings.
|
198
|
+
# The expression is a list of one or more restrictions combined via logical
|
199
|
+
# operators `AND` and `OR`.
|
200
|
+
# Parentheses are supported, and `OR` has higher precedence than `AND`.
|
201
|
+
#
|
202
|
+
# Restrictions have the form `<field> <operator> <value>` and may have a `-`
|
203
|
+
# character in front of them to indicate negation. Examples include:
|
204
|
+
#
|
205
|
+
# * name
|
206
|
+
# * source_properties.a_property
|
207
|
+
# * security_marks.marks.marka
|
208
|
+
#
|
209
|
+
# The supported operators are:
|
210
|
+
#
|
211
|
+
# * `=` for all value types.
|
212
|
+
# * `>`, `<`, `>=`, `<=` for integer values.
|
213
|
+
# * `:`, meaning substring matching, for strings.
|
214
|
+
#
|
215
|
+
# The supported value types are:
|
216
|
+
#
|
217
|
+
# * string literals in quotes.
|
218
|
+
# * integer literals without quotes.
|
219
|
+
# * boolean literals `true` and `false` without quotes.
|
220
|
+
#
|
221
|
+
# The following field and operator combinations are supported:
|
222
|
+
# name | `=`
|
223
|
+
# parent | '=', ':'
|
224
|
+
# resource_name | '=', ':'
|
225
|
+
# state | '=', ':'
|
226
|
+
# category | '=', ':'
|
227
|
+
# external_uri | '=', ':'
|
228
|
+
# event_time | `>`, `<`, `>=`, `<=`
|
229
|
+
# security_marks | '=', ':'
|
230
|
+
# source_properties | '=', ':', `>`, `<`, `>=`, `<=`
|
231
|
+
#
|
232
|
+
# For example, `source_properties.size = 100` is a valid filter string.
|
233
|
+
# @!attribute [rw] group_by
|
234
|
+
# @return [String]
|
235
|
+
# Expression that defines what assets fields to use for grouping (including
|
236
|
+
# `state_change`). The string value should follow SQL syntax: comma separated
|
237
|
+
# list of fields. For example: "parent,resource_name".
|
238
|
+
#
|
239
|
+
# The following fields are supported:
|
240
|
+
#
|
241
|
+
# * resource_name
|
242
|
+
# * category
|
243
|
+
# * state
|
244
|
+
# * parent
|
245
|
+
#
|
246
|
+
# The following fields are supported when compare_duration is set:
|
247
|
+
#
|
248
|
+
# * state_change
|
249
|
+
# @!attribute [rw] read_time
|
250
|
+
# @return [Google::Protobuf::Timestamp]
|
251
|
+
# Time used as a reference point when filtering findings. The filter is
|
252
|
+
# limited to findings existing at the supplied time and their values are
|
253
|
+
# those at that specific time. Absence of this field will default to the
|
254
|
+
# API's version of NOW.
|
255
|
+
# @!attribute [rw] compare_duration
|
256
|
+
# @return [Google::Protobuf::Duration]
|
257
|
+
# When compare_duration is set, the GroupResult's "state_change" attribute is
|
258
|
+
# updated to indicate whether the finding had its state changed, the
|
259
|
+
# finding's state remained unchanged, or if the finding was added during the
|
260
|
+
# compare_duration period of time that precedes the read_time. This is the
|
261
|
+
# time between (read_time - compare_duration) and read_time.
|
262
|
+
#
|
263
|
+
# The state_change value is derived based on the presence and state of the
|
264
|
+
# finding at the two points in time. Intermediate state changes between the
|
265
|
+
# two times don't affect the result. For example, the results aren't affected
|
266
|
+
# if the finding is made inactive and then active again.
|
267
|
+
#
|
268
|
+
# Possible "state_change" values when compare_duration is specified:
|
269
|
+
#
|
270
|
+
# * "CHANGED": indicates that the finding was present at the start of
|
271
|
+
# compare_duration, but changed its state at read_time.
|
272
|
+
# * "UNCHANGED": indicates that the finding was present at the start of
|
273
|
+
# compare_duration and did not change state at read_time.
|
274
|
+
# * "ADDED": indicates that the finding was not present at the start
|
275
|
+
# of compare_duration, but was present at read_time.
|
276
|
+
#
|
277
|
+
# If compare_duration is not specified, then the only possible state_change
|
278
|
+
# is "UNUSED", which will be the state_change set for all findings present
|
279
|
+
# at read_time.
|
280
|
+
#
|
281
|
+
# If this field is set then `state_change` must be a specified field in
|
282
|
+
# `group_by`.
|
283
|
+
# @!attribute [rw] page_token
|
284
|
+
# @return [String]
|
285
|
+
# The value returned by the last `GroupFindingsResponse`; indicates
|
286
|
+
# that this is a continuation of a prior `GroupFindings` call, and
|
287
|
+
# that the system should return the next page of data.
|
288
|
+
# @!attribute [rw] page_size
|
289
|
+
# @return [Integer]
|
290
|
+
# The maximum number of results to return in a single response. Default is
|
291
|
+
# 10, minimum is 1, maximum is 1000.
|
292
|
+
class GroupFindingsRequest; end
|
293
|
+
|
294
|
+
# Response message for group by findings.
|
295
|
+
# @!attribute [rw] group_by_results
|
296
|
+
# @return [Array<Google::Cloud::SecurityCenter::V1::GroupResult>]
|
297
|
+
# Group results. There exists an element for each existing unique
|
298
|
+
# combination of property/values. The element contains a count for the number
|
299
|
+
# of times those specific property/values appear.
|
300
|
+
# @!attribute [rw] read_time
|
301
|
+
# @return [Google::Protobuf::Timestamp]
|
302
|
+
# Time used for executing the groupBy request.
|
303
|
+
# @!attribute [rw] next_page_token
|
304
|
+
# @return [String]
|
305
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
306
|
+
# results.
|
307
|
+
# @!attribute [rw] total_size
|
308
|
+
# @return [Integer]
|
309
|
+
# The total number of results matching the query.
|
310
|
+
class GroupFindingsResponse; end
|
311
|
+
|
312
|
+
# Result containing the properties and count of a groupBy request.
|
313
|
+
# @!attribute [rw] properties
|
314
|
+
# @return [Hash{String => Google::Protobuf::Value}]
|
315
|
+
# Properties matching the groupBy fields in the request.
|
316
|
+
# @!attribute [rw] count
|
317
|
+
# @return [Integer]
|
318
|
+
# Total count of resources for the given properties.
|
319
|
+
class GroupResult; end
|
320
|
+
|
321
|
+
# Request message for listing sources.
|
322
|
+
# @!attribute [rw] parent
|
323
|
+
# @return [String]
|
324
|
+
# Resource name of the parent of sources to list. Its format should be
|
325
|
+
# "organizations/[organization_id]".
|
326
|
+
# @!attribute [rw] page_token
|
327
|
+
# @return [String]
|
328
|
+
# The value returned by the last `ListSourcesResponse`; indicates
|
329
|
+
# that this is a continuation of a prior `ListSources` call, and
|
330
|
+
# that the system should return the next page of data.
|
331
|
+
# @!attribute [rw] page_size
|
332
|
+
# @return [Integer]
|
333
|
+
# The maximum number of results to return in a single response. Default is
|
334
|
+
# 10, minimum is 1, maximum is 1000.
|
335
|
+
class ListSourcesRequest; end
|
336
|
+
|
337
|
+
# Response message for listing sources.
|
338
|
+
# @!attribute [rw] sources
|
339
|
+
# @return [Array<Google::Cloud::SecurityCenter::V1::Source>]
|
340
|
+
# Sources belonging to the requested parent.
|
341
|
+
# @!attribute [rw] next_page_token
|
342
|
+
# @return [String]
|
343
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
344
|
+
# results.
|
345
|
+
class ListSourcesResponse; end
|
346
|
+
|
347
|
+
# Request message for listing assets.
|
348
|
+
# @!attribute [rw] parent
|
349
|
+
# @return [String]
|
350
|
+
# Name of the organization assets should belong to. Its format is
|
351
|
+
# "organizations/[organization_id]".
|
352
|
+
# @!attribute [rw] filter
|
353
|
+
# @return [String]
|
354
|
+
# Expression that defines the filter to apply across assets.
|
355
|
+
# The expression is a list of zero or more restrictions combined via logical
|
356
|
+
# operators `AND` and `OR`.
|
357
|
+
# Parentheses are supported, and `OR` has higher precedence than `AND`.
|
358
|
+
#
|
359
|
+
# Restrictions have the form `<field> <operator> <value>` and may have a `-`
|
360
|
+
# character in front of them to indicate negation. The fields map to those
|
361
|
+
# defined in the Asset resource. Examples include:
|
362
|
+
#
|
363
|
+
# * name
|
364
|
+
# * security_center_properties.resource_name
|
365
|
+
# * resource_properties.a_property
|
366
|
+
# * security_marks.marks.marka
|
367
|
+
#
|
368
|
+
# The supported operators are:
|
369
|
+
#
|
370
|
+
# * `=` for all value types.
|
371
|
+
# * `>`, `<`, `>=`, `<=` for integer values.
|
372
|
+
# * `:`, meaning substring matching, for strings.
|
373
|
+
#
|
374
|
+
# The supported value types are:
|
375
|
+
#
|
376
|
+
# * string literals in quotes.
|
377
|
+
# * integer literals without quotes.
|
378
|
+
# * boolean literals `true` and `false` without quotes.
|
379
|
+
#
|
380
|
+
# The following are the allowed field and operator combinations:
|
381
|
+
# name | `=`
|
382
|
+
# update_time | `>`, `<`, `>=`, `<=`
|
383
|
+
# iam_policy.policy_blob | '=', ':'
|
384
|
+
# resource_properties | '=', ':', `>`, `<`, `>=`, `<=`
|
385
|
+
# security_marks | '=', ':'
|
386
|
+
# security_center_properties.resource_name | '=', ':'
|
387
|
+
# security_center_properties.resource_type | '=', ':'
|
388
|
+
# security_center_properties.resource_parent | '=', ':'
|
389
|
+
# security_center_properties.resource_project | '=', ':'
|
390
|
+
# security_center_properties.resource_owners | '=', ':'
|
391
|
+
#
|
392
|
+
# For example, `resource_properties.size = 100` is a valid filter string.
|
393
|
+
# @!attribute [rw] order_by
|
394
|
+
# @return [String]
|
395
|
+
# Expression that defines what fields and order to use for sorting. The
|
396
|
+
# string value should follow SQL syntax: comma separated list of fields. For
|
397
|
+
# example: "name,resource_properties.a_property". The default sorting order
|
398
|
+
# is ascending. To specify descending order for a field, a suffix " desc"
|
399
|
+
# should be appended to the field name. For example: "name
|
400
|
+
# desc,resource_properties.a_property". Redundant space characters in the
|
401
|
+
# syntax are insignificant. "name desc,resource_properties.a_property" and "
|
402
|
+
# name desc , resource_properties.a_property " are equivalent.
|
403
|
+
#
|
404
|
+
# The following fields are supported:
|
405
|
+
# name
|
406
|
+
# update_time
|
407
|
+
# resource_properties
|
408
|
+
# security_marks
|
409
|
+
# security_center_properties.resource_name
|
410
|
+
# security_center_properties.resource_parent
|
411
|
+
# security_center_properties.resource_project
|
412
|
+
# security_center_properties.resource_type
|
413
|
+
# @!attribute [rw] read_time
|
414
|
+
# @return [Google::Protobuf::Timestamp]
|
415
|
+
# Time used as a reference point when filtering assets. The filter is limited
|
416
|
+
# to assets existing at the supplied time and their values are those at that
|
417
|
+
# specific time. Absence of this field will default to the API's version of
|
418
|
+
# NOW.
|
419
|
+
# @!attribute [rw] compare_duration
|
420
|
+
# @return [Google::Protobuf::Duration]
|
421
|
+
# When compare_duration is set, the ListAssetsResult's "state_change"
|
422
|
+
# attribute is updated to indicate whether the asset was added, removed, or
|
423
|
+
# remained present during the compare_duration period of time that precedes
|
424
|
+
# the read_time. This is the time between (read_time - compare_duration) and
|
425
|
+
# read_time.
|
426
|
+
#
|
427
|
+
# The state_change value is derived based on the presence of the asset at the
|
428
|
+
# two points in time. Intermediate state changes between the two times don't
|
429
|
+
# affect the result. For example, the results aren't affected if the asset is
|
430
|
+
# removed and re-created again.
|
431
|
+
#
|
432
|
+
# Possible "state_change" values when compare_duration is specified:
|
433
|
+
#
|
434
|
+
# * "ADDED": indicates that the asset was not present at the start of
|
435
|
+
# compare_duration, but present at read_time.
|
436
|
+
# * "REMOVED": indicates that the asset was present at the start of
|
437
|
+
# compare_duration, but not present at read_time.
|
438
|
+
# * "ACTIVE": indicates that the asset was present at both the
|
439
|
+
# start and the end of the time period defined by
|
440
|
+
# compare_duration and read_time.
|
441
|
+
#
|
442
|
+
# If compare_duration is not specified, then the only possible state_change
|
443
|
+
# is "UNUSED", which will be the state_change set for all assets present at
|
444
|
+
# read_time.
|
445
|
+
# @!attribute [rw] field_mask
|
446
|
+
# @return [Google::Protobuf::FieldMask]
|
447
|
+
# Optional.
|
448
|
+
#
|
449
|
+
# A field mask to specify the ListAssetsResult fields to be listed in the
|
450
|
+
# response.
|
451
|
+
# An empty field mask will list all fields.
|
452
|
+
# @!attribute [rw] page_token
|
453
|
+
# @return [String]
|
454
|
+
# The value returned by the last `ListAssetsResponse`; indicates
|
455
|
+
# that this is a continuation of a prior `ListAssets` call, and
|
456
|
+
# that the system should return the next page of data.
|
457
|
+
# @!attribute [rw] page_size
|
458
|
+
# @return [Integer]
|
459
|
+
# The maximum number of results to return in a single response. Default is
|
460
|
+
# 10, minimum is 1, maximum is 1000.
|
461
|
+
class ListAssetsRequest; end
|
462
|
+
|
463
|
+
# Response message for listing assets.
|
464
|
+
# @!attribute [rw] list_assets_results
|
465
|
+
# @return [Array<Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>]
|
466
|
+
# Assets matching the list request.
|
467
|
+
# @!attribute [rw] read_time
|
468
|
+
# @return [Google::Protobuf::Timestamp]
|
469
|
+
# Time used for executing the list request.
|
470
|
+
# @!attribute [rw] next_page_token
|
471
|
+
# @return [String]
|
472
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
473
|
+
# results.
|
474
|
+
# @!attribute [rw] total_size
|
475
|
+
# @return [Integer]
|
476
|
+
# The total number of assets matching the query.
|
477
|
+
class ListAssetsResponse
|
478
|
+
# Result containing the Asset and its State.
|
479
|
+
# @!attribute [rw] asset
|
480
|
+
# @return [Google::Cloud::SecurityCenter::V1::Asset]
|
481
|
+
# Asset matching the search request.
|
482
|
+
# @!attribute [rw] state_change
|
483
|
+
# @return [Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult::StateChange]
|
484
|
+
# State change of the asset between the points in time.
|
485
|
+
class ListAssetsResult
|
486
|
+
# The change in state of the asset.
|
487
|
+
#
|
488
|
+
# When querying across two points in time this describes
|
489
|
+
# the change between the two points: ADDED, REMOVED, or ACTIVE.
|
490
|
+
# If there was no compare_duration supplied in the request the state change
|
491
|
+
# will be: UNUSED
|
492
|
+
module StateChange
|
493
|
+
# State change is unused, this is the canonical default for this enum.
|
494
|
+
UNUSED = 0
|
495
|
+
|
496
|
+
# Asset was added between the points in time.
|
497
|
+
ADDED = 1
|
498
|
+
|
499
|
+
# Asset was removed between the points in time.
|
500
|
+
REMOVED = 2
|
501
|
+
|
502
|
+
# Asset was present at both point(s) in time.
|
503
|
+
ACTIVE = 3
|
504
|
+
end
|
505
|
+
end
|
506
|
+
end
|
507
|
+
|
508
|
+
# Request message for listing findings.
|
509
|
+
# @!attribute [rw] parent
|
510
|
+
# @return [String]
|
511
|
+
# Name of the source the findings belong to. Its format is
|
512
|
+
# "organizations/[organization_id]/sources/[source_id]". To list across all
|
513
|
+
# sources provide a source_id of `-`. For example:
|
514
|
+
# organizations/123/sources/-
|
515
|
+
# @!attribute [rw] filter
|
516
|
+
# @return [String]
|
517
|
+
# Expression that defines the filter to apply across findings.
|
518
|
+
# The expression is a list of one or more restrictions combined via logical
|
519
|
+
# operators `AND` and `OR`.
|
520
|
+
# Parentheses are supported, and `OR` has higher precedence than `AND`.
|
521
|
+
#
|
522
|
+
# Restrictions have the form `<field> <operator> <value>` and may have a `-`
|
523
|
+
# character in front of them to indicate negation. Examples include:
|
524
|
+
#
|
525
|
+
# * name
|
526
|
+
# * source_properties.a_property
|
527
|
+
# * security_marks.marks.marka
|
528
|
+
#
|
529
|
+
# The supported operators are:
|
530
|
+
#
|
531
|
+
# * `=` for all value types.
|
532
|
+
# * `>`, `<`, `>=`, `<=` for integer values.
|
533
|
+
# * `:`, meaning substring matching, for strings.
|
534
|
+
#
|
535
|
+
# The supported value types are:
|
536
|
+
#
|
537
|
+
# * string literals in quotes.
|
538
|
+
# * integer literals without quotes.
|
539
|
+
# * boolean literals `true` and `false` without quotes.
|
540
|
+
#
|
541
|
+
# The following field and operator combinations are supported:
|
542
|
+
# name | `=`
|
543
|
+
# parent | '=', ':'
|
544
|
+
# resource_name | '=', ':'
|
545
|
+
# state | '=', ':'
|
546
|
+
# category | '=', ':'
|
547
|
+
# external_uri | '=', ':'
|
548
|
+
# event_time | `>`, `<`, `>=`, `<=`
|
549
|
+
# security_marks | '=', ':'
|
550
|
+
# source_properties | '=', ':', `>`, `<`, `>=`, `<=`
|
551
|
+
#
|
552
|
+
# For example, `source_properties.size = 100` is a valid filter string.
|
553
|
+
# @!attribute [rw] order_by
|
554
|
+
# @return [String]
|
555
|
+
# Expression that defines what fields and order to use for sorting. The
|
556
|
+
# string value should follow SQL syntax: comma separated list of fields. For
|
557
|
+
# example: "name,resource_properties.a_property". The default sorting order
|
558
|
+
# is ascending. To specify descending order for a field, a suffix " desc"
|
559
|
+
# should be appended to the field name. For example: "name
|
560
|
+
# desc,source_properties.a_property". Redundant space characters in the
|
561
|
+
# syntax are insignificant. "name desc,source_properties.a_property" and "
|
562
|
+
# name desc , source_properties.a_property " are equivalent.
|
563
|
+
#
|
564
|
+
# The following fields are supported:
|
565
|
+
# name
|
566
|
+
# parent
|
567
|
+
# state
|
568
|
+
# category
|
569
|
+
# resource_name
|
570
|
+
# event_time
|
571
|
+
# source_properties
|
572
|
+
# security_marks
|
573
|
+
# @!attribute [rw] read_time
|
574
|
+
# @return [Google::Protobuf::Timestamp]
|
575
|
+
# Time used as a reference point when filtering findings. The filter is
|
576
|
+
# limited to findings existing at the supplied time and their values are
|
577
|
+
# those at that specific time. Absence of this field will default to the
|
578
|
+
# API's version of NOW.
|
579
|
+
# @!attribute [rw] compare_duration
|
580
|
+
# @return [Google::Protobuf::Duration]
|
581
|
+
# When compare_duration is set, the ListFindingsResult's "state_change"
|
582
|
+
# attribute is updated to indicate whether the finding had its state changed,
|
583
|
+
# the finding's state remained unchanged, or if the finding was added in any
|
584
|
+
# state during the compare_duration period of time that precedes the
|
585
|
+
# read_time. This is the time between (read_time - compare_duration) and
|
586
|
+
# read_time.
|
587
|
+
#
|
588
|
+
# The state_change value is derived based on the presence and state of the
|
589
|
+
# finding at the two points in time. Intermediate state changes between the
|
590
|
+
# two times don't affect the result. For example, the results aren't affected
|
591
|
+
# if the finding is made inactive and then active again.
|
592
|
+
#
|
593
|
+
# Possible "state_change" values when compare_duration is specified:
|
594
|
+
#
|
595
|
+
# * "CHANGED": indicates that the finding was present at the start of
|
596
|
+
# compare_duration, but changed its state at read_time.
|
597
|
+
# * "UNCHANGED": indicates that the finding was present at the start of
|
598
|
+
# compare_duration and did not change state at read_time.
|
599
|
+
# * "ADDED": indicates that the finding was not present at the start
|
600
|
+
# of compare_duration, but was present at read_time.
|
601
|
+
#
|
602
|
+
# If compare_duration is not specified, then the only possible state_change
|
603
|
+
# is "UNUSED", which will be the state_change set for all findings present at
|
604
|
+
# read_time.
|
605
|
+
# @!attribute [rw] field_mask
|
606
|
+
# @return [Google::Protobuf::FieldMask]
|
607
|
+
# Optional.
|
608
|
+
#
|
609
|
+
# A field mask to specify the Finding fields to be listed in the response.
|
610
|
+
# An empty field mask will list all fields.
|
611
|
+
# @!attribute [rw] page_token
|
612
|
+
# @return [String]
|
613
|
+
# The value returned by the last `ListFindingsResponse`; indicates
|
614
|
+
# that this is a continuation of a prior `ListFindings` call, and
|
615
|
+
# that the system should return the next page of data.
|
616
|
+
# @!attribute [rw] page_size
|
617
|
+
# @return [Integer]
|
618
|
+
# The maximum number of results to return in a single response. Default is
|
619
|
+
# 10, minimum is 1, maximum is 1000.
|
620
|
+
class ListFindingsRequest; end
|
621
|
+
|
622
|
+
# Response message for listing findings.
|
623
|
+
# @!attribute [rw] list_findings_results
|
624
|
+
# @return [Array<Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>]
|
625
|
+
# Findings matching the list request.
|
626
|
+
# @!attribute [rw] read_time
|
627
|
+
# @return [Google::Protobuf::Timestamp]
|
628
|
+
# Time used for executing the list request.
|
629
|
+
# @!attribute [rw] next_page_token
|
630
|
+
# @return [String]
|
631
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
632
|
+
# results.
|
633
|
+
# @!attribute [rw] total_size
|
634
|
+
# @return [Integer]
|
635
|
+
# The total number of findings matching the query.
|
636
|
+
class ListFindingsResponse
|
637
|
+
# Result containing the Finding and its StateChange.
|
638
|
+
# @!attribute [rw] finding
|
639
|
+
# @return [Google::Cloud::SecurityCenter::V1::Finding]
|
640
|
+
# Finding matching the search request.
|
641
|
+
# @!attribute [rw] state_change
|
642
|
+
# @return [Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult::StateChange]
|
643
|
+
# State change of the finding between the points in time.
|
644
|
+
class ListFindingsResult
|
645
|
+
# The change in state of the finding.
|
646
|
+
#
|
647
|
+
# When querying across two points in time this describes
|
648
|
+
# the change in the finding between the two points: CHANGED, UNCHANGED,
|
649
|
+
# ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that
|
650
|
+
# the finding at timestamp does not match the filter specified, but it did
|
651
|
+
# at timestamp - compare_duration. If there was no compare_duration
|
652
|
+
# supplied in the request the state change will be: UNUSED
|
653
|
+
module StateChange
|
654
|
+
# State change is unused, this is the canonical default for this enum.
|
655
|
+
UNUSED = 0
|
656
|
+
|
657
|
+
# The finding has changed state in some way between the points in time
|
658
|
+
# and existed at both points.
|
659
|
+
CHANGED = 1
|
660
|
+
|
661
|
+
# The finding has not changed state between the points in time and
|
662
|
+
# existed at both points.
|
663
|
+
UNCHANGED = 2
|
664
|
+
|
665
|
+
# The finding was created between the points in time.
|
666
|
+
ADDED = 3
|
667
|
+
|
668
|
+
# The finding at timestamp does not match the filter specified, but it
|
669
|
+
# did at timestamp - compare_duration.
|
670
|
+
REMOVED = 4
|
671
|
+
end
|
672
|
+
end
|
673
|
+
end
|
674
|
+
|
675
|
+
# Request message for updating a finding's state.
|
676
|
+
# @!attribute [rw] name
|
677
|
+
# @return [String]
|
678
|
+
# The relative resource name of the finding. See:
|
679
|
+
# https://cloud.google.com/apis/design/resource_names#relative_resource_name
|
680
|
+
# Example:
|
681
|
+
# "organizations/123/sources/456/finding/789".
|
682
|
+
# @!attribute [rw] state
|
683
|
+
# @return [Google::Cloud::SecurityCenter::V1::Finding::State]
|
684
|
+
# The desired State of the finding.
|
685
|
+
# @!attribute [rw] start_time
|
686
|
+
# @return [Google::Protobuf::Timestamp]
|
687
|
+
# The time at which the updated state takes effect.
|
688
|
+
class SetFindingStateRequest; end
|
689
|
+
|
690
|
+
# Request message for running asset discovery for an organization.
|
691
|
+
# @!attribute [rw] parent
|
692
|
+
# @return [String]
|
693
|
+
# Name of the organization to run asset discovery for. Its format is
|
694
|
+
# "organizations/[organization_id]".
|
695
|
+
class RunAssetDiscoveryRequest; end
|
696
|
+
|
697
|
+
# Request message for updating or creating a finding.
|
698
|
+
# @!attribute [rw] finding
|
699
|
+
# @return [Google::Cloud::SecurityCenter::V1::Finding]
|
700
|
+
# The finding resource to update or create if it does not already exist.
|
701
|
+
# parent, security_marks, and update_time will be ignored.
|
702
|
+
#
|
703
|
+
# In the case of creation, the finding id portion of the name must be
|
704
|
+
# alphanumeric and less than or equal to 32 characters and greater than 0
|
705
|
+
# characters in length.
|
706
|
+
# @!attribute [rw] update_mask
|
707
|
+
# @return [Google::Protobuf::FieldMask]
|
708
|
+
# The FieldMask to use when updating the finding resource. This field should
|
709
|
+
# not be specified when creating a finding.
|
710
|
+
#
|
711
|
+
# When updating a finding, an empty mask is treated as updating all mutable
|
712
|
+
# fields and replacing source_properties. Individual source_properties can
|
713
|
+
# be added/updated by using "source_properties.<property key>" in the field
|
714
|
+
# mask.
|
715
|
+
class UpdateFindingRequest; end
|
716
|
+
|
717
|
+
# Request message for updating an organization's settings.
|
718
|
+
# @!attribute [rw] organization_settings
|
719
|
+
# @return [Google::Cloud::SecurityCenter::V1::OrganizationSettings]
|
720
|
+
# The organization settings resource to update.
|
721
|
+
# @!attribute [rw] update_mask
|
722
|
+
# @return [Google::Protobuf::FieldMask]
|
723
|
+
# The FieldMask to use when updating the settings resource.
|
724
|
+
#
|
725
|
+
# If empty all mutable fields will be updated.
|
726
|
+
class UpdateOrganizationSettingsRequest; end
|
727
|
+
|
728
|
+
# Request message for updating a source.
|
729
|
+
# @!attribute [rw] source
|
730
|
+
# @return [Google::Cloud::SecurityCenter::V1::Source]
|
731
|
+
# The source resource to update.
|
732
|
+
# @!attribute [rw] update_mask
|
733
|
+
# @return [Google::Protobuf::FieldMask]
|
734
|
+
# The FieldMask to use when updating the source resource.
|
735
|
+
#
|
736
|
+
# If empty all mutable fields will be updated.
|
737
|
+
class UpdateSourceRequest; end
|
738
|
+
|
739
|
+
# Request message for updating a SecurityMarks resource.
|
740
|
+
# @!attribute [rw] security_marks
|
741
|
+
# @return [Google::Cloud::SecurityCenter::V1::SecurityMarks]
|
742
|
+
# The security marks resource to update.
|
743
|
+
# @!attribute [rw] update_mask
|
744
|
+
# @return [Google::Protobuf::FieldMask]
|
745
|
+
# The FieldMask to use when updating the security marks resource.
|
746
|
+
#
|
747
|
+
# The field mask must not contain duplicate fields.
|
748
|
+
# If empty or set to "marks", all marks will be replaced. Individual
|
749
|
+
# marks can be updated using "marks.<mark_key>".
|
750
|
+
# @!attribute [rw] start_time
|
751
|
+
# @return [Google::Protobuf::Timestamp]
|
752
|
+
# The time at which the updated SecurityMarks take effect.
|
753
|
+
# If not set uses current server time. Updates will be applied to the
|
754
|
+
# SecurityMarks that are active immediately preceding this time.
|
755
|
+
class UpdateSecurityMarksRequest; end
|
756
|
+
end
|
757
|
+
end
|
758
|
+
end
|
759
|
+
end
|