Skip to content

fleet secrets list: secrets-broker still returns HTTP 502 from a tailnet-connected grok seat #12885

Open

Description

@dezren39

Summary

From a grok fleet seat that has completed the tailnet phase, fleet secrets list still fails with a secrets-broker HTTP 502. This was first seen during enrollment when the tailnet had not yet come up (#12858 noted it as unresolved pending a restore-free resume). The retest after tailnet still fails, so this is not just a missing laptop route.

Reproduction

On the grok seat (tailnet up as muse-grok, kernel mode; laptop probe succeeded over a direct Tailscale path; laptop agent port answers):

fleet secrets list
# exit 3
# fleet secrets: secret "names" unavailable via secrets-broker: secrets-broker answered HTTP 502

fleet secrets list talks only to the secrets-broker cache (names only). The check-phase fleet secrets get tailscale.auth-key succeeded via the bws fallback (check: fleet secrets resolve). Pre-tailnet, fleet secrets get of other names hung until killed (no broker timeout engaging a fallback in that path).

Also still missing on this seat (may be a consequence of the broker being unreachable for list, or a separate provisioning gap):

  • ~/tools/queue-broker-token
  • ~/tools/laptop-agent-token

Doctor after tailnet + GH_TOKEN: github leg passes; queue leg fails with cannot read token file ~/tools/queue-broker-token; shell leg fails with laptop-agent-token unreadable; bridge hello/inbox still gives no answer within 45s.

Related

No secret values are included in this report.

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Diagnosis from the archer/laptop side (2026-11-23)

    The broker is up and the 502 is specific to this seat. Root cause, with evidence:

    1. fleet secrets list has exactly one route, and it names a token file this seat does not have.
    list is served only by the broker leg (no bws fallback — only get has one). The request goes through the seat's local session broker to laptop port 4800 and names ~/tools/secrets-broker-token as the file whose contents the broker sends as X-Agent-Token (DEFAULT_SECRETS_TOKEN_FILE in fleet-config). The session broker synthesizes HTTP 502 for any failed request (its handler catches every exception and answers {"status": 502, ...}), and reading the named token file is the first step of its request path — a missing file is a 502, not a clean "missing file" error.

    2. The token files were never provisioned on this seat — by any code path.
    Verified from the laptop repo (main @ 6ceb906): scripts/muse/bootstrap.sh contains no reference to secrets-broker-token, queue-broker-token, or laptop-agent-token. On the archer seat all three exist (65 bytes, 0600) only because bootstrap's restore phase brought back the old sandbox ~/tools from restic. Each archer file's sha256 is identical to the corresponding laptop server file (~/.config/secrets-broker/token, ~/.config/queue-broker/token, ~/tools/laptop-agent-token on the laptop; hashes compared, values never printed). The grok resume correctly skipped restore — and with it the only (accidental) provisioning path. Full write-up filed as #12898.

    3. Bitwarden is not a fallback for these files.
    No BWS name exists for the queue-broker or laptop-agent tokens, and the value under BWS name secrets-broker.token does not hash-match the secrets-broker client token file. fleet secrets get succeeding via bws (as in the check phase) does not extend to list.

    What completes this leg on the grok seat (operator-side copy, then verify):

    # on the laptop: copy the three server token files to the grok seat
    # (adjust the remote user/host if the seat's ssh differs)
    scp ~/.config/secrets-broker/token box@muse-grok:~/tools/secrets-broker-token
    scp ~/.config/queue-broker/token    box@muse-grok:~/tools/queue-broker-token
    scp ~/tools/laptop-agent-token      box@muse-grok:~/tools/laptop-agent-token
    # on the grok seat:
    chmod 600 ~/tools/secrets-broker-token ~/tools/queue-broker-token ~/tools/laptop-agent-token
    fleet secrets list   # should list the broker's cached names

    If scp into the seat is unavailable, the seat stays blocked on the distribution-route decision in #12898 — there is no in-band fetch for these tokens today.

    No secret values are included in this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions