Skip to content

Mint an invitation and enrollment token

What you will end up with

A single-use invitation code scoped to one organization and one pool, ready to place where a node will read it.

Prerequisites

export ORG=acme
export POOL=edge-eu
xratu auth whoami | jq -e '.actor_id != "system"' >/dev/null && echo "actor resolved"

Before you mint

An invitation carries a lifetime of 900 seconds by default and is bound to the organization's current governance revision. Two things follow:

Mint close to use. The code expires, and until it does it is a live admission credential.

Reconcile first if you are going to. Every reconcile advances the governance revision and makes outstanding invitations unredeemable. See Bootstrap reconcile.

1. Mint the invitation

xratu dataplane invitation create "${ORG}" "${POOL}"

Expected output

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

invitation_code is the enrollment token. Capture it now, because it is not retrievable afterwards and minting again issues a different one.

2. Or mint the bare token

For a pipeline that needs only the code:

xratu dataplane invitation token "${ORG}" "${POOL}" > /tmp/invitation.code

This prints the code on stdout with no surrounding JSON. It mints a new invitation; it does not print the one from step 1.

Pick one of the two steps rather than running both, or you will leave an unused live credential outstanding.

3. Verify what you minted

Check the scope and the remaining lifetime before you place the code:

INVITE=$(xratu dataplane invitation create "${ORG}" "${POOL}")
echo "${INVITE}" | jq '{organization, dataplane_pool, ttl_seconds, expires_at_epoch}'
echo "${INVITE}" | jq -r '.invitation_code' > /tmp/invitation.code

Confirm it has not expired before the node starts:

echo "${INVITE}" \
  | jq -e --argjson now "$(date +%s)" '.expires_at_epoch > $now' >/dev/null \
  && echo "invitation still valid"

4. Place it where the node reads it

The install contract generates the manifests that inject one invitation per node label. See The install contract.

Treat the file as a secret, and remove it once the node has enrolled.

If it fails

The CLI projects failures with a reason code and a hint naming the next command:

{
  "status": "error",
  "status_code": 409,
  "reason_code": "DATAPLANE_ENROLLMENT_DISCOVERY_REQUIRED",
  "reason_message": "bootstrap join blocked: tenant enrollment governance is not reconciled",
  "reason_hint": "tenant enrollment bootstrap authority is not reconciled; run `xratu bootstrap reconcile <organization_name>` and retry invitation create"
}
reason_code Cause Fix
DATAPLANE_ENROLLMENT_DISCOVERY_REQUIRED The organization's governance is unreconciled xratu bootstrap reconcile "${ORG}"
DATAPLANE_ENROLLMENT_TRUST_CHAIN_INVALID The organization's authority is stale Reconcile, then mint again
DATAPLANE_ENROLLMENT_POOL_NOT_FOUND The pool does not exist in this organization xratu dataplane pool create "${ORG}" "${POOL}"
DATAPLANE_ENROLLMENT_TENANT_SCOPE_NOT_FOUND The organization has no record Check with xratu get organizations
DATAPLANE_ENROLLMENT_TENANT_SCOPE_FORBIDDEN The actor holds no binding in the organization Have an owner bind you
DATAPLANE_INVITATION_SCOPE_RESOLUTION_FAILED The organization name did not resolve locally The organization does not exist, or you cannot see it

Two failures arrive before the organization is examined at all: 403 forbidden: non-system bootstrap operator actor required means the request resolved to the system actor, and a quota refusal means the deployment or the organization is already at its limit. See Tenant-scoped bootstrap authority.

What changed

Object State
Invitation One issued, single-use, scoped to the organization and pool
Governance revision Stamped onto the invitation
Quotas Checked at mint, and checked again at exchange
Audit system.dataplane_enrollment.invitation.create recorded

Next

The node performs the exchange on first start. Manage an enrollment over its life covers inspecting and operating the enrollment that results.