CluPilotCloud/app/Services
nexxo 006ce3568b Manage hostnames and watch their certificates from the console
files.clupilot.com is why this exists. DNS pointed at the right machine, the
env var was set, the release was deployed — and there was still no certificate,
because /etc/caddy/Caddyfile is maintained by hand and nobody thought of it as a
second, separate step. Nothing in the console would have said so. Three settings
looked correct and the address did not answer.

So the page holds two things side by side. The WISH — which names should be
served — and the REALITY: whether the name has a certificate and for how much
longer. The second is measured by opening a TLS connection and reading the
expiry, not by reading configuration, because the configuration is exactly what
looked right while the address was dead. verify_peer stays on: a certificate
that fails validation is not a certificate for this question, and a display that
called it valid would be the fake R19 records.

Applying goes through the existing agent, not a new channel. The console writes
a request, the path unit wakes the agent within a second, and the agent calls one
fixed command line of the root-owned helper.

What that helper is allowed to do is the careful part. It fetches the list
ITSELF rather than being handed one, and the list is HOSTNAMES, never Caddy
blocks — `php artisan clupilot:proxy-hosts` prints `<name> <purpose>` and nothing
else. Each name is matched against a strict pattern before it is used, and the
template around it lives in the helper, which the service account cannot touch.
install-agent.sh already states the principle for the sudoers grant: a grant is
only worth anything if the holder cannot change what it grants. A service account
that could write proxy configuration would have everything the proxy can do —
redirects anywhere, files from any directory.

Purpose is a column rather than a habit. A console name gets the network lock,
a public one does not, and a console name published without it looks exactly
like a working page.

Removing takes the name out of the list and NOT out of the running proxy. Two
decisions in one click, and the second one takes a site off the air.

There is deliberately no "renew" button. Caddy renews on its own at two thirds
of the lifetime; what an operator actually needs is a second attempt after an
issuance has failed, and that is a reload — which is what Apply does. Thirty days
is treated as a problem rather than a warning: at ninety days' lifetime, a
renewal should long since have run, so anything under it is not a tight
certificate but a renewal that is not happening.

The ACME contact falls back to the owner's address, because a contact nobody
reads is the step before expired customer certificates.

CONTRACT and HOST_STEP_NEEDS both move to 2, which is what tells a server
carrying the older helper to run the installer again — caught by the guard test
that compares the two halves.

2035 tests pass, assets build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 22:55:55 +02:00
..
Billing Subtract only what was counted, not everything a singleton adopted 2026-07-30 18:20:27 +02:00
Deployment Manage hostnames and watch their certificates from the console 2026-07-30 22:55:55 +02:00
Devices Show where an account is signed in, and let it sign the other places out 2026-07-28 23:38:17 +02:00
Dns Fix round: CGNAT, guarded write/delete, and a silent host is not a missing template 2026-07-30 14:19:44 +02:00
Domains Prove a custom domain before serving it, and keep proving it 2026-07-29 14:47:51 +02:00
Env Add a raw .env editor to the Integrations page, with a net under it 2026-07-29 01:51:27 +02:00
Legal Write the processing agreement and its annex, and let it be downloaded 2026-07-30 17:12:30 +02:00
Mail Accept terms instead of a start date, and fix the sender no server accepts 2026-07-30 15:22:35 +02:00
Maintenance Keep the purpose mailer through the queue instead of losing it to the default 2026-07-28 03:50:02 +02:00
Monitoring Add the SSH identity to the vault, and give deployment config a console page 2026-07-29 00:52:44 +02:00
Provisioning Let the customer buy it themselves, and tab the integrations page 2026-07-29 19:42:28 +02:00
Proxmox Fix round: CGNAT, guarded write/delete, and a silent host is not a missing template 2026-07-30 14:19:44 +02:00
Proxy Manage hostnames and watch their certificates from the console 2026-07-30 22:55:55 +02:00
Secrets Say which slot the value in force is really coming from 2026-07-30 17:01:33 +02:00
Ssh Make host onboarding survive the machine it runs on 2026-07-30 00:54:16 +02:00
Status Let an incident be deleted, and start measuring whether the hosts answer 2026-07-29 15:16:48 +02:00
Stripe Merge main into the host-takeover branch 2026-07-30 21:21:45 +02:00
Tax Ask the EU register whether a VAT number is real 2026-07-29 22:42:29 +02:00
Traefik Serve the custom domain, not just announce it 2026-07-29 16:44:52 +02:00
Traffic feat(billing): the plan catalogue becomes three tables, and config stops selling 2026-07-26 12:05:56 +02:00
Vpn Fix round: CGNAT, guarded write/delete, and a silent host is not a missing template 2026-07-30 14:19:44 +02:00
Wireguard Add the SSH identity to the vault, and give deployment config a console page 2026-07-29 00:52:44 +02:00