The gate was a server-level rewrite_by_lua_block. Server-level rewrite_by_lua
is inherited by every location, including the internal /_gitea_signed_in probe.
Because $request_uri (which drives $filter_perm) is the *original* request URI
and is inherited by subrequests, the probe subrequest re-entered the gate and
captured "/_gitea_signed_in" again -> "lua subrequests cycle" and
"failed to issue subrequest: -1", i.e. a 500 for cookie-bearing clients.
Move the block into "location /" so the probe location no longer inherits it.
$filter_key is still set before the server-level limit_req (rewrite phase runs
before preaccess), so the behaviour is unchanged for real requests.
Verified on draco/fornax: nginx -t ok, zero cycle errors, anonymous filter
requests 429, plain pages 200.
CogBot (cognition.ai) was the second-largest source of the current crawler
load, walking /src/branch/ and /commits/branch/ tree routes with a declared
User-Agent. Add it to the credentials/gitea bot_filter deny_user_agents list,
so the edge returns 403 and robots.txt disallows it.
Data bag re-encrypted with the configured secret; all attributes remain
encrypted (aes-256-gcm v3).
Gitea is again CPU-saturated by crawler traffic. The dominant source is a
distributed crawl of combinatorial issue/pull filter URLs, e.g.
/kosmos/chef/issues?assignee=0&labels=...&milestone=0&poster=0&project=0.
It spreads ~1 request across tens of thousands of client IPs with spoofed
browser User-Agents and no referer, so the existing per-IP zones (bots,
expensive) never fill; the last hour saw ~45k permutation requests from
~43k distinct IPs, and the resulting render/DB load shows up as 499s and
slow page loads.
- Detect the filter-permutation list pages ($filter_perm, anchored so API
paths never match) and cap the anonymous ones with a single non-IP
"filters" bucket (1r/s, burst 5).
- Exempt authenticated sessions: rewrite_by_lua_block validates the
i_like_gitea cookie once against a signed-in-only route
(/_gitea_signed_in -> /user/settings; 200 signed in, 303 anonymous) and
caches the result per session. Cookie presence alone is not enough, since
Gitea issues it to anonymous visitors too. Probe failures fail open so a
flaky Gitea cannot throttle a signed-in user.
- Skip the probe for rate-limited bot UAs and give the internal probe its
own empty-key limit_req zone, so the subrequest cannot set
r->main->limit_req_set and disable the main request's limits.
- Disallow the combinatorial tree-browse routes in robots.txt
(/*/src/branch/, /*/commits/branch/, and the tag variants).
Reviewed and signed off by the review agent. Bump cookbook to 0.3.11.
The CogBot denial is configured in the encrypted credentials/gitea data bag
(bot_filter), which is managed by Ops.
The script runs over SSH with no TTY, but needrestart's apt hook runs in
its default interactive mode (via debconf) after installing or removing
packages, so it blocks forever waiting on a prompt. That stalled the
garage-14 migration during `apt-get remove chef`.
Export DEBIAN_FRONTEND=noninteractive and NEEDRESTART_SUSPEND=1 inside the
generated remote script so no invocation flags are needed. The needrestart
hook exits early ("needrestart is suspended") and dpkg/apt can't prompt.
Prometheus already scrapes Garage (job="garage", port 3903) but there was
no alert on up{job="garage"}, so the 2026-12-04 garage-15 outage went
unnoticed for ~1h40m. Add a critical GarageDown alert and ship it via the
cookbook.
The garage.service unit had no restart policy, so a service that died
stayed dead until it was restarted by hand. On 2026-12-04 the unit on
garage-15 (10.1.1.82) was killed by the kernel OOM killer after its block
resync loop pushed memory over the 1.9GB VM's limit; systemd left it down
for ~1h40m and the cluster saw the node as disconnected the whole time.
Set Restart=always with a 30s backoff and disable the start rate limit
(StartLimitIntervalSec=0) so systemd keeps retrying instead of giving up
after a few rapid failures. Bump the cookbook to 0.2.0 and extend the
InSpec test to assert the restart policy.
Bump the runtime Ruby to 4.0.10 (and the ruby-build definitions to
v20261119, the first release that defines it), matching upstream's
updated default Ruby for the 4.7.6 security release.
Strip client-supplied Forwarded headers in the Mastodon nginx config,
mirroring the upstream 4.7.5 hardening.
Gitea 28.4.0 is a maintenance/security release with no app.ini changes.
Runner 6.0.0 removed the builtin:checkout action; map it to
actions/checkout@v6 via runner.action_replacements so existing workflows
keep working. 6.1.0 runs JavaScript actions on a Node.js 24 the runner
downloads and mounts into jobs.
The rskj package owns /etc/rsk/node.conf: its postinst re-asks the
`shared/config` debconf question on every configure and re-points node.conf at
the selected network's shipped config. That debconf state is not reliably
preserved across upgrades. After the plain 9.0.1 -> 9.0.5 upgrade, the question
fell back to the template default ("mainnet"), the service was restarted, and
rsk-testnet-6 started syncing the mainnet chain from genesis into a fresh
database while its real testnet data sat idle.
Stop relying on debconf: template our own node config (with the RPC bind/CORS
settings the openresty proxies need) and manage the node.conf symlink from Chef,
after the package has been configured. The restart then happens with the correct
config, and a package upgrade can no longer flip the network.
Bump the cookbook to 0.6.1 and extend the InSpec test to assert the managed
config and the symlink target.
VETIVER-9.0.5 is a security release that mitigates CVE-2026-114938 ("Java4Shell") in the OpenJDK Base64 decoder. The 9.0.5 JAR has no code changes: protection comes from the new systemd unit that disables the vulnerable intrinsic, together with the OpenJDK 17 update from USN-9155-1 (covered by unattended-upgrades).
The rskj package upgrade does not restart the node itself, so restart rsk explicitly when the pinned package version changes; otherwise the new unit and JAR are not picked up.
Bump the cookbook to 0.6.0 and update the InSpec assertion, adding a check that the unit carries -XX:-UseBASE64Intrinsics.
Size the akkounts background workers for the 4 GB / 4 vCPU VM:
* JOB_CONCURRENCY=6 scales the `default,nostr` worker group.
* NOSTR_CONNECT_THREADS=24 and NOSTR_RPC_THREADS=4 size the separate
nostr_connect (long-blocking listeners) and nostr_rpc (signing) pools.
* DB_POOL=24 keeps the pool >= the largest worker thread count.
Also cap the unit with MemoryHigh/MemoryMax, and restart the service when
the unit body changes since it now carries this configuration.
The app reads NOSTR_BLOSSOM_SERVER_URL (used for the Nostr profile media
editor). Default it to nil like the other nostr attributes and set it to
https://blossom.kosmos.org in the production environment.
The Sentry host is unreachable, so every captured event ends in a TCP timeout
and a Sentry::ExternalError stack trace in the app log (thousands per day).
Leaving SENTRY_DSN out of the app environment makes
config/initializers/sentry.rb skip Sentry.init entirely, so the app stops
contacting it instead of failing on every event.
Temporary: uncomment the line once the Sentry host is back up.
3.3.12 is affected by the seven Regexp and String case conversion
vulnerabilities announced on 2026-11-18, several of which allow remote code
execution. 3.3.14 is the fixed release on this branch line.
ruby-build is bumped to v20261119, which adds the 3.3.14 definition (the
previous v20260701 predates the release and cannot build it).
The November 2026 nginx security release fixes two unauthenticated RCE
flaws reachable over HTTP/2: CVE-2026-123633 (HTTP/2 use-after-free,
vulnerable 1.19.7-1.31.8) and CVE-2026-123007 (HTTP/2 flow control
memory corruption, vulnerable 1.9.5-1.31.8). Fixes are in nginx 1.30.7
(stable) and 1.31.9 (mainline).
Neither of our proxies can be patched yet: OpenResty 1.25.3.1 runs an
nginx 1.25.3 core, and the newest OpenResty build in the apt repo
(1.31.8.1) still bundles nginx 1.31.8. The nginx.org apt repo has no
fixed package for Ubuntu focal either.
As a temporary mitigation, drop the http2 parameter from every listen
directive so the proxies no longer negotiate HTTP/2. Re-enable with
"http2 on;" in the server blocks once OpenResty ships an nginx 1.31.9
(or newer) core.
The submission relay and both promotion paths are live in production, so the
runbook no longer claims that nothing has been deployed. Reframe the deployment
order and pre-go-live checks as completed, and fix the verification command:
strfry only returns the NIP-11 JSON with an Accept header, so the old
curl | jq pipeline could never work.
strfry raises RLIMIT_NOFILE to relay.nofiles at startup and exits if that exceeds the process hard limit. The sync config omitted nofiles, so strfry used its compiled-in default (1000000) while the systemd default here is 524288, and strfry-sync.service failed to start with:
Unable to set NOFILES limit to 1000000, exceeds max of 524288
Set nofiles explicitly (from the production relay config, falling back to 524288, as the production template does) and extend the regression test to assert it.
Add kosmos_strfry::member_bridge: a strfry router stream group that subscribes to the local submission relay (ws://localhost:7778) and writes member-authored events into the production database. dir = "down" keeps it strictly one-way, and pluginDown is the new LDAP-only policy (ldap-only-policy.ts) from akkounts extras/strfry, so membership is decided per event by LDAP with no member list.
The two promotion paths (approved_sync, member_bridge) are enabled as role overrides in role[strfry_submission], not in the production environment config.
Also add a render regression test for the router config and update the runbook.
Refs raucao/marco#97.
submit.nostr.kosmos.org is now a CNAME to lb.kosmos.org, so the "add an
A/AAAA record" step is replaced by "verify the CNAME resolves". Also record
the LMDB concurrency test result: a strfry sync ran against the same LMDB
while the live relay served 13/13 subscriptions on the nuc's :7777 mirror.
Add a second strfry instance and the machinery to promote moderated content
into the members relay, for raucao/marco#97.
New role[strfry_submission] and the kosmos_strfry_submission cookbook run a
separate relay (port 7778, own DB capped at a 4 GiB mapsize) fronted at
submit.nostr.kosmos.org, using the open submission write policy from akkounts
extras/strfry. It is deliberately not role[strfry], so nginx never adds it to
the members relay's _strfry upstream.
Add kosmos_strfry::approved_sync: a dedicated fail-closed sync config plus a
5-minute timer that pulls moderator-approved content from the nuc staging relay
into the members relay. The sync command URL and STAGING_RELAY_URL come from a
single attribute so the policy's byte-exact source match cannot drift.
Also add a role-scoped Node 22 install (the global Node attribute is
untouched), a proxy-scoped firewall rule, an nginx site, a runbook, and a
render regression check for the sync template.
Deployment is gated: approved_sync.enabled defaults to false, and the akkounts
policy files must be on the live branch before converging.
The Rainbows master and workers run on glibc malloc, which retains and
fragments heap in long-lived workers. Preload jemalloc (libjemalloc2) so the
aged per-worker RSS stays flat instead of growing.
Also restart liquor-cabinet.service when its systemd unit changes:
systemd_unit only reloads the daemon, so an env-only change would not take
effect until the next deploy or reboot.
Cookbook version 0.3.0 -> 0.4.0.
Broaden the edge bot blocking and move the bot/IP lists out of the
cookbook so they are no longer published in the public repository.
- rate_limits.conf and robots.txt are now rendered from the encrypted
credentials/gitea data bag (bot_filter): rate-limited crawler names,
hard-banned user agents and denied networks.
- Add several AI crawlers to the rate-limited set, tighten the bots zone
to 60r/m so the limit actually engages, hard-block a datacenter scraper
network and disallow combinatorial commit-browsing routes in robots.txt.
- Rate values and the expensive-route/robots route patterns stay static.
- Bump cookbook to 0.3.9; include updated nodes submodule ref.