The admin web side of this tracker is gated by one static password, server.admin_token in config.yaml. Anybody who holds that string is an admin, the string is shared, and it names nobody. Standing rule #238 says every operator console must sit behind iamnim SSO, and that static console tokens are retired, not kept as a second door.
OWNER RULING: no break glass. The token login goes away completely. There is no fallback password and no bearer door into /admin.
WHAT CHANGES
- internal/iamnim/client.go: a client for the identity service with Me, Memberships and ErrUnauthorized. A fourth copy after hydramancer, hydraperforceprovision and hydraorganization, which is what #596 scoped. Extracting a shared package stays separate work.
- Sign-in routes, following hydraorganization (#596):
- GET /login redirects to /login?redirect_uri=https://issues.experiencenet.com/authed
- GET /authed reads ?token=, moves it into an HttpOnly Secure SameSite=Lax cookie, and redirects in one hop to /admin?signedin=1 so no credential stays in the address bar, in history or in a Referer header. Referrer-Policy: no-referrer and Cache-Control: no-store on that response. The query string is never logged.
- POST /logout clears the cookie.
The one-time code exchange is still not built upstream (#591), so ?token= scrubbed in one hop is what the identity service offers today.
- Authorization is membership of the Hydra organization, slug experiencenet. is_admin is NOT used: it names exactly one email per organization, so gating on it would admit cederik@hydrahardware.io and lock out cederik@cederik.com. A signed-in person without that membership gets a plain no-access page, not a redirect loop.
- server.admin_token is deleted from the config type, the example config and the docs. api_token is untouched: the identity service is the person edge and machines keep their bearer.
- Two loops that cost real time on #644 are closed here by design: a cookie the browser refuses, and a session the identity service rejects after it restarts. Both end on a page that says what happened, never a bounce back to sign-in.
ACCEPTANCE
- GET /admin with no cookie redirects to /login, and /login redirects to the identity service with the right redirect_uri.
- A member of experiencenet lands on /admin signed in. A signed-in non-member gets 403 and a readable page.
- /authed carries Referrer-Policy: no-referrer and Cache-Control: no-store, and no session value appears in any URL after the hop.
- No password form is served anywhere, and admin_token appears nowhere in the tree.
- The public side, the report form and the API keep working exactly as before. Venue floor reports are untouched.
- Runbook and testbooks updated.
ROLLBACK: hydraskin update hydraissue --tag --apply on pi-node-004-nvme.
SHIPPED v1.19.0, live on the scale since 15:48 UTC.
VERIFIED ON THE LIVE SERVICE
VERIFIED BEFORE THE RELEASE, locally and in tests
STILL TO DO, and it needs a human: sign in once in a real browser as a member of experiencenet and walk the six live checks in docs/testbooks/admin-sign-in.md. A session cookie is a browser behaviour, and curl is not a browser.
ROLLBACK, if that sign-in does not work: hydraskin update hydraissue --tag v1.18.0 --apply on node-50ab5309 (pi-node-004-nvme). That reinstates the console password, since v1.18.0 predates this change.