Class FirewallAction (1.21.1)

FirewallAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

An individual action. Each action represents what to do if a policy matches.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

Name Description
allow google.cloud.recaptchaenterprise_v1.types.FirewallAction.AllowAction
The user request did not match any policy and should be allowed access to the requested resource. This field is a member of oneof_ firewall_action_oneof.
block google.cloud.recaptchaenterprise_v1.types.FirewallAction.BlockAction
This action will deny access to a given page. The user will get an HTTP error code. This field is a member of oneof_ firewall_action_oneof.
include_recaptcha_script google.cloud.recaptchaenterprise_v1.types.FirewallAction.IncludeRecaptchaScriptAction
This action will inject reCAPTCHA JavaScript code into the HTML page returned by the site backend. This field is a member of oneof_ firewall_action_oneof.
redirect google.cloud.recaptchaenterprise_v1.types.FirewallAction.RedirectAction
This action will redirect the request to a ReCaptcha interstitial to attach a token. This field is a member of oneof_ firewall_action_oneof.
substitute google.cloud.recaptchaenterprise_v1.types.FirewallAction.SubstituteAction
This action will transparently serve a different page to an offending user. This field is a member of oneof_ firewall_action_oneof.
set_header google.cloud.recaptchaenterprise_v1.types.FirewallAction.SetHeaderAction
This action will set a custom header but allow the request to continue to the customer backend. This field is a member of oneof_ firewall_action_oneof.

Classes

AllowAction

AllowAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

An allow action continues processing a request unimpeded.

BlockAction

BlockAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A block action serves an HTTP error code a prevents the request from hitting the backend.

IncludeRecaptchaScriptAction

IncludeRecaptchaScriptAction(
    mapping=None, *, ignore_unknown_fields=False, **kwargs
)

An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript code into the HTML returned by the site backend. This reCAPTCHA script is tasked with collecting user signals on the requested web page, issuing tokens as a cookie within the site domain, and enabling their utilization in subsequent page requests.

RedirectAction

RedirectAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A redirect action returns a 307 (temporary redirect) response, pointing the user to a ReCaptcha interstitial page to attach a token.

SetHeaderAction

SetHeaderAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A set header action sets a header and forwards the request to the backend. This can be used to trigger custom protection implemented on the backend.

SubstituteAction

SubstituteAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A substitute action transparently serves a different page than the one requested.