Skip to main content

Scope

This page describes how to run a OneFirewall Proof of Value (PoV) in an AWS-native, SOC 2-audited environment, and how the same building blocks carry over to production. The PoV question stays the same as in the standard PoV:
Which internet sources that the OneFirewall Alliance already scores as malicious reached our exposed surfaces, through which surface, and what did our existing controls do with them?
On AWS that question has to be answered per ingress surface, because each surface sees a different client IP and writes a different log:
If an ALB is fronted by CloudFront, the ALB access log and any WAF attached to the ALB see CloudFront edge IPs, not attackers. Correlate on the CloudFront log (c-ip) or on the WebACL attached to the CloudFront distribution. The IS_CDN column of the OneFirewall feed and /info/cdn/list are used below to keep CDN edge IPs out of the attacker set.

OneFirewall API used in this page

Base URL: https://app.onefirewall.com/api/v1. All calls carry Authorization: Bearer <JWT>, generated from the profile page (see Authorization). Only outbound HTTPS 443 to this host is needed. No inbound connectivity from OneFirewall to AWS is used by any of the three methods.

Score semantics relevant to correlation

  • Range 0–1000. 0 means never observed. See Crime Score.
  • Severity bands used in PoV reports: Low 1–60, Medium 60–120, High 120–175, Critical 175–1000.
  • IPv4 scores decay over time. The decay function is returned in the header.eval field of /ips responses (score = s0 / (1 + exp((3/s0) * (t/3600 - 2.5*s0)))). The score of an IP on day 10 is therefore not the score it had when it hit you on day 1.
  • Take a dated snapshot of /flat at least daily, and join each event to the snapshot of the event’s date. Do not re-score 10 days of logs against a single end-of-PoV snapshot.
  • Enforcement guidance (not needed for a read-only PoV): start at score ≥ 400 and lower it over time. The Alliance-validated baseline is ≥ 190.

Choosing a method

Methods 1 and 2 are passive and read logs only. Method 3 places OneFirewall data inside the request path, in a non-blocking mode. Methods can be combined: Method 2 for retrospective analysis across all surfaces, and Method 3 for “what would WAF have blocked” evidence.

Prerequisite: log sources

All three methods depend on the same AWS logs. In an AWS Organizations / Control Tower setup they usually land in the Log Archive account. Enable whatever is not already on, at least 24 h before the PoV analysis window starts.
1

Build the inventory of internet-facing ENIs

The inventory maps each flow-log interface_id to a surface (direct EIP, NLB, ALB). Run it in every account and Region in scope:
Upload eni_inventory.csv to s3://<analysis-bucket>/ofa-pov/eni_inventory/. NATGW rows are kept for completeness but excluded from ingress analysis.
ENIs change when load balancers scale. Re-run the inventory daily during the PoV, or drive it from EventBridge on CreateNetworkInterface.
2

VPC Flow Logs (EIP, NLB, ALB ENIs)

Use a custom format so that direction and packet-level addresses are present, Parquet output with Hive-compatible partitions, and a 60 s aggregation interval:
  • action=REJECT means the Security Group or NACL dropped the flow. ACCEPT means it reached the ENI.
  • For an ALB ENI, ACCEPT means “TCP accepted by the ALB”. It does not mean “reached a target”, and it is still ACCEPT when WAF later returns 403. Use ALB/WAF logs for the L7 outcome.
3

ALB access logs

Enable them on each internet-facing ALB (access_logs.s3.enabled=true). Relevant fields: client:port, target:port (- when no target was selected), elb_status_code, target_status_code, request, user_agent, actions_executed (contains waf when WAF evaluated the request).
At the time of writing, ALB access log delivery supports SSE-S3 only. If your Log Archive bucket policy enforces SSE-KMS, deliver ALB logs to a dedicated SSE-S3 bucket with the same retention and access controls.
4

AWS WAF logs

Log every WebACL in scope to S3 (bucket name prefixed aws-waf-logs-) or through Firehose. Relevant fields: httpRequest.clientIp, httpRequest.country, action, terminatingRuleId, nonTerminatingMatchingRules, labels, webaclId. Do not enable a logging filter that drops ALLOW records, because the allowed requests are the point of the PoV.
5

CloudFront standard logs (if CloudFront fronts an ALB)

Required to recover the real client IP (c-ip) for CloudFront → ALB paths.

Method 1: Customer-run analysis script (read-only S3 access)

The analysis runs entirely in an environment that the customer owns and operates. OneFirewall deploys nothing and has no access to the AWS account. The customer runs a script, supplied by the OneFirewall team, that does the following:
  1. Downloads the ingress logs for the PoV window from S3 using a read-only identity.
  2. Downloads the scored feed from the OneFirewall API.
  3. Matches every inbound connection/request against the Crime Score, per surface.
  4. Writes a PDF report (executive summary + top malicious events) and a CSV of the full results, on the customer’s host.
The customer decides whether to share the PDF with OneFirewall for the readout.

Where it runs

Any host the customer controls that can assume the read-only role, for example:
  • an EC2 instance or ECS/Fargate task in a security tooling account,
  • an existing analyst jump host or workstation,
  • a CI runner in the customer’s own pipeline.

Script supply chain

The script is delivered as source code. Before running it, the customer can review it and approve it under their normal software intake process:
  • Versioned release with a published SHA-256 checksum; verify it before running.
  • No outbound destinations other than S3 and app.onefirewall.com/api/v1, which the code review can confirm.
  • No telemetry, no upload of logs or results. The only data sent to OneFirewall are authenticated GET requests for the feed, plus optional per-IP /intel/{ipv4} or /ips/{ipv4} lookups for the top-N attacker IPs used to enrich the report (country, ASN, alliance members). The enrichment lookups can be disabled.

Read-only IAM role

Attach to the role that the analysis host assumes. Read-only on the log prefixes, plus KMS decrypt if the buckets use SSE-KMS:
If the logs live in a separate Log Archive account, the bucket policy and KMS key policy there must also name this role as principal. ec2:DescribeNetworkInterfaces is only needed if the script builds the ENI inventory itself. Otherwise, provide eni_inventory.csv from the prerequisite step. More authentication options (IAM Roles Anywhere for non-AWS hosts) are in S3 Log Processing.

Running it

The exact command-line interface ships with the script’s README. The example below shows the inputs it needs:
pov-config.yaml
Score at time of event. Crime Scores decay, so scoring 10-day-old logs against a single feed snapshot taken at the end of the window under-reports actors that were active early on. Take a daily feed snapshot during the window (cron or EventBridge on the same host, or the feed snapshot Lambda from Method 2) and point the script at the snapshot directory, so that each event is matched against the snapshot of its own day. If only one end-of-window snapshot exists, the report says so in its methodology section.

Processing logic

Per log record, the script:
  1. Normalises to (ts, client_ip, surface, resource, edge_action, dst_port, http_status, reached_backend). Surfaces are EIP_DIRECT, NLB and ALB (L4, from flow logs plus the ENI inventory), ALB_L7, WAF and CLOUDFRONT. Only flow_direction = ingress is kept.
  2. Drops well-known CDN edge IPs (IS_CDN in the feed, /info/cdn/list). For CloudFront-fronted ALBs, it uses c-ip from CloudFront logs as the client.
  3. Joins client_ip to the feed snapshot of the event’s day. Severity bands: Low 1–60, Medium 60–120, High 120–175, Critical 175–1000.
  4. Aggregates per actor, surface and severity, and flags allowed events (ACCEPT, WAF ALLOW/COUNT, ALB forwarded to a target).
The logic is the same as the Athena queries in Method 2, so the two methods give comparable numbers.

PDF report contents

Executive summary (one page): Top malicious events (the top N by score, then by event count): Appendix: methodology, log sources and record counts per source, feed snapshot dates, script version and checksum. The CSV contains every malicious event, not only the top N, for import into the SIEM or for the auditor’s evidence folder.

Method 2: OneFirewall feed in your own data lake (zero footprint)

Nothing from OneFirewall runs in the account and nobody from OneFirewall has access. A scheduled Lambda pulls a dated snapshot of the scored feed into S3, and the correlation is a set of Athena queries over logs you already keep. This method is the easiest one to clear with a SOC 2 change board and vendor-risk review, and it is fully reproducible by your own auditors.

2.1 Feed snapshot Lambda

Runtime Python 3.12, scheduled daily or hourly by EventBridge Scheduler. The token is stored in Secrets Manager.
ofa_feed_snapshot.py
Lambda execution role: secretsmanager:GetSecretValue on the one secret, s3:PutObject on the feed prefix, kms:GenerateDataKey on the bucket key. The function needs egress (a VPC with NAT/proxy allow-listing app.onefirewall.com, or no VPC).

2.2 Athena tables

Load partitions with MSCK REPAIR TABLE (or partition projection). For ALB logs use the alb_access_logs DDL from the AWS documentation (“Querying Application Load Balancer logs”). For WAF logs use the waf_logs DDL from “Querying AWS WAF logs”. The queries below use those AWS column names (client_ip, target_ip, elb_status_code, httprequest.clientip, labels, …).

2.3 Normalised ingress view

The ALB access log carries no listener-port column. Derive it from the request URL if you need it. If an ALB is behind CloudFront, filter out its ALB_L7 rows whose client_ip falls in the CloudFront ranges (is_cdn in the feed, or /info/cdn/list) and add a CloudFront branch on c-ip instead.

2.4 Correlation

Join each event to the feed snapshot of the same day, excluding well-known CDN edges:
Q1: exposure summary per surface and severity
Q2: allowed malicious actors (the PoV CSV)
Q3: multi-surface actors and WAF bypass. These are actors scored High/Critical that reached an L4 surface (EIP_DIRECT, NLB, or the ALB directly) of an application that is supposed to be reachable only through CloudFront + WAF. A non-empty result usually means the origin is exposed: the Security Group of the ALB or instance is not restricted to the CloudFront origin-facing managed prefix list.
Q4: WAF effectiveness gap. These are Critical actors that the existing WebACL allowed:
For the top N actors in Q2–Q4, add context to the report with GET /intel/{ipv4} (reports, members, MITRE). This sends only the attacker IP to OneFirewall, never your log content.

Method 3: AWS WAF / Network Firewall in shadow mode

Method 3 pushes the scored feed into native AWS enforcement objects with a non-blocking action. Every request from a scored IP is labelled and counted, and the WAF log records what the WebACL actually decided. The PoV metric is “requests from Critical/High actors that your current WebACL allowed”. The production change is a single action flip.

3.1 HTTP surfaces: AWS WAF IP sets + COUNT rules

Create one IP set per severity band (REGIONAL scope for ALB / API Gateway, CLOUDFRONT scope in us-east-1 for distributions):
Add rules at the lowest priority numbers in each WebACL, so they are evaluated before any terminating rule. Count is non-terminating: evaluation continues, and the final decision of your existing rules is still logged.
Repeat with ofa-high / ofa:high at priority 1. Each IP-set reference rule costs 1 WCU.
Use IPSetForwardedIPConfig (X-Forwarded-For) only on a WebACL attached to an ALB whose Security Group accepts traffic from the CloudFront origin-facing prefix list only. Otherwise the header can be forged by the client. The preferred setup is to attach the OneFirewall rules to the CloudFront-scope WebACL, where clientIp is the real client.

3.2 IP set sync Lambda

AWS WAF IP sets hold at most 10,000 addresses each. The sync takes the scored CSV, buckets it by severity, caps each band at the highest-scored 10,000 entries, and updates the sets with optimistic locking.
ofa_waf_sync.py
Run it hourly. Execution role: wafv2:GetIPSet and wafv2:UpdateIPSet on the two IP set ARNs only, plus the secret. UpdateIPSet calls are recorded in CloudTrail, which is the change evidence for auditors.

3.3 Reading the result

Query the WAF logs (AWS waf_logs DDL) for labelled requests and the final action taken by your existing rules:
final_action = ALLOW rows are the gap that OneFirewall would close. Rows with BLOCK by a managed rule group show where the existing controls and the Alliance agree. To move to enforcement, change "Count": {} to "Block": {} for the band, following the threshold calibration in Crime Score.

3.4 Non-HTTP surfaces: direct EIP and NLB

AWS WAF cannot be attached to an EC2 ENI or an NLB, and the native per-VPC primitives cannot hold a deny list of this size: If Network Firewall is already deployed, add a stateful rule group in shadow mode:
Populate $OFA_CRITICAL / $OFA_HIGH with the same sync Lambda (network-firewall:UpdateRuleGroup, or ec2:ModifyManagedPrefixList if you use IP set references). Check the Network Firewall quotas for rule group capacity and IP set reference size before choosing the list size. If Network Firewall is not in the ingress path, do not introduce it for a PoV. Direct EIP and NLB exposure is already fully measured by Method 1 or 2 from VPC Flow Logs, and enforcement can be designed after the readout.

SOC 2 control mapping


PoV runbook (10-day analysis window)

1

Day -3 to 0: scoping

Agree on the accounts/Regions and the list of internet-facing resources (ENI inventory), choose Method 1, 2 or 3 (or a combination), confirm that the log sources are enabled, raise the change ticket, and issue the OneFirewall API token (Method 2/3) and, for Method 1, obtain the script release and checksum from the OneFirewall team and pass it through software intake.
2

Day 0: deploy

Apply the IaC. Validate with curl -s https://app.onefirewall.com/api/v1/version from the analysis host / Lambda subnet, a first feed snapshot, and a first non-empty result (a Method 1 dry run over one day, or the ingress_events query for Method 2).
3

Day 1–10: collect

Daily: feed snapshot, ENI inventory refresh, sanity check of Q1 (Method 2). Method 1: run the script once at the end of the window, using the daily snapshots. Method 3: hourly IP set sync. Nothing is blocked.
4

Day 11: readout

Deliverables: the Method 1 PDF report and/or per-surface/per-severity summary (Q1), CSV of allowed malicious actors with score, severity, ASN, surfaces and backend reach (Q2), origin-bypass findings (Q3), WAF gap (Q4 / 3.3), /intel context for the top actors, and an enforcement plan per surface with a starting threshold.
5

Close

Revoke the token, delete the local log copies and the read-only role if it was created for the PoV, let lifecycle rules expire the PoV data or retain it as audit evidence, and remove the WAF COUNT rules or keep them as the pre-production baseline.

Standard PoV

On-prem/private cloud PoV with syslog ingestion.

S3 Log Processing

Authentication patterns for the AWS OFA Log Adapter.

Crime Score

Score model and enforcement thresholds.