deploy: the bank callback's controls are in the Caddy example
All checks were successful
Deploy / build-deploy (push) Successful in 7m4s
All checks were successful
Deploy / build-deploy (push) Successful in 7m4s
The README says a bank callback is not signed and that three controls in Caddy "all have to stay in place": a source-IP allowlist, a path of which only the non-secret prefix is in the web server's config, and log_skip. Caddyfile.example had none of them. A host set up from it proxied the callback to the backend from anyone and wrote the secret path to the access log, which feeds the public analytics page. The example now has the block: /hooks/bunq/* answers 403 to anything outside the bank's range, is kept out of the log, and is proxied. It adapts with Caddy 2.11.7 and sorts ahead of the catch-all. Both proxy blocks carry a 64 KiB request_body cap, the same as the backend's. catcrafts-analytics drops /hooks lines from the public tier as well, so the public page does not rest on that one directive. The README no longer says the backend binds loopback, because it does not: ListenerHTTP1 takes a port and no address and binds every IPv4 interface, while the server logs 127.0.0.1 (Crafter.Network issue 11 asks for the address). The firewall on 8081 is what the per-peer limit, the callback's allowlist and the request-size bound rest on, with the two commands that check it. It also documents what the earlier commits changed: the claims file and what to do with a payment that named two orders, the rule that a reference names one order, a payment being counted once whatever the credits file holds, and the ledger being held in memory. The server's copies of the Caddyfile and of the analytics script are installed by hand and are not changed by a deploy. Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
3c61116531
commit
5de9107d31
3 changed files with 191 additions and 21 deletions
|
|
@ -37,11 +37,19 @@ OUT_PRIVATE=/var/www/analytics-private/index.html
|
|||
# PATH), so an uncensored public tier would have published a harvestable index
|
||||
# of every buyer's address within an hour of the first sale.
|
||||
#
|
||||
# /hooks is here as the second of two layers. /hooks/bunq/<secret> is where the
|
||||
# bank posts its callbacks, and that path is the endpoint's shared secret. The
|
||||
# Caddyfile keeps it out of the access log altogether (log_skip on the
|
||||
# prefix), so normally there is no such line to drop. But that is one
|
||||
# directive in a file that is merged by hand, and the cost of it going missing
|
||||
# would be the secret on a public page: with this, the public tier does not
|
||||
# depend on it. The raw log and the private tier still do, so log_skip stays.
|
||||
#
|
||||
# Filters apply at INGEST, so this must be correct BEFORE the shop opens.
|
||||
# Should an order URL ever reach the public DB, changing this line is not
|
||||
# enough — follow the re-filter procedure at the top of this file to rebuild
|
||||
# from the retained raw logs.
|
||||
CENSOR_RE='"uri":"/(api|order)'
|
||||
CENSOR_RE='"uri":"/(api|order|hooks)'
|
||||
|
||||
# Serialize runs: a manual run racing the hourly timer once ingested the same
|
||||
# rotated log twice (both processes passed the ledger check before either
|
||||
|
|
|
|||
Loading…
Reference in a new issue