- JSON representation
- UserDefinedField
- Base
- AdaptiveProtectionConfig
- Layer7DdosDefenseConfig
- RuleVisibility
- ThresholdConfig
- TrafficGranularityConfig
- Type
- DdosProtectionConfig
- DdosProtection
- AdvancedOptionsConfig
- JsonParsing
- JsonCustomConfig
- LogLevel
- RecaptchaOptionsConfig
- SecurityPolicyType
Represents a Trusted Cloud Armor security policy resource.
Only external backend services that use load balancers can reference a security policy. For more information, see Trusted Cloud Armor security policy overview.
JSON representation |
---|
{ "userDefinedFields": [ { object ( |
Fields | |
---|---|
userDefinedFields[] |
Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A user-defined field consists of up to 4 bytes extracted from a fixed offset in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an optional mask to select certain bits. Rules may then specify matching values for these fields. Example: userDefinedFields: - name: "ipv4_fragment_offset" base: IPV4 offset: 6 size: 2 mask: "0x1fff" |
kind |
[Output only] Type of the resource. Always
for security policies |
id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
creationTimestamp |
[Output Only] Creation timestamp in RFC3339 text format. |
name |
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression |
description |
An optional description of this resource. Provide this property when you create the resource. |
rules[] |
A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added. |
adaptiveProtectionConfig |
|
ddosProtectionConfig |
|
advancedOptionsConfig |
|
recaptchaOptionsConfig |
|
fingerprint |
Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error
. To see the latest fingerprint, make
request to the security policy. A base64-encoded string. |
selfLink |
[Output Only] Server-defined URL for the resource. |
type |
The type indicates the intended use of the security policy.
: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. |
labels |
Labels for this resource. These can only be added or modified by the
method. Each label key/value pair must comply with RFC1035. Label values may be empty. |
labelFingerprint |
A fingerprint for the labels being applied to this security policy, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make
request to the security policy. A base64-encoded string. |
region |
[Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies. |
UserDefinedField
JSON representation |
---|
{
"name": string,
"base": enum ( |
Fields | |
---|---|
name |
The name of this field. Must be unique within the policy. |
base |
The base relative to which 'offset' is measured. Possible values are:
|
offset |
Offset of the first byte of the field (in network byte order) relative to 'base'. |
size |
Size of the field in bytes. Valid values: 1-4. |
mask |
If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask. |
Base
Enums | |
---|---|
IPV4 |
|
IPV6 |
|
TCP |
|
UDP |
AdaptiveProtectionConfig
Configuration options for Cloud Armor Adaptive Protection (CAAP).
JSON representation |
---|
{
"layer7DdosDefenseConfig": {
object ( |
Fields | |
---|---|
layer7DdosDefenseConfig |
If set to true, enables Cloud Armor Machine Learning. |
Layer7DdosDefenseConfig
Configuration options for L7 DDoS detection. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
JSON representation |
---|
{ "enable": boolean, "ruleVisibility": enum ( |
Fields | |
---|---|
enable |
If set to true, enables CAAP for L7 DDoS detection. This field is only supported in Global Security Policies of type CLOUD_ARMOR. |
ruleVisibility |
Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules. This field is only supported in Global Security Policies of type CLOUD_ARMOR. |
thresholdConfigs[] |
Configuration options for layer7 adaptive protection for various customizable thresholds. |
RuleVisibility
Enums | |
---|---|
STANDARD |
|
PREMIUM |
ThresholdConfig
JSON representation |
---|
{
"name": string,
"autoDeployLoadThreshold": number,
"autoDeployConfidenceThreshold": number,
"autoDeployImpactedBaselineThreshold": number,
"autoDeployExpirationSec": integer,
"detectionLoadThreshold": number,
"detectionAbsoluteQps": number,
"detectionRelativeToBaselineQps": number,
"trafficGranularityConfigs": [
{
object ( |
Fields | |
---|---|
name |
The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the security policy. |
autoDeployLoadThreshold |
|
autoDeployConfidenceThreshold |
|
autoDeployImpactedBaselineThreshold |
|
autoDeployExpirationSec |
|
detectionLoadThreshold |
|
detectionAbsoluteQps |
|
detectionRelativeToBaselineQps |
|
trafficGranularityConfigs[] |
Configuration options for enabling Adaptive Protection to operate on specified granular traffic units. |
TrafficGranularityConfig
Configurations to specifc granular traffic units processed by Adaptive Protection.
JSON representation |
---|
{
"type": enum ( |
Fields | |
---|---|
type |
Type of this configuration. |
value |
Requests that match this value constitute a granular traffic unit. |
enableEachUniqueValue |
If enabled, traffic matching each unique value for the specified type constitutes a separate traffic unit. It can only be set to true if |
Type
Types on which a granular unit can be configured.
Enums | |
---|---|
UNSPECIFIED_TYPE |
|
HTTP_HEADER_HOST |
|
HTTP_PATH |
DdosProtectionConfig
JSON representation |
---|
{
"ddosProtection": enum ( |
Fields | |
---|---|
ddosProtection |
|
DdosProtection
Advanced DDoS protection configuration options. Can only be set if the security policy type is CLOUD_ARMOR_NETWORK. The following are the valid options: * STANDARD: Standard protection is enabled for this project. * ADVANCED: Advanced DDoS protection is enabled for this project in the region. * ADVANCED_PREVIEW: Advanced DDoS protection is enabled for this project in preview mode.
Enums | |
---|---|
STANDARD |
|
ADVANCED |
|
ADVANCED_PREVIEW |
AdvancedOptionsConfig
JSON representation |
---|
{ "jsonParsing": enum ( |
Fields | |
---|---|
jsonParsing |
|
jsonCustomConfig |
Custom configuration to apply the JSON parsing. Only applicable when jsonParsing is set to STANDARD. |
logLevel |
|
userIpRequestHeaders[] |
An optional list of case-insensitive request header names to use for resolving the callers client IP address. |
JsonParsing
Enums | |
---|---|
DISABLED |
|
STANDARD |
|
STANDARD_WITH_GRAPHQL |
JsonCustomConfig
JSON representation |
---|
{ "contentTypes": [ string ] } |
Fields | |
---|---|
contentTypes[] |
A list of custom Content-Type header values to apply the JSON parsing. As per RFC 1341, a Content-Type header value has the following format: Content-Type := type "/" subtype *[";" parameter] When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded. |
LogLevel
Enums | |
---|---|
NORMAL |
|
VERBOSE |
RecaptchaOptionsConfig
JSON representation |
---|
{ "redirectSiteKey": string } |
Fields | |
---|---|
redirectSiteKey |
An optional field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google Cloud-powered site key is used. This field is only supported in Global Security Policies of type CLOUD_ARMOR. |
SecurityPolicyType
Enums | |
---|---|
CLOUD_ARMOR |
|
CLOUD_ARMOR_EDGE |
|
CLOUD_ARMOR_NETWORK |