iac_tls: gather the network facts and renew a self-signed certificate without them #75
No reviewers
Labels
No labels
Bug
Feature
Idee
agent-freigabe
regression
status
ausarbeiten
status
bereit
status
in-arbeit
status
review
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iac/iac-core!75
Loading…
Reference in a new issue
No description provided.
Delete branch "tls-own-facts"
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?
Refs iac-core#58 (the issue stays open until verified on a guest).
iac_tlsgathers the network facts itself, so the names of the self-signed certificate contain the IP of the guest even when the play started without iproute2. A self-signed certificate (subject = issuer) that lacks a current name or the IP is made again from the same key, and the services oftls.reloadare reloaded. The certificate of a CA stays.Merge order: this PR, then move
v2, then the app PRs iac-monitoring and iac-ciso-assistant (branchtls-own-facts) that drop their ownsetuptask.Tested:
tools/lint.sh;check-all-apps.sh --sample(5 of 5); dev container of iac-monitoring: certificate names the IP, second run changes only instance.json, a self-signed certificate with only 127.0.0.1 is renewed with the same key, a certificate of a test CA keeps its fingerprint.Not tested: a VM image, the full
check-all-apps.shrun, a real guest.🤖 Generated with Claude Code
https://claude.ai/code/session_014Px55FVUdXiuWr642SZTHK
The names of the self-signed certificate come from the facts of the guest. At the start of a play a minimal image has no iproute2, so the facts lack the address and the certificate named only 127.0.0.1 – and as it is made once, it stayed wrong. Apps worked around it with their own setup task. iac_tls now gathers the network facts itself. A self-signed certificate (subject = issuer) that lacks one of the current names is made again from the same key and the services of "tls": {"reload": [...]} are reloaded; the certificate of a CA stays. Tested: tools/lint.sh; dev container of iac-monitoring without its own setup task: the certificate names the IP, the second run changes only instance.json; a self-signed certificate with 127.0.0.1 only is renewed (same key, IP in the SAN), then a run changes nothing; a certificate signed by a test CA keeps its fingerprint. Not tested: a VM image.