Overlays without units, and manifest secrets with a file policy: gaps found by 0041 step 6 #62
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#62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found by step 6 of handbook decision 0041 (Keel-Linux/common#21, the Keel Web overlays), measured with keel 0.14.0 on the Core image of step 4 with a spec naming the
webappliance andcoraza: enabled,anubis: enabled.1. Overlays without a unit are never converged.
apply --systemenables and starts an overlay's units; Coraza is an Nginx module and has none, so turning it on in the spec writes Monit'swaf-blockscheck and loads nothing (the check fails with 204). keel-overlay-coraza ships/usr/lib/keel/overlays/coraza/state enabled|disabled, which links the module, reloads, checks the probe and rolls back (corazawaf/coraza-nginx#139). keel should run/usr/lib/keel/overlays/<name>/state enabled|disabledwhen an overlay's state changes and the file exists, after the overlays itrequiresand before its dependants, and fail the step when it fails.2.
diffandinspectcannot read such an overlay ("not compared: runs no unit"). The hook could answer astatuscall.3. The Anubis signing key does not follow the spec's secret.
secrets.anubis_signing_key: {generate: true}makes a short token for the first boot conf (KEEL_SECRET_ANUBIS_SIGNING_KEY), not a 32-byte ed25519 seed, and no file Anubis reads. The overlay now makes its key at the first start ofanubis@keel.serviceinto/etc/anubis/keel.key, links a{file: PATH}the spec names instead, and refuses to make one on a database replica or where/etc/anubis/keel.key.from-primaryexists. keel should:anubis_signing_key: {file: /etc/anubis/keel.key}for a generated key;shared: true), put the primary's key in place before enabling the overlay, and write thefrom-primarymarker until it has, since the spec has no role for a web node.4. Monit re-encodes the waf-blocks path (
%3Csent as%253C). The Core Rule Set still blocks it (403, measured), but the renderer may want to say so or pass the path decoded.