Entities and Capabilities¶
Registration¶
- An entity signs a registration with its DID, type, plane, scope, capabilities, metadata, address and certificate.
- The registry checks signature, age and address.
- The capability verifier checks that the certificate chains to a trusted root and matches key, type and scope, and evaluates the capability policy.
- 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.