Network Security v1 API - Class AuthzPolicy (1.0.0-beta01)

public sealed class AuthzPolicy : IMessage<AuthzPolicy>, IEquatable<AuthzPolicy>, IDeepCloneable<AuthzPolicy>, IBufferMessage, IMessage

Reference documentation and code samples for the Network Security v1 API class AuthzPolicy.

AuthzPolicy is a resource that allows to forward traffic to a callout backend designed to scan the traffic for security purposes.

Inheritance

object > AuthzPolicy

Namespace

Google.Cloud.NetworkSecurity.V1

Assembly

Google.Cloud.NetworkSecurity.V1.dll

Constructors

AuthzPolicy()

public AuthzPolicy()

AuthzPolicy(AuthzPolicy)

public AuthzPolicy(AuthzPolicy other)
Parameter
Name Description
other AuthzPolicy

Properties

Action

public AuthzPolicy.Types.AuthzAction Action { get; set; }

Required. Can be one of ALLOW, DENY, CUSTOM.

When the action is CUSTOM, customProvider must be specified.

When the action is ALLOW, only requests matching the policy will be allowed.

When the action is DENY, only requests matching the policy will be denied.

When a request arrives, the policies are evaluated in the following order:

  1. If there is a CUSTOM policy that matches the request, the CUSTOM policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request.

  2. If there are any DENY policies that match the request, the request is denied.

  3. If there are no ALLOW policies for the resource or if any of the ALLOW policies match the request, the request is allowed.

  4. Else the request is denied by default if none of the configured AuthzPolicies with ALLOW action match the request.

Property Value
Type Description
AuthzPolicyTypesAuthzAction

AuthzPolicyName

public AuthzPolicyName AuthzPolicyName { get; set; }

AuthzPolicyName-typed view over the Name resource name property.

Property Value
Type Description
AuthzPolicyName

CreateTime

public Timestamp CreateTime { get; set; }

Output only. The timestamp when the resource was created.

Property Value
Type Description
Timestamp

CustomProvider

public AuthzPolicy.Types.CustomProvider CustomProvider { get; set; }

Optional. Required if the action is CUSTOM. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One of cloudIap or authzExtension must be specified.

Property Value
Type Description
AuthzPolicyTypesCustomProvider

Description

public string Description { get; set; }

Optional. A human-readable description of the resource.

Property Value
Type Description
string

HttpRules

public RepeatedField<AuthzPolicy.Types.AuthzRule> HttpRules { get; }

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.

Property Value
Type Description
RepeatedFieldAuthzPolicyTypesAuthzRule

Labels

public MapField<string, string> Labels { get; }

Optional. Set of labels associated with the AuthzPolicy resource.

The format must comply with the following requirements.

Property Value
Type Description
MapFieldstringstring

Name

public string Name { get; set; }

Required. Identifier. Name of the AuthzPolicy resource in the following format: projects/{project}/locations/{location}/authzPolicies/{authz_policy}.

Property Value
Type Description
string

NetworkRules

public RepeatedField<AuthzPolicy.Types.AuthzRule> NetworkRules { get; }

Optional. A list of authorization network rules to match against the incoming request. A policy match occurs when at least one network rule matches the request. At least one network rule is required for Allow or Deny Action if no HTTP rules are provided. Network rules are mutually exclusive with HTTP rules. Limited to 5 rules.

Property Value
Type Description
RepeatedFieldAuthzPolicyTypesAuthzRule

PolicyProfile

public AuthzPolicy.Types.PolicyProfile PolicyProfile { get; set; }

Optional. Immutable. Defines the type of authorization being performed. If not specified, REQUEST_AUTHZ is applied. This field cannot be changed once AuthzPolicy is created.

Property Value
Type Description
AuthzPolicyTypesPolicyProfile

Target

public AuthzPolicy.Types.Target Target { get; set; }

Required. Specifies the set of resources to which this policy should be applied to.

Property Value
Type Description
AuthzPolicyTypesTarget

UpdateTime

public Timestamp UpdateTime { get; set; }

Output only. The timestamp when the resource was updated.

Property Value
Type Description
Timestamp