- Resource: AuthzPolicy
- Target
- LoadBalancingScheme
- AuthzRule
- From
- RequestSource
- StringMatch
- RequestResource
- TagValueIdSet
- To
- RequestOperation
- HeaderSet
- HeaderMatch
- AuthzAction
- CustomProvider
- CloudIap
- AuthzExtension
- Methods
Resource: AuthzPolicy
AuthzPolicy
is a resource that allows to forward traffic to a callout backend designed to scan the traffic for security purposes.
JSON representation |
---|
{ "name": string, "createTime": string, "updateTime": string, "description": string, "labels": { string: string, ... }, "target": { object ( |
Fields | |
---|---|
name |
Required. Identifier. Name of the |
createTime |
Output only. The timestamp when the resource was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. The timestamp when the resource was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
description |
Optional. A human-readable description of the resource. |
labels |
Optional. Set of labels associated with the The format must comply with the following requirements. An object containing a list of |
target |
Required. Specifies the set of resources to which this policy should be applied to. |
httpRules[] |
Optional. A list of authorization HTTP rules to match against the incoming request. A policy match occurs when at least one HTTP rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow or Deny Action. Limited to 5 rules. |
action |
Required. Can be one of When the action is When the action is When the action is When a request arrives, the policies are evaluated in the following order:
|
customProvider |
Optional. Required if the action is |
Target
Specifies the set of targets to which this policy should be applied to.
JSON representation |
---|
{
"loadBalancingScheme": enum ( |
Fields | |
---|---|
loadBalancingScheme |
Required. All gateways and forwarding rules referenced by this policy and extensions must share the same load balancing scheme. Supported values: |
resources[] |
Required. A list of references to the Forwarding Rules on which this policy will be applied. |
LoadBalancingScheme
Load balancing schemes supported by the AuthzPolicy
resource. The valid values are INTERNAL_MANAGED
and EXTERNAL_MANAGED
. For more information, refer to Backend services overview.
Enums | |
---|---|
LOAD_BALANCING_SCHEME_UNSPECIFIED |
Default value. Do not use. |
INTERNAL_MANAGED |
Signifies that this is used for Regional internal or Cross-region internal Application Load Balancing. |
EXTERNAL_MANAGED |
Signifies that this is used for Global external or Regional external Application Load Balancing. |
INTERNAL_SELF_MANAGED |
Signifies that this is used for Cloud Service Mesh. Meant for use by CSM GKE controller only. |
AuthzRule
Conditions to match against the incoming request.
JSON representation |
---|
{ "from": { object ( |
Fields | |
---|---|
from |
Optional. Describes properties of one or more sources of a request. |
to |
Optional. Describes properties of one or more targets of a request. |
when |
Optional. CEL expression that describes the conditions to be satisfied for the action. The result of the CEL expression is ANDed with the from and to. Refer to the CEL language reference for a list of available attributes. |
From
Describes properties of one or more sources of a request.
JSON representation |
---|
{ "sources": [ { object ( |
Fields | |
---|---|
sources[] |
Optional. Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 5 sources. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match. |
notSources[] |
Optional. Describes the negated properties of request sources. Matches requests from sources that do not match the criteria specified in this field. At least one of sources or notSources must be specified. |
RequestSource
Describes the properties of a single source.
JSON representation |
---|
{ "principals": [ { object ( |
Fields | |
---|---|
principals[] |
Optional. A list of identities derived from the client's certificate. This field will not match on a request unless mutual TLS is enabled for the Forwarding rule or Gateway. Each identity is a string whose value is matched against the URI SAN, or DNS SAN or the subject field in the client's certificate. The match can be exact, prefix, suffix or a substring match. One of exact, prefix, suffix or contains must be specified. Limited to 5 principals. |
resources[] |
Optional. A list of resources to match against the resource of the source VM of a request. Limited to 5 resources. |
StringMatch
Determines how a string value should be matched.
JSON representation |
---|
{ "ignoreCase": boolean, // Union field |
Fields | |
---|---|
ignoreCase |
If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. For example, the matcher |
Union field
|
|
exact |
The input string must match exactly the string specified here. Examples:
|
prefix |
The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples:
|
suffix |
The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples:
|
contains |
The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples:
|
RequestResource
Describes the properties of a client VM resource accessing the internal application load balancers.
JSON representation |
---|
{ "tagValueIdSet": { object ( |
Fields | |
---|---|
tagValueIdSet |
Optional. A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request. |
iamServiceAccount |
Optional. An IAM service account to match against the source service account of the VM sending the request. |
TagValueIdSet
Describes a set of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request.
JSON representation |
---|
{ "ids": [ string ] } |
Fields | |
---|---|
ids[] |
Required. A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request. The match follows AND semantics which means all the ids must match. Limited to 5 matches. |
To
Describes properties of one or more targets of a request.
JSON representation |
---|
{ "operations": [ { object ( |
Fields | |
---|---|
operations[] |
Optional. Describes properties of one or more targets of a request. At least one of operations or notOperations must be specified. Limited to 5 operations. A match occurs when ANY operation (in operations or notOperations) matches. Within an operation, the match follows AND semantics across fields and OR semantics within a field, i.e. a match occurs when ANY path matches AND ANY header matches and ANY method matches. |
notOperations[] |
Optional. Describes the negated properties of the targets of a request. Matches requests for operations that do not match the criteria specified in this field. At least one of operations or notOperations must be specified. |
RequestOperation
Describes properties of one or more targets of a request.
JSON representation |
---|
{ "headerSet": { object ( |
Fields | |
---|---|
headerSet |
Optional. A list of headers to match against in http header. |
hosts[] |
Optional. A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches. |
paths[] |
Optional. A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches. Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method. |
methods[] |
Optional. A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive. |
HeaderSet
Describes a set of HTTP headers to match against.
JSON representation |
---|
{
"headers": [
{
object ( |
Fields | |
---|---|
headers[] |
Required. A list of headers to match against in http header. The match can be one of exact, prefix, suffix, or contains (substring match). The match follows AND semantics which means all the headers must match. Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches. |
HeaderMatch
Determines how a HTTP header should be matched.
JSON representation |
---|
{
"name": string,
"value": {
object ( |
Fields | |
---|---|
name |
Optional. Specifies the name of the header in the request. |
value |
Optional. Specifies how the header match will be performed. |
AuthzAction
The action to be applied to this policy. Valid values are ALLOW
, DENY
, CUSTOM
.
Enums | |
---|---|
AUTHZ_ACTION_UNSPECIFIED |
Unspecified action. |
ALLOW |
Allow request to pass through to the backend. |
DENY |
Deny the request and return a HTTP 404 to the client. |
CUSTOM |
Delegate the authorization decision to an external authorization engine. |
CustomProvider
Allows delegating authorization decisions to Cloud IAP or to Service Extensions.
JSON representation |
---|
{ "cloudIap": { object ( |
Fields | |
---|---|
cloudIap |
Optional. Delegates authorization decisions to Cloud IAP. Applicable only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy level is not compatible with Cloud IAP settings in the BackendService. Enabling IAP in both places will result in request failure. Ensure that IAP is enabled in either the AuthzPolicy or the BackendService but not in both places. |
authzExtension |
Optional. Delegate authorization decision to user authored Service Extension. Only one of cloudIap or authzExtension can be specified. |
CloudIap
This type has no fields.
Optional. Delegates authorization decisions to Cloud IAP. Applicable only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy level is not compatible with Cloud IAP settings in the BackendService. Enabling IAP in both places will result in request failure. Ensure that IAP is enabled in either the AuthzPolicy or the BackendService but not in both places.
AuthzExtension
Optional. Delegate authorization decision to user authored extension. Only one of cloudIap or authzExtension can be specified.
JSON representation |
---|
{ "resources": [ string ] } |
Fields | |
---|---|
resources[] |
Required. A list of references to authorization extensions that will be invoked for requests matching this policy. Limited to 1 custom provider. |
Methods |
|
---|---|
|
Creates a new AuthzPolicy in a given project and location. |
|
Deletes a single AuthzPolicy. |
|
Gets details of a single AuthzPolicy. |
|
Lists AuthzPolicies in a given project and location. |
|
Updates the parameters of a single AuthzPolicy. |