diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fce872..7eabcc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,82 @@ All notable changes are recorded here. Versions follow [Semantic Versioning](https://semver.org/). +## [1.1.2] — 2026-10-29 + +_A patch release: the access log now records every public request that gets past the protection edge, including the +ones a filter answers on its own: login attempts, refused form posts, a suspended or maintenance site, a slow body's +`408`, an oversized form's `413`, plugin routes such as `robots.txt` and the sitemap._ + +### Upgrading — read this first + +**From `1.1.1`: a kernel upgrade, no flag.** From `1.1.0`, `1.0.1` or `1.0.0`, read `1.1.1`'s and `1.1.0`'s +*Upgrading* first, then install this release directly. Paths are the installer defaults (`/opt/runway`, +`/opt/runway-data`). + +**Your access log will carry more lines.** Nothing is removed and the line format is unchanged, but requests that +used to leave no line now leave one: in the `runway.access` stream and in each site's own access log (its **Logs** +screen). Expect, among others, `POST /login -> 302` for a login attempt, `POST /login -> 403` for a form post refused +for its missing token, `-> 503` while a site is suspended, in maintenance or over its quota, `-> 408` for a refused +slow body, `-> 413` for a `PUT`/`PATCH`/`DELETE` form over `runway.endpoints.max-form-bytes`, and `GET /robots.txt`, +`GET /sitemap.xml` and other plugin routes. A tool that reads `runway.access` (a +log shipper, an alert on `4xx`/`5xx` counts, a ban list fed by failed logins) sees these from now on; check any +threshold that assumed they were absent; under a flood of login attempts that gets past the protection edge, the +`runway.access` stream now grows by one line per attempt, which a journal rate limit may also count. Each site's +**Insights** does not count the refusals (it counts only `GET` page views and `404`s), but it now sees plugin routes: +a page a plugin serves counts as a page view, and a plugin route answering `404` (a missing blog post, an icon the +site has not set) appears among the top 404s. Requests the protection edge turns away (`403`/`429`) still go to +`runway.protect` only, throttled, as before. + +**1. Back up.** Take each site's backup (**Backups**) and copy `/opt/runway-data/external/` somewhere **outside** +`external/plugins/`. + +**2. Upgrade the kernel:** + +```bash +chmod +x runway-1.1.2.bin +sudo ./runway-1.1.2.bin -y +``` + +The essential plugin moves with the kernel to `1.1.2` (its descriptor changes in version only, and its jar is +rebuilt), so the installer refreshes it; expect these lines, once: + +``` +refreshing bundled plugin 'protection' from this release (it moves with the kernel; files you edited are backed up) +plugin 'protection': plugin.yml replaced (the previous one kept as plugin.yml.bak, for a rollback) +plugin 'protection': runway-plugin-protection.jar replaced (the previous one kept as runway-plugin-protection.jar.bak, for a rollback) +keeping the bundled plugins in the release: /opt/runway-1.1.2/seed/ (the repair copy — Administration §12) +``` + +**3. Check.** +- **About Runway** shows `1.1.2`. +- On **Plugins**, every row is *Loaded* and none *Blocked*; protection shows `1.1.2`. +- A login form posted without its token appears in the access log: + `curl -s -o /dev/null -w '%{http_code}\n' -H 'Host: ' -d 'username=x&password=y' http://127.0.0.1:8080/login` + answers `403`, and `journalctl -u runway --since '-5min' | grep 'runway.access' | grep -c 'POST /login -> 403'` is + at least `1`. + +**4. Rollback**, if needed: `sudo bash runway-1.1.1.bin -y` puts 1.1.1 back, its protection files included; those +requests then leave no access-log line again. Nothing this release saves is read differently by 1.1.1. + +### Fixed + +- **The access log records every public request past the protection edge.** It used to be written by the innermost + filter, so any request answered by a filter further out left no line in either the platform log or the site's + own: every attempt at a site's login page, successful or not (Spring Security answers it itself), a form post + refused for its missing token, the `503` of a suspended, maintenance or over-quota site, a request body refused for + arriving too slowly, a `PUT`/`PATCH`/`DELETE` form refused unread for its size, and every plugin route + (`robots.txt`, the sitemap, `llms.txt`, a plugin's form). A password-guessing run against a site's login was + invisible in its access log. The log is now written just inside the protection edge, from where it sees how each + request was answered. A plugin page served by a route now also counts in **Insights** like any other page. +- **Audit lines are kept ahead of access lines when a site's log queue is full.** Both share one queue + (`runway.logs.queue-capacity`); an eighth of it is now held for audit lines, so a flood that fills it drops access + lines first and keeps the `login.failure` records of the very attack that filled it. + +### Documentation + +- OPERATIONS §3 (what the access log records, and since when), PLUGIN-DEVELOPMENT (which plugin filters' answers are + logged), SITE-MANAGER-GUIDE §3 and §10 (login attempts and refusals on **Logs**; not counted by **Insights**). + ## [1.1.1] — 2026-10-29 _A patch release: the slow-request-body limit 1.1.0 introduced now covers form posts and multipart uploads too, and diff --git a/docs/ADMINISTRATION.md b/docs/ADMINISTRATION.md index 15964ba..0c376bb 100644 --- a/docs/ADMINISTRATION.md +++ b/docs/ADMINISTRATION.md @@ -2775,7 +2775,8 @@ Each site keeps its own access log (its public traffic) and audit log (its manag - `runway.logs.queue-capacity` (default `8192`, at least `16`) — log lines wait in a queue between the request and the disk, so a slow disk never slows a page. When the queue is full, new lines are **dropped**, not waited for: the count is the `runway_logs_dropped` metric (and the Logs screen), and a `WARN` *"site log queue saturated"* is - logged at most once a minute. Raise it if that count grows; each queued line takes a little memory. + logged at most once a minute. An eighth of the queue is held for audit lines (sign-ins, changes), so a flood of + public requests drops access lines first. Raise it if that count grows; each queued line takes a little memory. ### Bandwidth metering (`runway.bandwidth.*`) diff --git a/docs/OPERATIONS.md b/docs/OPERATIONS.md index a0be95f..b8408ab 100644 --- a/docs/OPERATIONS.md +++ b/docs/OPERATIONS.md @@ -223,7 +223,9 @@ is written **only in detached launcher mode** — the supervisor appends the JVM usually empty; do not go looking for application logs there when running as a service. **The public access log.** One line is emitted per **public** request under the logger -`runway.access`, from the innermost filter (so the status is final): +`runway.access`, written once every filter and handler has finished with it, so with the status it was answered +with (the one exception: an error escaping a plugin's own controller is logged with the status set before it, +while the client receives `500`): ``` 203.0.113.7 GET /about -> 200 (12ms) @@ -237,6 +239,13 @@ fetch will **not** appear here; that is by design (this is a traffic log, not an client IP is the gated one (from a trusted forwarded header only — see Administration §7), never a raw spoofable header. +It records **every** public request that gets past the protection edge (§3.1), whoever answers it: a page, a +plugin's route (`robots.txt`, the sitemap, a form), the sign-in form (every login attempt, successful or not, and +a form post refused for its missing token, `403`), an oversized form refused unread (`413`), a suspended, maintenance or over-quota site (`503`), and a +request body refused for arriving too slowly (`408`). Before 1.1.2 every one of these except the page was missing, +because the log was written by the innermost filter and each of them is answered by a filter outside it. Only the +edge's own `403`/`429` stay out: those go to `runway.protect` (§3.1). + **What to grep for** (systemd, hence `journalctl`): ```bash @@ -302,7 +311,7 @@ rejections, §3.1); everything else logs under its package, `mx.quest.runway.*`. ### 3.1 Seeing what the edge rejected A request the protection edge turns away is rejected at `FilterOrder.CORE_PROTECTION` — the outermost slot — -and the chain is never called. The access log lives at the innermost slot. So a `403`/`429` from the edge +and the chain is never called. The access log sits just inside that slot, so a `403`/`429` from the edge **appears in no other log**, and without a log of its own a site manager would have no way to tell that a crawler was being throttled. diff --git a/docs/PLUGIN-DEVELOPMENT.md b/docs/PLUGIN-DEVELOPMENT.md index a426ae6..eaf7c9d 100644 --- a/docs/PLUGIN-DEVELOPMENT.md +++ b/docs/PLUGIN-DEVELOPMENT.md @@ -738,7 +738,9 @@ You declare a **`FilterBand` + a small offset** — never a raw order. The kerne escape its band to preempt the protection floor or run before security. The bands (outermost → innermost) are `EDGE_INGRESS` (raw request, pre-security), `EDGE_EGRESS` (response rewriting), `TENANT` (after the site is resolved, before security), `APPLICATION` (feature filters, inner of -security; the default). **`SECURITY` is not contributable** — it belongs to the kernel's realm +security; the default). The kernel's access log sits between `EDGE_INGRESS` and the rest: whatever an +`EDGE_EGRESS`, `TENANT` or `APPLICATION` filter answers is logged with its status, while a request an +`EDGE_INGRESS` filter turns away is not (log it yourself, throttled, if you need to). **`SECURITY` is not contributable** — it belongs to the kernel's realm security chains, and (as above) a non-essential plugin may not declare a `SecurityFilterChain` bean either. **Verify:** the boot log prints one line per plugin filter — diff --git a/docs/SITE-MANAGER-GUIDE.md b/docs/SITE-MANAGER-GUIDE.md index 849d6ae..d5da12f 100644 --- a/docs/SITE-MANAGER-GUIDE.md +++ b/docs/SITE-MANAGER-GUIDE.md @@ -230,7 +230,8 @@ name or the default language. While no field is set and no manifest icon (192, 5 `/manifest.webmanifest` answers 404 and pages do not link to it. The **Logs** screen (`/__admin/logs`) shows your site's own **access log** (public traffic — the most recent -lines) and its **audit journal**: who did what on your site, and when. The journal records sign-ins +lines; every sign-in attempt on your site's login page is there too, as a `POST /login`, and so is a request your +site refused, such as a `503` while it is in maintenance) and its **audit journal**: who did what on your site, and when. The journal records sign-ins (`login.success`, `login.failure`) and sign-outs (`logout`), each with the address it came from (`ip=…`, in full: the anonymizing setting below applies to the access log only); password recovery through an emailed link (`recovery.requested`, `recovery.completed`); page changes (`page.saved`, `page.deleted`, `page.published`, @@ -1184,10 +1185,10 @@ two lists, for the **last 7 or 30 days** (never longer than your log retention with a corrected link, the missing page or file, or a redirect from the old address. - **Most-visited pages** — your pages by how often they were successfully viewed, with when last. -**What it counts.** Only `GET` requests (a form post or a crawler's `HEAD` is not a visit). A **page view** is a +**What it counts.** Only `GET` requests (a form post, a sign-in attempt or a crawler's `HEAD` is not a visit). A **page view** is a successful (2xx) answer for an address that looks like a page — no file extension in the last part, or `.html` — so stylesheets, images, downloads, `robots.txt` and the sitemap are left out; a browser re-checking a page it -already has (a `304`) is not a new view. A **404** counts for any address, images included, because a missing +already has (a `304`) is not a new view, and neither is a refusal (a `403`, or a `503` during maintenance). A **404** counts for any address, images included, because a missing image is a broken link too. Addresses are shown **without their query string** (`/search?q=…` counts as `/search`), and very long ones are shortened on screen (hover to see the whole stored address). diff --git a/pom.xml b/pom.xml index 1a00683..41f244d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ mx.quest runway - 1.1.1 + 1.1.2 pom Runway @@ -42,7 +42,7 @@ extended timestamp through the build JVM's default time zone, so the same source built in CST and in UTC differed by exactly 6 h inside the exec jar (found 2026-10-17 on a second host). .mvn/jvm.config pins -Duser.timezone=UTC for the Maven JVM, which removes the host's zone. --> - 2026-10-29T17:30:00Z + 2026-10-29T18:30:00Z UTF-8