v16.0.0 v15.0.0 v14.0.0 v13.0.0

  • General
  • Commands
  • Modules

On this page:
  • ltm rule command BOTDEFENSE cookie status
  • CloudDocs Home > F5 TMSH Reference > ltm rule command BOTDEFENSE cookie status

Version notice:

ltm rule command BOTDEFENSE cookie statusΒΆ

iRule(1)						BIG-IP TMSH Manual						  iRule(1)

BOTDEFENSE::cookie_status
       Returns the status of the Bot Defense cookie.

       Note that in the previous version the returned status referred to both device_id and browser challenge. Now only the status
       of the browser cookie will be returned.

SYNOPSIS
       BOTDEFENSE::cookie_status

DESCRIPTION
       Returns the status of the Bot Defense cookie that is received on the request. The returned value is one of the following
       strings:
	   * not_received - the cookie did not appear in the request
	   * valid - the cookie is valid and not expired
	   * invalid - the cookie cannot be parsed; this could mean that it was modified by an attacker, or that it is older than
       two days, or due to a configuration change
	   * expired - the cookie is valid, but is expired
	   * valid_redirect_challenge - the cookie of the redirect was validated
	   * renewal - browser challenge answer is about to expire

       Syntax

       BOTDEFENSE::cookie_status

RETURN VALUE
       A string signifying the status of the Bot Defense cookie.

VALID DURING
       BOTDEFENSE_REQUEST, BOTDEFENSE_ACTION

EXAMPLES
	# EXAMPLE: In case of an invalid cookie, send a message to High Speed Logging
	when BOTDEFENSE_REQUEST {
	    if {[BOTDEFENSE::cookie_status] eq "invalid"} {
		HSL::send $hsl "invalid botdefense cookie from IP [IP::client_addr]"
	    }
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-12.1 --First introduced the command.

BIG-IP							    2022-04-12							  iRule(1)