Repository navigation
Turn HTTP/2 off by default on the managed Nginx vhost, with a switch to turn it on - #552
shipmill-romamo[bot] wants to merge 2 commits into
Conversation
The cloudfall_nginx_site role takes cloudfall_nginx_site_http2 (bool, default true). When false the TLS server renders listen 443 ssl; and listen [::]:443 ssl; with no http2 on either side of Nginx 1.25.1. The template reads it through | bool, since a key=value --extra-vars hands the role the truthy string "false". The default render is byte-identical to the golden files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Review of d0326e9: MERGE
domain-site.conf.j2:{% if not cloudfall_nginx_site_http2 | bool %}parses asnot (x | bool)(filters bind tighter thannot), sofalseand the string"false"from a key=value--extra-varsboth drop HTTP/2;truefalls through to the existing version branches unchanged- Default
trueindefaults/main.ymlandmeta/argument_specs.yml; the golden files are untouched and the routes test now feeds the role default into the render, so the goldens prove the default stays byte-identical - Tests cover off as bool and as string on 1.22.1 and 1.26.3; HTTP (port 80) output is unchanged for the off case
- Fragment
changelog.d/551-nginx-http2-switch.mdunder### Added; README sentence matches the behaviour - No security surface: no secrets, no new inputs beyond a bool role variable
- Unverified:
nginx -ton a real host for the off case (rendered text only)
|
Reviewed at d0326e9: MERGE (review recorded). On hold: waits on #535, the merge gate reading main red.
|
|
@romamo Decision needed: should #552 flip The veto on #551 ("veto: default false", 2026-11-19 13:09 UTC) was posted by the App as a relay and carries the agent marker. By D-16 it doesn't count as a veto, so nothing stops this PR from merging with default
Reply here with a number or your own answer; shipmill takes this up on the tick after your reply. |
|
Decision by @romamo, relayed by Claude Code 1 |
The maintainer chose option 1 on #552's question: the managed vhost's HTTPS server drops HTTP/2 by default, and an operator turns it back on with the variable once the installed Nginx carries the HTTP/2 fix. The golden files keep the HTTP/2-on shape: the routes test renders them with the variable true, and a new role-default case proves the role's default renders the vhost without http2 on 1.22.1 and 1.26.3. Part of #551 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Review of 93fc258: MERGE
- Takes up the maintainer's answer on this PR (option 1, relayed 2026-11-19 19:46 UTC):
cloudfall_nginx_site_http2defaults tofalseindefaults/main.ymlandmeta/argument_specs.yml; the template is unchanged from d0326e9, which the earlier review covered - Behaviour change, named in the changelog under
### Changed: every managed vhost renders without HTTP/2 on its nextdomainsrun;truerenders as before - The golden files keep the HTTP/2-on shape and are now rendered with
true; a newrole-defaultcase renders with the role default and must equal the golden minus its HTTP/2 spelling on 1.22.1 and 1.26.3, so it fails if the default goes back totrue - README sentence now says how to turn HTTP/2 on; no unverified CVE claim in code or docs
- ruff, mypy, ansible-lint on the role, and the nginx-site and domains tests (69) pass locally
- Unverified:
nginx -ton a real host for the off case (rendered text only)
Plan
engine/ansible/roles/cloudfall_nginx_site/{defaults/main.yml,meta/argument_specs.yml,templates/domain-site.conf.j2},engine/tests/test_nginx_site_templates.py,engine/tests/test_nginx_site_routes.py,engine/README.md,changelog.d/551-nginx-http2-switch.mdtrueSummary
The managed vhost always rendered HTTP/2 in its TLS server, so an operator could not turn it off (a hand edit was lost on the next
domainsrun). Thecloudfall_nginx_siterole now takescloudfall_nginx_site_http2(bool, defaultfalse, indefaults/main.ymlandmeta/argument_specs.yml), as the maintainer chose on this PR (option 1):false(default):listen 443 ssl;andlisten [::]:443 ssl;with nohttp2anywhere, on both sides of 1.25.1. Every managed vhost drops to HTTP/1.1 on its nextdomainsruntrue: renders exactly as before (listen 443 ssl http2;below 1.25.1,listen 443 ssl;+http2 on;from 1.25.1)The template reads the variable through
| bool: a key=value--extra-vars cloudfall_nginx_site_http2=falsehands the role the string"false", which is truthy in a Jinjaif. The domains playbook does not pass the variable, so the role default applies unless the inventory or--extra-varssets it. No Domain schema field or CLI flag was added.engine/README.mdsays how to turn HTTP/2 back on; #555 tracks flipping the default back once Debian ships the fix.Tests
test_nginx_site_routes.py: the golden files keep the HTTP/2-on shape and are rendered with the variabletrue.test_http2_off_drops_it_from_the_tls_server_on_every_versionrenders through Ansible's template module with the role default,false, and the string"false"on 1.22.1 and 1.26.3, and checks the vhost equals the golden one minus its HTTP/2 spellingtest_nginx_site_templates.py:falseand"false"on both versions with the Jinja helper, plus a check that the default and the argument spec both sayfalseuv run ruff check .,uv run mypy,ansible-lint engine/ansible/roles/cloudfall_nginx_site(withANSIBLE_CONFIG=engine/ansible/ansible.cfg) pass;pytest engine/tests/test_nginx_site_templates.py engine/tests/test_nginx_site_routes.py engine/tests/test_nginx_site_role.py engine/tests/test_domains_one_domain.py engine/tests/test_domains_certificate.pypass (69).nginx -twas not runFixes #551
🤖 Generated with Claude Code