Part of #352. Heavily simplified by the cookie-auth model (was: #user login + pasted ACM key).
A dedicated ACM-mode ChCtx/session — no login form, no token, no key persistence.
Scope
- Read context from URL:
cluster and node query params (supplied by the ACM console link). No cluster URL→id resolution.
- Cookie auth: all
/api calls credentials:'same-origin', no auth header. A 401 = ACM session lost → redirect to ACM login (standard), not our concern to refresh.
- Identity:
GET /api/account → engineer email, used as CH user= for query_log attribution. Model engineer-identity (from /account) separately from CH transport login (may be a returned login, else the email) and never assume they're the same.
- Temp CH credential lifecycle: mint via
GET /api/cluster/{id}/support/credentials; read TTL from the response (don't hardcode); keep alive via /support/refresh or re-mint; single-flight so concurrent schema/dashboard requests don't mint in parallel. Handle both documented shapes ({password,ttl} / bare string / {login,password}).
Removed vs. original
#user sentinel, ACM key in a password field, Chrome-password-store, no-localStorage/share-link/export rules for the key — there is no key in JS anymore.
Acceptance
Part of #352. Heavily simplified by the cookie-auth model (was:
#userlogin + pasted ACM key).A dedicated ACM-mode
ChCtx/session — no login form, no token, no key persistence.Scope
clusterandnodequery params (supplied by the ACM console link). No cluster URL→id resolution./apicallscredentials:'same-origin', no auth header. A 401 = ACM session lost → redirect to ACM login (standard), not our concern to refresh.GET /api/account→ engineer email, used as CHuser=forquery_logattribution. Model engineer-identity (from/account) separately from CH transport login (may be a returnedlogin, else the email) and never assume they're the same.GET /api/cluster/{id}/support/credentials; read TTL from the response (don't hardcode); keep alive via/support/refreshor re-mint; single-flight so concurrent schema/dashboard requests don't mint in parallel. Handle both documented shapes ({password,ttl}/ bare string /{login,password}).Removed vs. original
— there is no key in JS anymore.#usersentinel, ACM key in a password field, Chrome-password-store, no-localStorage/share-link/export rules for the keyAcceptance
currentUser()is the engineer email.