The split (#165): the one process is replaced by two commands of one binary.
smallwebwaf rproxy, in front of each app, asks servewaf about each request, relays any refusal, and passes the request to the app on its own when servewaf cannot be reached, does not answer or is too slow. Only GET, HEAD, POST, OPTIONS, PUT, DELETE, PATCH and QUERY pass.
smallwebwaf servewaf runs the checks for any number of rproxies, with one table of clients and bans, and answers well within rproxy's time limit, refusing more than 50 cookies or 100 header fields before the Core Rule Set.
The image runs rproxy by default, and servewaf with SMALLWEBWAF_COMMAND=servewaf.
New default request limits per client, for programmatic API use: 500 a minute, 20,000 an hour and 300,000 a day (#176).
SWWAF_LOOKUP_TIMEOUT at 800 ms, down from 1 s; byte limits of 4 GiB a minute, 20 GiB an hour and 200 GiB a day; SWRP_MAX_RESPONSE_SIZE at 1 GiB (#161).
To know before deploying:
A deployment needs a servewaf container, which the rproxies of any number of apps can share. The size, time, upstream and trusted-proxy settings are now SWRP_ settings of rproxy; "Where earlier settings went" in docs/settings.md lists them, since the old names are ignored without an error.
A client over 500 requests a minute, 20,000 an hour or 300,000 a day is banned; an address busier than that, such as several CI runners, belongs in SWWAF_RATE_LIMIT_EXEMPT_NETS.
Partially verified: the image checks (make example-app, make gitea-requests) have not run on the split, since Ubuntu's snapshot service has failed every image build since this morning.
Next to land on next, each as it passes review: the gitea setup (#178), and renaming internal/proxy (#173).
Model: opus-5-5
What `next` has that `main` lacks:
- The split (https://git.eeqj.de/sneak/smallwebwaf/issues/165): the one process is replaced by two commands of one binary.
- `smallwebwaf rproxy`, in front of each app, asks servewaf about each request, relays any refusal, and passes the request to the app on its own when servewaf cannot be reached, does not answer or is too slow. Only `GET`, `HEAD`, `POST`, `OPTIONS`, `PUT`, `DELETE`, `PATCH` and `QUERY` pass.
- `smallwebwaf servewaf` runs the checks for any number of rproxies, with one table of clients and bans, and answers well within rproxy's time limit, refusing more than 50 cookies or 100 header fields before the Core Rule Set.
- The image runs `rproxy` by default, and `servewaf` with `SMALLWEBWAF_COMMAND=servewaf`.
- New default request limits per client, for programmatic API use: 500 a minute, 20,000 an hour and 300,000 a day (https://git.eeqj.de/sneak/smallwebwaf/issues/176).
- `SWWAF_LOOKUP_TIMEOUT` at 800 ms, down from 1 s; byte limits of 4 GiB a minute, 20 GiB an hour and 200 GiB a day; `SWRP_MAX_RESPONSE_SIZE` at 1 GiB (https://git.eeqj.de/sneak/smallwebwaf/issues/161).
To know before deploying:
- A deployment needs a servewaf container, which the rproxies of any number of apps can share. The size, time, upstream and trusted-proxy settings are now `SWRP_` settings of rproxy; "Where earlier settings went" in `docs/settings.md` lists them, since the old names are ignored without an error.
- A client over 500 requests a minute, 20,000 an hour or 300,000 a day is banned; an address busier than that, such as several CI runners, belongs in `SWWAF_RATE_LIMIT_EXEMPT_NETS`.
- Partially verified: the image checks (`make example-app`, `make gitea-requests`) have not run on the split, since Ubuntu's snapshot service has failed every image build since this morning.
Next to land on `next`, each as it passes review: the gitea setup (https://git.eeqj.de/sneak/smallwebwaf/issues/178), and renaming `internal/proxy` (https://git.eeqj.de/sneak/smallwebwaf/issues/173).
Model: opus-5-5
The request limits and the hour and day byte limits now sit about twice
above what 40 people busy with heavy web apps make together on one
address:
- requests: 6000 a minute, 100,000 an hour, 1,000,000 a day;
- bytes: 20 GiB an hour, 200 GiB a day.
The largest response drops from 5 GiB to 1 GiB. The minute byte limit
of 4 GiB is sized to hold two of the largest responses with their
requests. SPEC.md gives the new reasoning; README.md and the reference
documents give the new figures.
Model: opus-5-5
TestHealthCheck closed the app's server, and later smallwebwaf, and
expected connections to the freed ports to fail. Another test could take
such a port in between, so the connection succeeded and the test failed.
The failing app check now uses the multicast address 224.0.0.1, to which
TCP cannot connect. The failing smallwebwaf check uses port 0, on which
nothing listens. Neither result depends on other processes. The test now
stops smallwebwaf after its last check, so that it exits before the
test's temporary directories are removed. The code under test is
unchanged.
Model: opus-5-5
The default request limits now suit programmatic use of an API, such
as an automation fleet on another host, and still catch abusive bots:
- per minute: 500, room for a fleet's busiest minute and a few first
visits with an empty cache, and passed within seconds by a client
firing as fast as it can;
- per hour: 20000, passed by a client that keeps up 6 a second;
- per day: 300000, passed by a scraper that keeps up 4 a second.
The byte limits and ban lengths are unchanged. SPEC.md, README.md and
docs/settings.md give the reasons; docs/gitea.md redoes the Actions
runner sums.
Judgement call: the docs/alerts.md ban example shows the minute limit.
Model: opus-5-5
sneak
was unassigned by clawbot2026-11-04 23:03:03 +01:00
clawbot
self-assigned this 2026-11-04 23:03:03 +01:00
`smallwebwaf servewaf` runs today's checks on the visitor's request each
question carries, answers rproxy, and passes nothing to an app. rproxy reports
every request servewaf answered. A report counts an allowed request's bytes and
writes servewaf's second log line. The table holds a copy of what a report
needs, never the request, so a report cannot reach a request being handled.
Judgement call: a question's body is read before any check; over 64 KiB gets 400.
Judgement call: a report's bytes and durations have ceilings, so they cannot overflow.
Judgement call: a `close` disposition for SWWAF_BAN_RESPONSE=close.
Model: opus-5-5
clawbot
removed their assignment 2026-11-05 02:39:20 +01:00
sneak
was assigned by clawbot2026-11-05 02:39:20 +01:00
A question waits on GeoJS at most 800ms, the new default of
SWWAF_LOOKUP_TIMEOUT. In enforce mode it does not wait at all when it is
over the header limits, on a fetched blocklist with deny, on the CrowdSec
decision list, or over a whole rate limit. Not waiting never lowers a
client's limit. Just before the Core Rule Set, servewaf refuses more than
50 cookies or 100 header fields with 431.
Shared default changed: SWWAF_LOOKUP_TIMEOUT also applies to smallwebwaf
with no command.
Judgement call: SWWAF_REPUTATION_TIMEOUT stays 2s, since no request waits
on the DNS blocklists or AbuseIPDB.
Model: opus-5-5
`smallwebwaf rproxy` reads the first 64 KiB of each body, asks servewaf over
HTTP/1.1, and passes what servewaf allows to the app within its limits. Any
other answer goes to the visitor as servewaf gave it. SWRP_DEFAULT_DISPOSITION
decides only when servewaf cannot be connected to, does not answer at all, or
does not answer within SWRP_TIMEOUT_MS. A method SPEC.md does not list gets 405.
Duplication: internal/rproxy copies passing-on code from internal/proxy until
#172 removes the originals.
Rule suppressed: gosec G704 and G705; gosec at
internal/smallwebwaf/rproxy_test.go:431; tagliatelle at
internal/requestlog/requestlog.go:203; paralleltest on one test.
Judgement call: an answer over 1 MiB, or with a status below 200, gets 502.
Judgement call: every target not starting with one / gets 400.
Model: opus-5-5
`smallwebwaf` with no command now prints the commands and exits with status 2.
The image runs rproxy, or servewaf with SMALLWEBWAF_COMMAND=servewaf. The
passing-on code, its settings and its log fields and metric go. internal/proxy
keeps the checks, answers, reports and own endpoints; its tests run through the
real rproxy. The documents describe the pair.
Judgement call: clients.json keeps token_refused, since state files refuse unknown fields.
Deviation: script/gitea-requests sets SWWAF_LOG_REQUEST_HEADERS, to label requests.
Partially verified: make example-app and make gitea-requests never built the image, as Ubuntu's snapshot service answered 5xx.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
nexthas thatmainlacks:smallwebwaf rproxy, in front of each app, asks servewaf about each request, relays any refusal, and passes the request to the app on its own when servewaf cannot be reached, does not answer or is too slow. OnlyGET,HEAD,POST,OPTIONS,PUT,DELETE,PATCHandQUERYpass.smallwebwaf servewafruns the checks for any number of rproxies, with one table of clients and bans, and answers well within rproxy's time limit, refusing more than 50 cookies or 100 header fields before the Core Rule Set.rproxyby default, andservewafwithSMALLWEBWAF_COMMAND=servewaf.SWWAF_LOOKUP_TIMEOUTat 800 ms, down from 1 s; byte limits of 4 GiB a minute, 20 GiB an hour and 200 GiB a day;SWRP_MAX_RESPONSE_SIZEat 1 GiB (#161).To know before deploying:
SWRP_settings of rproxy; "Where earlier settings went" indocs/settings.mdlists them, since the old names are ignored without an error.SWWAF_RATE_LIMIT_EXEMPT_NETS.make example-app,make gitea-requests) have not run on the split, since Ubuntu's snapshot service has failed every image build since this morning.Next to land on
next, each as it passes review: the gitea setup (#178), and renaminginternal/proxy(#173).Model: opus-5-5