- JSON representation
- Policy
- ComplianceStandard
- Constraint
- SecurityHealthAnalyticsModule
- EnablementState
- SecurityHealthAnalyticsCustomModule
- CustomConfig
- Expr
- CustomOutputSpec
- Property
- ResourceSelector
- Severity
- OrgPolicyConstraint
- PolicyRule
- StringValues
- OrgPolicyConstraintCustom
- CustomConstraint
- MethodType
- ActionType
A group of one or more Policy
resources.
JSON representation |
---|
{
"policySetId": string,
"description": string,
"policies": [
{
object ( |
Fields | |
---|---|
policy |
Required. An identifier for the policy set. |
description |
Optional. A description of the policy set. |
policies[] |
Required. The Each policy must have a |
Policy
The details of a policy, including the constraints that it includes.
JSON representation |
---|
{ "policyId": string, "complianceStandards": [ { object ( |
Fields | |
---|---|
policy |
Required. A user-specified identifier for the policy. In a |
compliance |
Optional. The compliance standards that the policy helps enforce. |
constraint |
Required. The constraints that the policy includes. |
description |
Optional. A description of the policy. |
ComplianceStandard
Information about a compliance standard that the policy helps enforce.
JSON representation |
---|
{ "standard": string, "control": string } |
Fields | |
---|---|
standard |
Optional. The compliance standard that the policy helps enforce. For example, |
control |
Optional. The control in the compliance standard that the policy helps enforce. For example, |
Constraint
Metadata for a constraint in a Policy
.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field implementation . The implementation of the constraint. implementation can be only one of the following: |
|
security |
Optional. A built-in detector for Security Health Analytics. |
security |
Optional. A custom module for Security Health Analytics. |
org |
Optional. A predefined organization policy constraint. |
org |
Optional. A custom organization policy constraint. |
SecurityHealthAnalyticsModule
A built-in detector for Security Health Analytics.
JSON representation |
---|
{
"moduleName": string,
"moduleEnablementState": enum ( |
Fields | |
---|---|
module |
Required. The name of the detector. For example, |
module |
Whether the detector is enabled at a specified level of the resource hierarchy. |
EnablementState
Whether a built-in detector or custom module is enabled at a specified level of the resource hierarchy.
Enums | |
---|---|
ENABLEMENT_STATE_UNSPECIFIED |
Default value. This value is unused. |
ENABLED |
The detector or custom module is enabled. |
DISABLED |
The detector or custom module is disabled. |
SecurityHealthAnalyticsCustomModule
A custom module for Security Health Analytics.
JSON representation |
---|
{ "id": string, "displayName": string, "config": { object ( |
Fields | |
---|---|
id |
Output only. Immutable. The unique identifier for the custom module. Contains 1 to 20 digits. |
display |
Optional. The display name of the custom module. This value is used as the finding category for all findings that the custom module returns. The display name must contain between 1 and 128 alphanumeric characters or underscores, and it must start with a lowercase letter. |
config |
Required. Configuration settings for the custom module. |
module |
Whether the custom module is enabled at a specified level of the resource hierarchy. |
CustomConfig
A custom module configuration for Security Health Analytics. Use CustomConfig
to create custom detectors that generate custom findings for resources that you specify.
JSON representation |
---|
{ "predicate": { object ( |
Fields | |
---|---|
predicate |
Required. The Common Expression Language (CEL) expression to evaluate. When the expression evaluates to |
custom |
Optional. Definitions of custom source properties to include in findings. |
resource |
Required. The resource types that the custom module operates on. |
severity |
Required. The severity of findings generated by the custom module. |
description |
Optional. A description of the vulnerability or misconfiguration that the custom module detects. The description appears in each finding. Provide enough information to help an investigator understand the finding. The value must be enclosed in quotation marks. |
recommendation |
Optional. An explanation of the steps that security teams can take to resolve the detected issue. The explanation appears in each finding. |
Expr
Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.
Example (Comparison):
title: "Summary size limit"
description: "Determines if a summary is less than 100 chars"
expression: "document.summary.size() < 100"
Example (Equality):
title: "Requestor is owner"
description: "Determines if requestor is the document owner"
expression: "document.owner == request.auth.claims.email"
Example (Logic):
title: "Public documents"
description: "Determine whether the document should be publicly visible"
expression: "document.type != 'private' && document.type != 'internal'"
Example (Data Manipulation):
title: "Notification string"
description: "Create a notification string with a timestamp."
expression: "'New message received at ' + string(document.create_time)"
The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
JSON representation |
---|
{ "expression": string, "title": string, "description": string, "location": string } |
Fields | |
---|---|
expression |
Textual representation of an expression in Common Expression Language syntax. |
title |
Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. |
description |
Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. |
location |
Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. |
CustomOutputSpec
Definitions of custom source properties that can appear in findings.
JSON representation |
---|
{
"properties": [
{
object ( |
Fields | |
---|---|
properties[] |
Optional. The custom source properties that can appear in findings. |
Property
A name-value pair used as a custom source property.
JSON representation |
---|
{
"name": string,
"valueExpression": {
object ( |
Fields | |
---|---|
name |
Required. The name of the custom source property. |
value |
Optional. The CEL expression for the value of the custom source property. For resource properties, you can return the value of the property or a string enclosed in quotation marks. |
ResourceSelector
A selector for the resource types to run the detector on.
JSON representation |
---|
{ "resourceTypes": [ string ] } |
Fields | |
---|---|
resource |
Required. The resource types to run the detector on. Each custom module can specify up to 5 resource types. |
Severity
The severity of a finding.
Enums | |
---|---|
SEVERITY_UNSPECIFIED |
Default value. This value is unused. |
CRITICAL |
Critical severity. |
HIGH |
High severity. |
MEDIUM |
Medium severity. |
LOW |
Low severity. |
OrgPolicyConstraint
A predefined organization policy constraint.
JSON representation |
---|
{
"cannedConstraintId": string,
"policyRules": [
{
object ( |
Fields | |
---|---|
canned |
Required. A unique identifier for the constraint. |
policy |
Required. The rules enforced by the constraint. |
PolicyRule
A rule that defines the allowed and denied values for an organization policy constraint.
JSON representation |
---|
{ "condition": { object ( |
Fields | |
---|---|
condition |
A condition that determines whether this rule is used to evaluate the policy. When set, the The
For example: The
For example: |
Union field kind . The type of rule that the PolicyRule defines. kind can be only one of the following: |
|
values |
The allowed and denied values for a list constraint. Valid only for list constraints. |
allow |
Whether to allow any value for a list constraint. Valid only for list constraints. |
deny |
Whether to deny all values for a list constraint. Valid only for list constraints. |
enforce |
Whether to enforce the constraint. Valid only for boolean constraints. |
StringValues
The allowed and denied values for a list constraint.
For all constraints, these fields can contain literal values. Optionally, you can add the is:
prefix to these values. If the value contains a colon (:
), then the is:
prefix is required.
Some constraints allow you to specify a portion of the resource hierarchy, known as a hierarchy subtree, that the constraint applies to. To specify a hierarchy subtree, use the under:
prefix, followed by a value with one of these formats:
projects/{projectId}
(for example,projects/tokyo-rain-123
)folders/{folder_id}
(for example,folders/1234567890123
)organizations/{organization_id}
(for example,organizations/123456789012
)
A constraint's supportsUnder
field indicates whether you can specify a hierarchy subtree. To learn which predefined constraints let you specify a hierarchy subtree, see the constraints reference.
JSON representation |
---|
{ "allowedValues": [ string ], "deniedValues": [ string ] } |
Fields | |
---|---|
allowed |
The allowed values for the constraint. |
denied |
The denied values for the constraint. |
OrgPolicyConstraintCustom
A custom organization policy constraint.
JSON representation |
---|
{ "customConstraint": { object ( |
Fields | |
---|---|
custom |
Required. Metadata for the constraint. |
policy |
Required. The rules enforced by the constraint. |
CustomConstraint
A custom, user-defined constraint. You can apply the constraint only to the resource types specified in the constraint, and only within the organization where the constraint is defined.
When you create a custom constraint, it is not enforced automatically. You must use an organization policy to enforce the constraint.
JSON representation |
---|
{ "name": string, "resourceTypes": [ string ], "methodTypes": [ enum ( |
Fields | |
---|---|
name |
Immutable. The name of the constraint, in the format Must contain 1 to 62 characters, excluding the prefix |
resource |
Immutable. The resource type that the constraint applies to, in the format |
method |
The types of operations that the constraint applies to. |
condition |
A Common Expression Language (CEL) condition expression that must evaluate to For example:
|
action |
Whether to allow or deny the action. |
display |
A display name for the constraint. The maximum length is 200 characters. |
description |
A description of the constraint. The maximum length is 2000 characters. |
update |
Output only. The last time at which the constraint was updated or created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
MethodType
A type of operation that the constraint applies to.
If a constraint applies to MethodType.UPDATE
operations, then it must also apply to MethodType.CREATE
operations.
Enums | |
---|---|
METHOD_TYPE_UNSPECIFIED |
Default value. This value is unused. |
CREATE |
Constraint applied when creating the resource. |
UPDATE |
Constraint applied when updating the resource. |
DELETE |
Not supported. Constraint applied when deleting the resource. |
ActionType
Whether to allow or deny the action.
Enums | |
---|---|
ACTION_TYPE_UNSPECIFIED |
Default value. This value is unused. |
ALLOW |
Allow the action. |
DENY |
Deny the action. |