Tighten the Goss firewall assertion and render it from the declaration
The conformance checker existed but had not run since 2026-03-09, and its firewall assertion matched /6443\/tcp.*ALLOW/ - asserting the port was allowed but not from whom. It passed identically whether the API was restricted to one operator address or open to the entire internet, which is precisely the drift that went undetected. goss/baseline.yaml is now a template rendered per host from the same inventory declaration that converges the host, so the assertion cannot drift from what it checks. It asserts each declared source is present, that no revoked source retains access, and that 6443 is never ALLOW Anywhere. verify.yaml gained the vars_files the bootstrap play already had - without it the firewall assertions rendered empty and silently asserted nothing, which is worse than no check. Result on Railiance01: 32 assertions, 31 pass. The one failure is a real find and is recorded as T06 - Flannel VXLAN is declared open to Anywhere with no source restriction, the same defect pattern as the k3s rule. It is currently absent from the host, so converging would INTRODUCE the exposure rather than fix drift. Must be resolved before RAIL-BS-WP-0007 multi-node HA needs working VXLAN. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
3d1bd75b6b
commit
95e3361598
4 changed files with 74 additions and 5 deletions
|
|
@ -9,5 +9,9 @@
|
|||
- hosts: all
|
||||
become: true
|
||||
gather_facts: true
|
||||
# Same declaration the bootstrap play converges from. Without this the
|
||||
# firewall assertions render empty and silently assert nothing.
|
||||
vars_files:
|
||||
- ../inventory/group_vars/all.yaml
|
||||
roles:
|
||||
- role: goss
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
checksum: "sha256:https://github.com/goss-org/goss/releases/download/v{{ goss_version }}/goss-linux-amd64.sha256"
|
||||
register: goss_download
|
||||
|
||||
- name: Copy baseline test file
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../../goss/baseline.yaml"
|
||||
- name: Render baseline test file from the same declaration that converges the host
|
||||
ansible.builtin.template:
|
||||
src: "{{ playbook_dir }}/../../goss/baseline.yaml.j2"
|
||||
dest: "{{ goss_dir }}/baseline.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue