Replace host tokens with host pairing

Hosts join the cluster by running the installer, which shows a code and
waits until the request is approved under Hosts > Add host in the web
interface or with clusterioctl host approve. An admin can pass their
user token to the installer to approve the host right away. The token
is only used for that and is not saved.

The controller only accepts hosts that have a record, and only
approving a host creates one. Revoking a host deletes its record, so
its token can no longer be used to reconnect. Hosts that have connected
before keep working.

Removes host generate-token, revoke-token and create-config from
clusterioctl, bootstrap generate-host-token, the host token messages and
the core.host.generate_token, revoke_token and create_config
permissions, which are also stripped from stored roles. Adds
clusterioctl host pending, approve, reject and revoke, and the
core.host.approve and core.host.revoke permissions.

Standalone installs add the host to the controller database directly,
since the controller is not running during the install.
This commit is contained in:
Danielv123 committed 2026-10-30 06:11:32 +01:00
1 parent fa2883d74e
commit 87d4f5c64e
49 files changed
+4855 -473

No files matched your search

+8 -11
View File
@@ -196,19 +196,16 @@ export const corePermissions = [
grantByDefault: true,
},
{
name: "core.host.generate_token",
title: "Generate host token",
description: "Generate tokens for hosts to connect to the cluster with.",
name: "core.host.approve",
title: "Approve hosts",
description:
"List, approve and reject requests from host installers to join the cluster, and approve hosts " +
"directly by passing a token to the installer. Approving gives the new host full access to the cluster.",
},
{
name: "core.host.revoke_token",
title: "Revoke host token",
description: "Revoke access token and terminate existing connection for hosts.",
},
{
name: "core.host.create_config",
title: "Create host config",
description: "Create host configs via the controller.",
name: "core.host.revoke",
title: "Revoke hosts",
description: "Remove hosts from the cluster, disconnecting them and making their access tokens invalid.",
},
{