Repository navigation
fix: operations hardening, second pass - #62
Merged
Merged
Conversation
- fail2ban: web and Odoo bans use the tool's ufw-odoo-web action (ports 80/443), which works on 0.11.2 (whose ufw[application=...] passes the profile name unquoted) as on 1.0.2 and 1.1.0; backend is set per jail, never in [DEFAULT]; sshd reads the journal where auth.log is absent (Debian 12), with python3-systemd; durations and ignore networks are validated, the admin's SSH address proposed; the regex test is read-only. - Staged writes and the nginx switch back up every file first, check each write, and restore on failure or INT/TERM. - Certificates: Let's Encrypt names /etc/letsencrypt/live/<domain>/, untouched names the files the vhost names; missing files or a cancelled pick write no HTTPS vhost. - Update configuration: role password, login check with the new values, then write and restart; no restart for a remote new password; the backup path is printed even on failure. - UFW: enabling allows SSH first, deleting an SSH rule asks, the PostgreSQL source is one address. - logrotate policies are staged and validated with logrotate -d; the size threshold is validated. - verify_ops_configs runs fail2ban 1.1.0, 1.0.2 and 0.11.2 (with a negative control), staged-write failures, logrotate rollback, and Let's Encrypt / unknown-version vhosts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second audit, group E: operations. Each fix is checked by running it against real fail2ban, nginx and logrotate.
ufw-odoo-webaction, which blocks only ports 80 and 443.ufw[application="Nginx Full"]split the profile name, and ufw refused every ban. A negative control reproduces this.backendis set per jail. Whereauth.logis absent (Debian 12),sshdreads the journal./etc/letsencrypt/live/<domain>/.nginx -taccepts these vhosts, also when written for an unknown nginx version.logrotate -d, and the size is validated.CI gets Python 3.9 and 3.11 to run the older fail2ban releases.
OpenSpec:
2026-10-08-ops-hardening-2.Assisted-by: Claude