hermes: restore legacy chat/triage hosts alongside the renamed ones #38
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/hermes-restore-legacy-chat-triage-hosts-v2"
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?
Supersedes #37 and #36 - please close both in favour of this one. Same manifest changes as #37, plus a regression test. (The SCM broker only allows new-branch creation, never branch updates, so adding the test required a new branch and PR rather than a push to #37.)
Why
Merged PR #34 renamed the chat/triage public hosts in place instead of adding the new names. It removed chat.hermes.bstein.dev and triage.hermes.bstein.dev from the certificate SANs, the hermes-sites Ingress rules and the CoreDNS overrides in one change. Verified live on 2026-08-21:
Net effect: chat and triage have no working hostname at all. The post-merge runbook's rollback stance for a failed OIDC step is to reinstate the known-good old DNS/ingress/cert/OIDC targets rather than remove anything.
What this does
Makes the rename additive instead of destructive:
Legacy hosts are kept serving rather than redirected: oauth2-proxy cookies are host-bound, so a redirect would silently drop live sessions. Retiring them stays a separate, explicit change.
Validation
End-to-end run of the actual ensure script against a mock Keycloak admin API and mock Vault (only the three bootstrap lines repointed - the vault env source, KC_URL and the service-account token path; ensure_proxy_client itself verbatim). Script exits 0 and records:
16 assertions pass, including PKCE S256 and confidential-client flags preserved, and no client secret or admin password echoed into any client payload. A control run of main's script reproduces the root cause: it registers only the new host.
The new test pins the invariant that a public host is either served by all four layers (certificate SAN, CoreDNS, Ingress rule, Keycloak registration) or by none. Against the pre-fix tree it fails 9 times across both legacy hosts and all four layers; against this branch the suite is green (19 passed). Also checked: kubectl kustomize services/hermes renders 5 SANs and 4 host rules; the two unrelated failures in test_hermes_agent_layout.py (CPU headroom / node capacity) reproduce identically on pristine main and are not caused by this change.
Expected after merge
Flux reconciles, cert-manager reissues hermes-sites-tls covering all 5 names, and the ensure-11 Job registers both origins per client. All four hostnames then serve 302 to Keycloak and reach the login form instead of the 400.
Operator note: users must log in again on the renamed hosts because oauth2-proxy cookies are host-bound; sessions on the legacy hosts are preserved by this change.
WIP: hermes: restore legacy chat/triage hosts alongside the renamed onesto hermes: restore legacy chat/triage hosts alongside the renamed ones