HydraIssues

MASTER: move every remaining Hydra console off its password and behind iamnim
open improvement Priority: high Project: experiencenet Reporter: 24 Oct 2026 16:22

Description

Rule #238 says an operator console sits behind iamnim SSO, and that a static console token is retired rather than kept as a second door. hydraorganization did it on #596 and hydraissue did it on #995. Seven consoles still serve a password form, and four of them are reachable from the internet today.

This issue is the master. It carries the survey, the decision that has to be made first, and the pattern. Children get cut once that decision is made.

WHO IS STILL ON A PASSWORD

Found by sweeping the local checkouts for the hydrawebcomponents login handlers (HandleLogin, RequireWebAuth), then asking each live domain for /login and counting password inputs.

service console state (2026-10-24) hwc
hydrabodystatus hydrabody.experiencenet.com LIVE, password form v0.4.0
hydraexperiencelibrary hydraexperiencelibrary.experiencenet.com LIVE, password form v0.2.0
hydrapipeline hydrapipeline.experiencenet.com LIVE, password form v0.6.1
hydranps hydranps.experiencenet.com LIVE, password form v0.4.0
hydraapplepipeline no domain answers code serves one v0.6.1
hydraheadwebstream no domain answers code serves one v0.3.0
hydraunrealengine-server no domain in the example config code serves one v0.3.0

Already done, and the two patterns to copy: hydraissue (#995, v1.19.0) and hydraorganization (#596). hydravenues is a third shape, per-venue access on #545.

THE DECISION THAT COMES FIRST: one door in hydrawebcomponents, or seven copies

Every one of these consoles already borrows its login, logout and RequireWebAuth from hydrawebcomponents. hydraissue had to step around that package to get an iamnim door, and a second service doing the same means the shared component owns the door nobody uses any more.

The case for putting the iamnim door IN hydrawebcomponents: it is where the login already lives, it is one change instead of seven, and every future console then starts behind iamnim rather than behind a password that somebody has to remember to retire.

The case against, and it is real: these seven sit on FOUR different hwc versions, from v0.2.0 to v0.6.1. A shared door means each consumer takes a version bump and a release, so the work does not disappear, it moves. A copy per service is more code but no coupling.

The owner picks. Everything below assumes the shared door, and is a copy per service otherwise.

WHAT A CHILD LOOKS LIKE

Taken from #995, which is the worked example:

  1. Sign-in routes: GET /login redirects to the identity service with redirect_uri pointing back at /authed; GET /authed moves the returned token into an HttpOnly, Secure, SameSite=Lax cookie and redirects in ONE hop, carrying Referrer-Policy: no-referrer and Cache-Control: no-store, and never logging that query string; POST /logout clears it. The one-time code exchange that would remove the query parameter is #591, upstream and still not built.
  2. Authorization is membership of an organization. NOT the Pantheon administrator flag: it names exactly one email per organization, so it admits one account and locks out the others the same person signs in with.
  3. Every refusal ends on a PAGE, never on another trip to sign-in: a missing membership, a session the identity service forgot when it restarted, a browser that kept no cookie, and an identity service that does not answer. That last loop is what made the hydraorganization dashboard look like a page that never loads (#644).
  4. The console password is deleted from the config type, the example config, the runbook and the testbooks. No break glass: that was the owner ruling on #995, and the API bearer is what stays usable when the identity service is down.
  5. Tests against a stand-in identity service, plus a runbook section and a testbook. hydraissue has all three to copy, including scripts/localidentityservice, which exists because the real service will not hand a session to a loopback port.

OPEN, PER CONSOLE

  • WHICH ORGANIZATION gates each one. hydraissue uses experiencenet, the Hydra organization. A console that watches one venue or one customer may want a different slug, and hydravenues (#545) already shows a per-venue shape.
  • WHETHER the three consoles with no live domain are still wanted at all. Retiring a console is cheaper than gating it.
  • hydraexperiencelibrary is on hwc v0.2.0 and also carries #795, which is the MACHINE door (token classes for its API consumers). Different concern, same service: do not let one close the other.

ACCEPTANCE FOR THE MASTER

No Hydra console serves a password form, every live console redirects an anonymous visitor to the identity service, and no admin_token remains in any of these repos' config types or example configs.

Comments (1)

claude-code 24 Oct 2026 16:22

Precedent for this master: #995 shipped the same change on hydraissue as v1.19.0 on 2026-10-24. The code to copy is internal/iamnim/client.go, internal/api/handlers_auth.go, internal/web/templates/noaccess.html and internal/api/handlers_auth_test.go, with the runbook Authentication section and docs/testbooks/admin-sign-in.md alongside them. About 250 lines in all.