- Home
- Documentation
- Security
- Data Sources
- xcsh_app_firewall (Data Source)
xcsh_app_firewall (Data Source)
Retrieves information about Application Firewall in F5 Distributed Cloud. This is a read-only data source.
~> Note: For more information, see the App Firewall API documentation.
Example Usage
Section titled “Example Usage”# AppFirewall Data Source Example
terraform { required_version = ">= 1.0"
required_providers { xcsh = { source = "f5-sales-demo/xcsh" version = ">= 0.1.0" } }}
# Look up an existing AppFirewall by namedata "xcsh_app_firewall" "example" { name = "example-app-firewall" namespace = "staging"}
output "app_firewall_id" { value = data.xcsh_app_firewall.example.id}Argument Reference
Section titled “Argument Reference”-> Syntax Rule: This provider uses OneOf groups for mutually exclusive options. Fields documented as “Optional Block” use block syntax field_name { ... }. Empty OneOf object attributes use field_name = {}; conditional selection uses condition ? {} : null. Boolean attributes (such as add_hsts and http_redirect) use = true or = false.
🔶 High Risk Operations — Some operations on this resource have high danger level. Destructive operations may require confirmation.
Minimum Configuration
Section titled “Minimum Configuration”Required fields:
namenamespace
Example (API format):
apiVersion: v1kind: app_firewallmetadata: name: default-waf namespace: demo-appspec: blocking: {}Metadata Argument Reference
Section titled “Metadata Argument Reference”• name - Required String
Name of the AppFirewall
• namespace - Required String
Namespace where the AppFirewall exists
Attributes Reference
Section titled “Attributes Reference”In addition to all arguments above, the following attributes are exported:
• allow_all_response_codes - Optional Object Defaults to map[]
Configuration parameter for allow all response codes. Server applies default when omitted
• allowed_response_codes - Optional String
List of HTTP response status codes that are allowed
• annotations - Optional Map
Annotations applied to this resource
• blocking - Optional Object
Enable this option
• blocking_page - Optional String
Custom Blocking Response Page. Custom blocking response page body
• bot_protection_setting - Optional String
Configuration parameter for bot protection setting
• custom_anonymization - Optional String
Anonymization settings which is a list of HTTP headers, parameters and cookies
• default_anonymization - Optional Object Defaults to map[]
Configuration parameter for default anonymization. Server applies default when omitted
• default_bot_setting - Optional Object Defaults to map[]
Configuration parameter for default bot setting. Server applies default when omitted
• default_detection_settings - Optional Object Defaults to map[]
Configuration parameter for default detection settings. Server applies default when omitted
• description - Optional String
Description of the AppFirewall
• detection_settings - Optional String
Specifies detection settings to be used by WAF
• disable_ai_enhancements - Optional Object Defaults to map[]
Configuration parameter for disable ai enhancements. Server applies default when omitted
• disable_anonymization - Optional Object
Configuration parameter for disable anonymization
• enable_ai_enhancements - Optional String
Actions complimented by the additional intelligence of the F5 AI Powered Risk-based analysis
• id - Optional String
Unique identifier for the resource
• labels - Optional Map
Labels applied to this resource
• monitoring - Optional Object Defaults to map[]
Enable this option. Server applies default when omitted
• use_default_blocking_page - Optional Object Defaults to map[]
Enable this option. Server applies default when omitted
• response_code - Optional List
List of HTTP response status codes that are allowed
Blocking
Section titled “Blocking”A blocking block supports the following:
Blocking Page
Section titled “Blocking Page”A blocking_page block supports the following:
• blocking_page - Optional String
Define the content of the response page (e.g., an HTML document or a JSON object), use the {{request_id}} placeholder to provide users with a unique identifier to be able to trace the blocked request in the logs. The maximum allowed size of response body is 4096 bytes
after base64 encoding
• response_code - Optional String Defaults to EmptyStatusCode
Possible values are EmptyStatusCode, Continue, OK, Created, Accepted, NonAuthoritativeInformation, NoContent, ResetContent, PartialContent, MultiStatus, AlreadyReported, IMUsed, MultipleChoices,
MovedPermanently, Found, SeeOther, NotModified, UseProxy, TemporaryRedirect, PermanentRedirect, BadRequest, Unauthorized, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NotAcceptable, ProxyAuthenticationRequired, RequestTimeout, Conflict, Gone, LengthRequired, PreconditionFailed, PayloadTooLarge, URITooLong, UnsupportedMediaType,
RangeNotSatisfiable, ExpectationFailed, MisdirectedRequest, UnprocessableEntity, Locked, FailedDependency, UpgradeRequired, PreconditionRequired, TooManyRequests, RequestHeaderFieldsTooLarge, InternalServerError, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout, HTTPVersionNotSupported, VariantAlsoNegotiates, InsufficientStorage, LoopDetected,
NotExtended, NetworkAuthenticationRequired
[Enum:
EmptyStatusCode|Continue|OK|Created|Accepted|NonAuthoritativeInformation|NoContent|ResetContent|PartialContent|MultiStatus|AlreadyReported|IMUsed|MultipleChoices|MovedPermanently|Found|SeeOther|NotModified|UseProxy|TemporaryRedirect|PermanentRedirect|BadRequest|Unauthorized|PaymentRequired|Forbidden|NotFound|MethodNotAllowed|NotAcceptable|ProxyAuthenticationRequired|RequestTimeout|Conflict|Gone|LengthRequired|PreconditionFailed|PayloadTooLarge|URITooLong|UnsupportedMediaType|RangeNotSatisfiable|ExpectationFailed|MisdirectedRequest|UnprocessableEntity|Locked|FailedDependency|UpgradeRequired|PreconditionRequired|TooManyRequests|RequestHeaderFieldsTooLarge|InternalServerError|NotImplemented|BadGateway|ServiceUnavailable|GatewayTimeout|HTTPVersionNotSupported|VariantAlsoNegotiates|InsufficientStorage|LoopDetected|NotExtended|NetworkAuthenticationRequired]
HTTP response status codes EmptyStatusCode response codes means it is not specified Continue status code OK status code Created status code Accepted status code Non Authoritative Information status code No Content status code Reset Content status code Partial Content status code Multi Status
Bot Protection Setting
Section titled “Bot Protection Setting”A bot_protection_setting block supports the following:
• good_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection
• malicious_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection
• suspicious_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection
Custom Anonymization
Section titled “Custom Anonymization”A custom_anonymization block supports the following:
• anonymization_config - Optional List
List of HTTP headers, cookies and query parameters whose values will be masked
Custom Anonymization Anonymization Config
Section titled “Custom Anonymization Anonymization Config”An anonymization_config block (within custom_anonymization) supports the following:
• cookie - Optional String
Configure anonymization for HTTP Cookies
• http_header - Optional String
Configure anonymization for HTTP Headers
• query_parameter - Optional String
Configure anonymization for HTTP Parameters
Custom Anonymization Anonymization Config Cookie
Section titled “Custom Anonymization Anonymization Config Cookie”A cookie block (within custom_anonymization.anonymization_config) supports the following:
• cookie_name - Optional String
Masks the cookie value. The setting does not mask the cookie name. Wildcard matching can be used by prefixing or suffixing the cookie name with a wildcard asterisk (*), or by using only an asterisk to match any cookie name
Custom Anonymization Anonymization Config HTTP Header
Section titled “Custom Anonymization Anonymization Config HTTP Header”A http_header block (within custom_anonymization.anonymization_config) supports the following:
• header_name - Optional String
Masks the HTTP header value. The setting does not mask the HTTP header name. Wildcard matching can be used by prefixing or suffixing the HTTP header name with a wildcard asterisk (*), or by using only an asterisk to match any HTTP header name
Custom Anonymization Anonymization Config Query Parameter
Section titled “Custom Anonymization Anonymization Config Query Parameter”A query_parameter block (within custom_anonymization.anonymization_config) supports the following:
• query_param_name - Optional String
Masks the query parameter value. The setting does not mask the query parameter name. Wildcard matching can be used by prefixing or suffixing the query parameter name with a wildcard asterisk (*), or by using only an asterisk to match any query parameter name
Default Anonymization
Section titled “Default Anonymization”A default_anonymization block supports the following:
Default Bot Setting
Section titled “Default Bot Setting”A default_bot_setting block supports the following:
Default Detection Settings
Section titled “Default Detection Settings”A default_detection_settings block supports the following:
Detection Settings
Section titled “Detection Settings”A detection_settings block supports the following:
• bot_protection_setting - Optional String
Configuration parameter for bot protection setting
• default_bot_setting - Optional Object
Configuration parameter for default bot setting
• default_violation_settings - Optional Object
Configuration parameter for default violation settings
• disable_staging - Optional Object
Enable this option
• disable_suppression - Optional Object
Configuration parameter for disable suppression
• disable_threat_campaigns - Optional Object
Enable this option
• enable_suppression - Optional Object
Configuration parameter for enable suppression
• enable_threat_campaigns - Optional Object
Enable this option
• signature_selection_setting - Optional String
Attack Signatures are patterns that identify attacks on a web application and its components
• stage_new_and_updated_signatures - Optional String
Attack Signatures staging configuration
• stage_new_signatures - Optional String
Attack Signatures staging configuration
• violation_settings - Optional String
Specifies violation settings to be used by WAF
• violations_view - Optional List
List of violation checks that are performed on HTTP request to ensure the requests are properly formatted, detection of evasion techniques and other violations
Detection Settings Bot Protection Setting
Section titled “Detection Settings Bot Protection Setting”A bot_protection_setting block (within detection_settings) supports the following:
• good_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection
• malicious_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection
• suspicious_bot_action - Optional String Defaults to BLOCK
Possible values are BLOCK, REPORT, IGNORE
[Enum: BLOCK|REPORT|IGNORE] Action to be performed on the request Log and block Log only Disable detection
Detection Settings Default Bot Setting
Section titled “Detection Settings Default Bot Setting”A default_bot_setting block (within detection_settings) supports the following:
Detection Settings Default Violation Settings
Section titled “Detection Settings Default Violation Settings”A default_violation_settings block (within detection_settings) supports the following:
Detection Settings Disable Staging
Section titled “Detection Settings Disable Staging”A disable_staging block (within detection_settings) supports the following:
Detection Settings Disable Suppression
Section titled “Detection Settings Disable Suppression”A disable_suppression block (within detection_settings) supports the following:
Detection Settings Disable Threat Campaigns
Section titled “Detection Settings Disable Threat Campaigns”A disable_threat_campaigns block (within detection_settings) supports the following:
Detection Settings Enable Suppression
Section titled “Detection Settings Enable Suppression”An enable_suppression block (within detection_settings) supports the following:
Detection Settings Enable Threat Campaigns
Section titled “Detection Settings Enable Threat Campaigns”An enable_threat_campaigns block (within detection_settings) supports the following:
Detection Settings Signature Selection Setting
Section titled “Detection Settings Signature Selection Setting”A signature_selection_setting block (within detection_settings) supports the following:
• attack_type_settings - Optional String
Specifies attack-type settings to be used by WAF
• default_attack_type_settings - Optional Object
Configuration parameter for default attack type settings
• high_medium_accuracy_signatures - Optional Object
Configuration parameter for high medium accuracy signatures
• high_medium_low_accuracy_signatures - Optional Object
Configuration parameter for high medium low accuracy signatures
• only_high_accuracy_signatures - Optional Object
Configuration parameter for only high accuracy signatures
Detection Settings Signature Selection Setting Attack Type Settings
Section titled “Detection Settings Signature Selection Setting Attack Type Settings”Deeply nested Settings block collapsed for readability.
Detection Settings Signature Selection Setting Default Attack Type Settings
Section titled “Detection Settings Signature Selection Setting Default Attack Type Settings”Deeply nested Settings block collapsed for readability.
Detection Settings Signature Selection Setting High Medium Accuracy Signatures
Section titled “Detection Settings Signature Selection Setting High Medium Accuracy Signatures”Deeply nested Signatures block collapsed for readability.
Detection Settings Signature Selection Setting High Medium Low Accuracy Signatures
Section titled “Detection Settings Signature Selection Setting High Medium Low Accuracy Signatures”Deeply nested Signatures block collapsed for readability.
Detection Settings Signature Selection Setting Only High Accuracy Signatures
Section titled “Detection Settings Signature Selection Setting Only High Accuracy Signatures”Deeply nested Signatures block collapsed for readability.
Detection Settings Stage New And Updated Signatures
Section titled “Detection Settings Stage New And Updated Signatures”A stage_new_and_updated_signatures block (within detection_settings) supports the following:
• staging_period - Optional Number
Define staging period in days. The default staging period is 7 days and the max supported staging period is 20 days
Detection Settings Stage New Signatures
Section titled “Detection Settings Stage New Signatures”A stage_new_signatures block (within detection_settings) supports the following:
• staging_period - Optional Number
Define staging period in days. The default staging period is 7 days and the max supported staging period is 20 days
Detection Settings Violation Settings
Section titled “Detection Settings Violation Settings”A violation_settings block (within detection_settings) supports the following:
• disabled_violation_types - Optional List Defaults to VIOL_NONE
Possible values are VIOL_NONE, VIOL_FILETYPE, VIOL_METHOD, VIOL_MANDATORY_HEADER, VIOL_HTTP_RESPONSE_STATUS, VIOL_REQUEST_MAX_LENGTH, VIOL_FILE_UPLOAD, VIOL_FILE_UPLOAD_IN_BODY, VIOL_XML_MALFORMED, VIOL_JSON_MALFORMED, VIOL_ASM_COOKIE_MODIFIED,
VIOL_HTTP_PROTOCOL_MULTIPLE_HOST_HEADERS, VIOL_HTTP_PROTOCOL_BAD_HOST_HEADER_VALUE, VIOL_HTTP_PROTOCOL_UNPARSABLE_REQUEST_CONTENT, VIOL_HTTP_PROTOCOL_NULL_IN_REQUEST, VIOL_HTTP_PROTOCOL_BAD_HTTP_VERSION, VIOL_HTTP_PROTOCOL_SEVERAL_CONTENT_LENGTH_HEADERS, VIOL_EVASION_DIRECTORY_TRAVERSALS, VIOL_MALFORMED_REQUEST, VIOL_EVASION_MULTIPLE_DECODING, VIOL_DATA_GUARD,
VIOL_EVASION_APACHE_WHITESPACE, VIOL_COOKIE_MODIFIED, VIOL_EVASION_IIS_UNICODE_CODEPOINTS, VIOL_EVASION_IIS_BACKSLASHES, VIOL_EVASION_PERCENT_U_DECODING, VIOL_EVASION_BARE_BYTE_DECODING, VIOL_EVASION_BAD_UNESCAPE, VIOL_HTTP_PROTOCOL_BODY_IN_GET_OR_HEAD_REQUEST, VIOL_ENCODING, VIOL_COOKIE_MALFORMED, VIOL_GRAPHQL_FORMAT, VIOL_GRAPHQL_MALFORMED,
VIOL_GRAPHQL_INTROSPECTION_QUERY
[Enum:
VIOL_NONE|VIOL_FILETYPE|VIOL_METHOD|VIOL_MANDATORY_HEADER|VIOL_HTTP_RESPONSE_STATUS|VIOL_REQUEST_MAX_LENGTH|VIOL_FILE_UPLOAD|VIOL_FILE_UPLOAD_IN_BODY|VIOL_XML_MALFORMED|VIOL_JSON_MALFORMED|VIOL_ASM_COOKIE_MODIFIED|VIOL_HTTP_PROTOCOL_MULTIPLE_HOST_HEADERS|VIOL_HTTP_PROTOCOL_BAD_HOST_HEADER_VALUE|VIOL_HTTP_PROTOCOL_UNPARSABLE_REQUEST_CONTENT|VIOL_HTTP_PROTOCOL_NULL_IN_REQUEST|VIOL_HTTP_PROTOCOL_BAD_HTTP_VERSION|VIOL_HTTP_PROTOCOL_SEVERAL_CONTENT_LENGTH_HEADERS|VIOL_EVASION_DIRECTORY_TRAVERSALS|VIOL_MALFORMED_REQUEST|VIOL_EVASION_MULTIPLE_DECODING|VIOL_DATA_GUARD|VIOL_EVASION_APACHE_WHITESPACE|VIOL_COOKIE_MODIFIED|VIOL_EVASION_IIS_UNICODE_CODEPOINTS|VIOL_EVASION_IIS_BACKSLASHES|VIOL_EVASION_PERCENT_U_DECODING|VIOL_EVASION_BARE_BYTE_DECODING|VIOL_EVASION_BAD_UNESCAPE|VIOL_HTTP_PROTOCOL_BODY_IN_GET_OR_HEAD_REQUEST|VIOL_ENCODING|VIOL_COOKIE_MALFORMED|VIOL_GRAPHQL_FORMAT|VIOL_GRAPHQL_MALFORMED|VIOL_GRAPHQL_INTROSPECTION_QUERY]
Disabled Violations. List of violations to be excluded
Detection Settings Violations View
Section titled “Detection Settings Violations View”A violations_view block (within detection_settings) supports the following:
• description_spec - Optional String
Description. Human-readable description text
• enabled - Optional Bool
State. Enable or disable the feature
• enabled_by_default - Optional String
Violations that are enabled by default by F5 are advisable to leave enabled
• name - Optional String
Name. Human-readable name for the resource
• title - Optional String
Title. Human-readable title for the resource
Disable Ai Enhancements
Section titled “Disable Ai Enhancements”A disable_ai_enhancements block supports the following:
Disable Anonymization
Section titled “Disable Anonymization”A disable_anonymization block supports the following:
Enable Ai Enhancements
Section titled “Enable Ai Enhancements”An enable_ai_enhancements block supports the following:
• mitigate_high_medium_risk_action - Optional Object
Enable this option
• mitigate_high_risk_action - Optional Object
Enable this option
Enable Ai Enhancements Mitigate High Medium Risk Action
Section titled “Enable Ai Enhancements Mitigate High Medium Risk Action”Deeply nested Action block collapsed for readability.
Enable Ai Enhancements Mitigate High Risk Action
Section titled “Enable Ai Enhancements Mitigate High Risk Action”A mitigate_high_risk_action block (within enable_ai_enhancements) supports the following:
Common Types
Section titled “Common Types”The following type definitions are used throughout this resource. See the full definition here rather than repeated inline.
Object Reference {#common-object-reference}
Section titled “Object Reference {#common-object-reference}”Object references establish a direct reference from one configuration object to another in F5 Distributed Cloud. References use the format tenant/namespace/name.
| Field | Type | Description |
|---|---|---|
name | String | Name of the referenced object |
namespace | String | Namespace containing the referenced object |
tenant | String | Tenant of the referenced object (system-managed) |
Transformers {#common-transformers}
Section titled “Transformers {#common-transformers}”Transformers apply transformations to input values before matching. Multiple transformers can be applied in order.
| Value | Description |
|---|---|
LOWER_CASE | Convert to lowercase |
UPPER_CASE | Convert to uppercase |
BASE64_DECODE | Decodebase64 content |
NORMALIZE_PATH | Normalize URL path |
REMOVE_WHITESPACE | Remove whitespace characters |
URL_DECODE | Decode URL-encoded characters |
TRIM_LEFT | Trim leading whitespace |
TRIM_RIGHT | Trim trailing whitespace |
TRIM | Trim both leading and trailing whitespace |
HTTP Methods {#common-http-methods}
Section titled “HTTP Methods {#common-http-methods}”HTTP methods used for request matching.
| Value | Description |
|---|---|
ANY | Match any HTTP method |
GET | HTTP GET request |
HEAD | HTTP HEAD request |
POST | HTTP POST request |
PUT | HTTP PUT request |
DELETE | HTTP DELETE request |
CONNECT | HTTP CONNECT request |
OPTIONS | HTTP OPTIONS request |
TRACE | HTTP TRACE request |
PATCH | HTTP PATCH request |
COPY | HTTP COPY request (WebDAV) |
TLS Fingerprints {#common-tls-fingerprints}
Section titled “TLS Fingerprints {#common-tls-fingerprints}”TLS fingerprint categories for malicious client detection.
| Value | Description |
|---|---|
TLS_FINGERPRINT_NONE | No fingerprint matching |
ANY_MALICIOUS_FINGERPRINT | Match any known malicious fingerprint |
ADWARE | Adware-associated fingerprints |
DRIDEX | Dridex malware fingerprints |
GOOTKIT | Gootkit malware fingerprints |
RANSOMWARE | Ransomware-associated fingerprints |
TRICKBOT | Trickbot malware fingerprints |
IP Threat Categories {#common-ip-threat-categories}
Section titled “IP Threat Categories {#common-ip-threat-categories}”IP address threat categories for security filtering.
| Value | Description |
|---|---|
SPAM_SOURCES | Known spam sources |
WINDOWS_EXPLOITS | Windows exploit sources |
WEB_ATTACKS | Web attack sources |
BOTNETS | Known botnet IPs |
SCANNERS | Network scanner IPs |
REPUTATION | Poor reputation IPs |
PHISHING | Phishing-related IPs |
PROXY | Anonymous proxy IPs |
MOBILE_THREATS | Mobile threat sources |
TOR_PROXY | Tor exit nodes |
DENIAL_OF_SERVICE | DoS attack sources |
NETWORK | Known bad network ranges |