Skip to content

Enrollment tokens

The enrollment token is the invitation code as the node sees it. It is minted by an operator, placed where the node can read it, and consumed once on first start.

flowchart LR
  M["Mint<br/>operator, control plane"] --> INJ["Inject<br/>node-local file"]
  INJ --> C["Consume<br/>node, first start"]
  C --> S["Seed written<br/>/var/lib/xratu/identity"]

Minting

Two commands mint the same credential and differ only in what they print.

xratu dataplane invitation create acme edge-eu
{
  "status": "issued",
  "organization": "acme",
  "tenant_scope": "6f2a7c3e-1b54-4a29-9f0d-7c83b1e5a412",
  "dataplane_pool": "edge-eu",
  "invitation_code": "...",
  "expires_at_epoch": 1789012345,
  "ttl_seconds": 900
}
xratu dataplane invitation token acme edge-eu

The token form prints the bare code on stdout and nothing else, which is what makes it usable in a pipeline:

xratu dataplane invitation token acme edge-eu > /tmp/invitation.code

Both mint a new credential. Running token after create does not retrieve the earlier code; it issues a second invitation.

Injecting

The node reads its invitation from a node-local file. The install contract generates the manifests that place it, mapping one invitation per node label so a multi-node installation gets one code each. See The install contract.

Treat the file as a secret for its lifetime. It admits a node into your organization, and it is valid until it is consumed or expires.

Consuming

On first start the node reads the code and exchanges it, sending its installation identity, its instance identity, and its node label. What comes back is the bootstrap seed, written under /var/lib/xratu/identity:

Seed field What it carries
actor_id, auth_token The runtime identity the node now authenticates as
dataplane_uuid, dataplane_installation_uuid, dataplane_instance_uuid The identity set
enrollment_uuid The enrollment this node belongs to
dataplane_label The node label
invitation_scope The organization and pool it joined
discovery Trust bundle revision and digest, control plane instance and identity revision, protocol versions, and the tenancy policy it was admitted under
initial_watch_revision Where the node starts reading assignments

The discovery block is the pin. It records the exact terms the node joined under, which is what a later drift check compares against.

After consumption

The code is spent. A second presentation is refused as replayed, and the node does not need it again: the seed is now what authenticates it, and the runtime credential inside the seed is refreshed on its own schedule rather than by re-reading the invitation.

Remove the injected file once the node is enrolled.

Next