Files
werewulf/hpcod/terraform
ilkerandClaude Opus 5 20c33479aa hpcod: the cluster portal trusts the control plane, so nobody is asked twice
Reaching a cluster's Open OnDemand meant meeting a second login, with a
random password generated on the head at first boot and written to a
root-only file there. Nothing carried it anywhere, so the only way in was
to log into the head and read it - the portal link led to a prompt nobody
could answer.

The first thing I built was worse: fetch that password over SSH and
replay it as basic auth. It would have worked and it was a workaround
wearing the costume of a feature.

Authentication now happens once. The cluster's Apache requires a client
certificate and trusts exactly one - the control plane's - and takes
REMOTE_USER from the verified subject rather than from a header. A header
has to be trusted, and anything trusted can be forged the day the
assumption behind it stops holding; a subject name from a verified
certificate cannot be. A one-line map turns that identity into the
cluster's single account.

It fails closed in both directions. No certificate and the handshake does
not complete, so there is nothing to attack. No verified client and Apache
refuses. The proxy also strips X-Forwarded-User and its variants from
whatever the caller sent, which changes nothing today and closes the door
if a cluster is ever configured to read them.

It is also a straight improvement on what was there. Until now anything on
the management network could reach a cluster's portal and try passwords
against it; now nothing but the control plane can open the connection.

The password, the htpasswd file and the tooling for them are gone rather
than left disabled: a second way in that nobody maintains is how a system
acquires a door it has forgotten about.

The certificate travels to each cluster through cloud-init. It is public
by nature - what a cluster checks a client against, never something it
signs with - so carrying it that way gives nothing away.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 13:22:43 +02:00
..