Skip to content

Entities and Capabilities

Registration

  1. An entity signs a registration with its DID, type, plane, scope, capabilities, metadata, address and certificate.
  2. The registry checks signature, age and address.
  3. The capability verifier checks that the certificate chains to a trusted root and matches key, type and scope, and evaluates the capability policy.
  4. The registry writes the entity to the ledger, and it becomes active.

Entities register at start: first as a dry run (?dry_run=true), then for real. They send heartbeats every two seconds.

Capability policies

Policies are CEL expressions for each entity type in capability-policies.json:

{
  "controller": "plane == 'compute' && has(capabilities.actions) && capabilities.actions.all(a, a in ['kv.put', 'kv.delete']) && size(capabilities.actions) > 0",
  "auditor": "plane == 'compute'"
}

Variables are capabilities, metadata, plane, scope and entity_type. A type without a policy cannot register.

Add an entity

Create its wallet and certificate:

bash -c '. deploy/scripts/lib.sh; load_env; docker run --rm --network none -u "$(id -u):$(id -g)" \
  -e WALLET_PASSPHRASE -v "$STATE:/out" dcompute:dev dctl issue -state /out -name controller-4 -type controller -scope default'

Start a container with the new wallet directory as in the Compose file.

Status

Status Meaning
active Takes part
inactive Removed. Can register again
revoked Excluded by evidence. Permanent

Type and scope of an entity cannot change.