Skip to content

feat(install): self-check probe that an SLM-issued session verifies at the backend (the JWT-secret invariant #16333 relies on) #20751

Open

Description

@mrveiss

Why

From #16333 (owner ruling b), the internal service key no longer makes a caller an admin. The SLM frontend's backend calls through the SLM proxy therefore rely on the SLM admin's own token verifying at the backend. That token is SLM-minted HS256 under SLM_SECRET_KEY, and the backend verifies HS256 under AUTOBOT_JWT_SECRET.

Deploy makes the two secrets the same value by design:

  • roles/backend/templates/backend.env.j2:50-51;
  • docker/with-secrets.sh:31-34.

But nothing checks that they match on a running install. Before #16333 the key masked a mismatch. After it, a mismatch turns every SLM view that reads the backend into a 401. The backend names the likely cause in one warning line (#16333).

What

A probe in the install self-check runner (#20474):

  1. Mints a short-lived SLM-style token for the probe, verifies it at the backend, and reports pass or fail by name, for example "SLM sessions are not accepted by the backend: the SLM and backend JWT secrets differ".
  2. Never prints, logs or stores either secret, or a hash prefix of it.
  3. Runs from the builtin updater's self-check, the same path an operator reaches in the maintenance UI.

Acceptance criteria

Blocked by #20447 (the runner, built in PR #20474).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions