WAF baseline guidelines

Request requirements, security checks and what to send support when an API request is blocked.

These guidelines apply to all API requests. A web application firewall (WAF) checks requests for potentially unsafe content and can reject them with 403 Forbidden.

Request requirements

RequirementWhat to sendIf not met
Request bodyNo larger than 25 MB403 Forbidden
URL query stringNo longer than 2,048 bytes403 Forbidden
URL pathNo longer than 1,024 bytes403 Forbidden
Cookie headerNo larger than 10,240 bytes403 Forbidden
User-AgentA User-Agent header identifying your application or HTTP client403 Forbidden when the header is missing
API specificationThe documented endpoint, HTTP method, headers, parameters and body structureAn error response; check the endpoint’s error reference

Size limits are measured in bytes, not characters. The body limit applies to the complete request body, not to each invoice in a batch. Endpoint-specific format requirements still apply: see the Unify XML request requirements.

User-Agent header

Most standard HTTP clients send this header by default. Check that your custom client sends it and that any proxy you use preserves it. Use an application name and version, such as Acme-Invoice-Integration/1.0.

Send an explicit User-Agentbash
curl 'https://prod.gets.complyance.io/v3/connect/companies?limit=20' \
  --header "X-API-Key: ${COMPLYANCE_API_KEY}" \
  --header 'Accept: application/json' \
  --header 'User-Agent: Acme-Invoice-Integration/1.0'

The User-Agent header does not replace your API key. Use the authentication header required by the endpoint.

Baseline security checks

The baseline contains 33 blocking rules across core checks, administrative path protection and known bad inputs. Each row below represents one rule. Passing these checks does not guarantee that the API accepts the request.

Core checks

CheckRequest partWhat triggers a block
Missing User-AgentUser-Agent headerThe header is missing.
Scanner identificationUser-Agent headerThe value identifies a known malicious bot or vulnerability scanner.
Query string sizeURL query stringThe query string limit is exceeded.
Cookie sizeCookie headerThe cookie header limit is exceeded.
Body sizeBodyThe body limit is exceeded.
Path sizeURL pathThe path limit is exceeded.
Private metadata accessBodyA pattern indicates an attempt to access private service metadata.
Private metadata accessCookiesA pattern indicates an attempt to access private service metadata.
Private metadata accessURL pathA pattern indicates an attempt to access private service metadata.
Private metadata accessQuery parametersA pattern indicates an attempt to access private service metadata.
Local file inclusionQuery parametersA pattern indicates directory traversal or an attempt to read local files.
Local file inclusionURL pathA pattern indicates directory traversal or an attempt to read local files.
Local file inclusionBodyA pattern indicates directory traversal or an attempt to read local files.
Restricted file extensionsURL pathA system-file extension indicates a file that is unsafe to read or run.
Restricted file extensionsQuery parametersA system-file extension indicates a file that is unsafe to read or run.
Remote file inclusionQuery parametersA URL with an IPv4-address host resembles an attempt to load a remote file.
Remote file inclusionBodyA URL with an IPv4-address host resembles an attempt to load a remote file.
Remote file inclusionURL pathA URL with an IPv4-address host resembles an attempt to load a remote file.
Cross-site scripting (XSS)CookiesContent matches a script-injection pattern.
Cross-site scripting (XSS)Query parametersContent matches a script-injection pattern.
Cross-site scripting (XSS)BodyContent matches a script-injection pattern.
Cross-site scripting (XSS)URL pathContent matches a script-injection pattern.

Administrative path protection

CheckRequest partWhat triggers a block
Administrative pathsURL pathThe path resembles a server or application administration page.

Known bad inputs

Remote code execution (RCE) means an attempt to make a server run an attacker’s code. These checks match known exploit patterns, not every mention of the named software.

CheckRequest partWhat triggers a block
Java deserialization RCEHeader names and valuesA pattern indicates a Java deserialization or Spring RCE exploit.
Java deserialization RCEBodyA pattern indicates a Java deserialization or Spring RCE exploit.
Java deserialization RCEURL pathA pattern indicates a Java deserialization or Spring RCE exploit.
Java deserialization RCEURL query stringA pattern indicates a Java deserialization or Spring RCE exploit.
Local hostHost headerThe host points to the local machine rather than the published API host.
PROPFIND methodHTTP methodThe request uses PROPFIND.
Exploitable pathsURL pathThe path matches a known exploitable web application path.
Log4j RCEHeader names and valuesA pattern indicates a Log4j RCE exploit.
Log4j RCEURL query stringA pattern indicates a Log4j RCE exploit.
React RCEBodyA pattern indicates the React vulnerability CVE-2025-55182.

Use the published API host, documented paths and the method specified for the operation. Identify your application accurately. Send URLs only in fields that accept them, and omit unrelated cookies and executable script content. If legitimate invoice data is blocked, ask support to review it.

A valid API key and a body below the maximum size do not guarantee acceptance. Follow the endpoint’s request specification as well as these guidelines. Do not encode or alter legitimate invoice values to try to bypass a security check.

Report a blocked request

A 403 Forbidden or Access Denied response does not always indicate an API key problem. Check the request requirements above and any permissions or environment error described in authentication failures.

For a blocked request, contact support@complyance.io with:

  • API endpoint: the URL and path, with sensitive query values removed.
  • Request timestamp: the date and time, including the time zone; use UTC if possible.
  • HTTP method: for example, POST or GET.
  • Response details: the HTTP status, response body and relevant response headers. Include a request identifier if one is present.

Remove API keys, authorization headers, cookies, signing secrets and customer data before sharing diagnostics. Do not assume a blocked response uses the endpoint’s usual JSON error format; check its status and Content-Type before parsing it.

Last updated