Skip to content

[M2.7c] Web: servers, join tokens and confirmed removal - #170

Merged
samuelmbabhazi merged 3 commits into
mainfrom
feat/m2.7c-servers-screen
Nov 6, 2026
Merged

samuelmbabhazi merged 3 commits into
mainfrom
feat/m2.7c-servers-screen

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

What changed

M2.7c, plus server removal with confirmation (part of M2.5b): a servers screen, reached from the organization page ("Manage servers").

  • List: name, status as observed (ready, suspect, down… with color and the literal label), and capacity from the agent's facts (4 CPU, 8 GiB).
  • Adding a server:
    • re-authentication with the password, plus a code if MFA is enabled;
    • the join token is shown once, with a copy button (explicit gesture) and its expiry;
    • the setup steps: save the token in a root-only /etc/shipkeep/join-token via stdin (never on a command line or in shell history, per SPEC 3.2), write agent.yaml, start the agent.
    • The configuration shown holds the gateway address and the CA fingerprint, never the token.
  • Removing a server: an inline danger section. The button stays disabled until the exact name is typed. The UI then requests a single-use confirmation token (node.remove for this node, checked server side) and removes the server with it.
  • API: JoinTokenIssuedDto.gatewayAddress is AGENT_GATEWAY_SERVER_NAME (the name agents verify in the gateway certificate) with the gateway port. OpenAPI and the client are regenerated, and the integration test checks the new field.
  • Docs. SPEC 3.2 and the PLAN: M2.7c done. M2.5b's shared dialog will come with the volume, database and environment screens.

How it was tested

  • New servers-page.spec.ts:
    • list, status and capacity;
    • a join token with the exact body: the token is shown, the configuration has the address and fingerprint but not the token, and the password never appears on the page;
    • removal: the button stays disabled until the exact name is typed, then exactly two requests go out (confirmation with action, target and name, then removal with that token), and the list empties.
  • Web: 62 tests; API: 279; lint, typecheck and build pass. The local gate passes.

Security considerations

  • Join tokens are shown once and kept out of argv, configuration files and logs.
  • Removal stays protected server side by the confirmation token (rule 7). The typed name is only a UI guard on top of it.

The web UI needs it for the agent's control_plane.address: the gateway
server name agents verify, with the gateway port.

Signed-off-by: Samuel Mbabhazi <[email protected]>
The servers page lists nodes with status and capacity, issues a join
token after password (and code) re-authentication and shows it once
with the agent configuration, and removes a server only after its exact
name is typed, through a single-use confirmation token.

Signed-off-by: Samuel Mbabhazi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant