feat: the keel-web package and its recipe, on Core (0041 step 7) #1
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel-web!1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/keel-web-package"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Step 7 of handbook decision 0041: the
keel-webpackage and its recipe, on the Core layer (bt-layer web --parent core).packages/keel-web: the appliance manifest of Keel Web (the format's worked example) as/usr/share/keel/appliances/web.yaml;/etc/nginx/sites-available/default-anubis, Debian's default site behind Anubis;/usr/lib/keel/overlays/anubis/state.d/50keel-web, the state hook that swaps that front in for Debian's default site while theanubisoverlay is enabled, and back; a postrm that takes the front out on purge. Depends on keel-core, the three Web overlays (common#21) and keel (>= 0.15.0).plan/maininstallskeel-web;conf.d/mainfails the build unless the image is in the simple state (no Anubis key, no hook record, Anubis disabled, Coraza not linked, Debian's default site enabled).lxc-trixie.ymlfor build, lintian andpackage.bats;test-shell.ymlat 100 percent;test-appliance.ymlwithallow_unpublisheduntil the web layer is published.Needs Keel-Linux/keel#63 (keel 0.15.0 runs the overlays' state hooks: Coraza's, which has no unit, and this package's); merge that first. Keel-Linux/apt's
conf/appliancesdoes not listwebyet; the test build addedweb corein its own tree.Until keel renders the sites of decision 0042, the default site is the one site Keel Web serves, which is why the Anubis front is this package's and not keel's.
Test plan
tests/package.bats(20),tests/anubis-front.bats(22),tests/image-conf.bats(10), written first; the three shell files at 100 percent under kcov; lintian clean060d14f) and keel#63, staged with keel-release; booted in LXC (results below)On the built image
nginx -Thas nocorazadirective, a Core Rule Set payload gets 200;anubis@keeldisabled and inactive. Monit's file: units and probes of sshd, webmin, postfix and nginx only;monit -tpasses. A second apply: 0 changes.keel manifest validatepasses;keel manifest show web --resolvedprints the Web table of 0041 (overlays and ports as the format has them)./etc/keel/instance.yamland applied withkeel spec apply --system(17 changes: CrowdSec's identity and units, Coraza's hook,anubis@keel, then this package's hook): CRS payload 403; Firefox user agent gets Anubis's challenge; Googlebot's user agent from 2001:4860:4801:10::1 gets the page (625 bytes), Googlebot's user agent from the test host is challenged. The Google address was simulated: a test-onlyconf.dfile trusted the build host (set_real_ip_from,real_ip_header X-Forwarded-For, theheadercase of 0042'sweb.real_ip), and Anubis loggedx-real-ip: 2001:4860:4801:10::1. Monit adds crowdsec, firewall-bouncer, anubis andwaf-blocks. A second apply: 0 changes.Two fixes came from that run: the recipe ships the default page (common's removelist deletes
/var/www/html, so the first image answered 404), and the socket Anubis reads is served without gzip, since under Coraza a gzip static answer is empty (Keel-Linux/libnginx-mod-http-coraza#2).Image: pre-release
testing-19.0-1-step7-20261001of this repository.After review
gzip offon the socket is gone: Anubis asks the socket for gzip and passes it on to a client that accepts it (measured), so it cost browsers compression. The empty-gzip bug is handled for every site by Keel-Linux/common#25 (keel-overlay-coraza 0.1.1, now a Depends) and fixed in the module by Keel-Linux/libnginx-mod-http-coraza#3.060d14f).