Skip to main content

Overview

Many internet-facing web applications aren’t protected by a Web Application Firewall (WAF) or an IDS that inspects web payloads, so web attacks can go unnoticed. Configure your web application to feed Indicators of Compromise (IoCs) to OneFirewall automatically whenever malicious activity is detected, without deploying a separate security appliance.
  • OneFirewall aggregates IoCs from all your apps in one place for investigation.
  • No additional WAF/IDS product to deploy or manage.
  • Automated feeds speed up blocking and threat hunting.

How It Works

  1. Your web app (or its runtime/logging layer) detects suspicious activity or extracts IoCs from logs.
  2. The app sends those IoCs (IP addresses, URLs, user-agents, file hashes, etc.) to OneFirewall via a secure API.
  3. OneFirewall ingests the IoCs, enriches and correlates them, and applies blocking or alerting rules across your environment.

Prerequisites

  • An active OneFirewall account. If you don’t have one, contact [email protected].
  • An API token, generated from your OneFirewall account.

Step 1: Create an Account

  1. Go to https://app.onefirewall.com and create an account.
  2. Generate an API Token and store it securely (e.g., in a password manager or secrets vault).

Step 2: Set Environment Variables

Create or update your .env file (or environment variables for your app):
Contact the OneFirewall team to define the report-XXXXXXXX tag value. These settings control how your application submits unauthorized access attempts and anomalies to OneFirewall.

Step 3: Create Middleware

Implement middleware that intercepts all incoming requests and records any response that does not return a 200 OK status. Status codes to capture:
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • Other unexpected error codes
This ensures anomalous or suspicious activity is consistently detected and logged.

Step 4: Submit Feeds to OneFirewall

  1. Each time an anomaly is detected, add the event to your local feed queue.
  2. Once the number of queued events reaches the value defined in ONEFIREWALL_BULK, send the batch to OneFirewall using the API.
This batching approach reduces API overhead and keeps IoC reporting timely.

Code Examples

Reference implementations for capturing anomalies and submitting them to OneFirewall.

NodeJS with Express module

GoLang with Fiber module

Python3 with FastAPI