Relay principal enrollment
ADR 0007 adds a control-plane operation for registering client-generated, pseudonymous data-plane principals. It does not change submit, replay,...
Repository-relative paths and “this checkout” refer to the Konclave source repository, not this website. The source link above identifies the exact revision used here.
On this page
ADR 0007 adds a control-plane operation for registering client-generated, pseudonymous data-plane principals. It does not change submit, replay, acknowledgment, watch, routing, or MLS authorization.
Self-hosted bootstrap
Community Relay access documents support version 2:
{
"version": 2,
"principals": [],
"enrollment": {
"authority": "<base64url-sha256-enrollment-verifier>"
}
}authority is the unpadded base64url encoding of the 32-byte,
domain-separated verifier derived from a random 32-byte enrollment credential. It is
not the credential itself. Version 1 documents remain valid with static principals
and enrollment disabled. Version 2 must configure at least one static principal or an
enrollment authority.
The raw enrollment credential belongs in native credential custody or an explicit headless secret source. It must not appear in the access document, process arguments, environment variables, URLs, logs, or plugin configuration. Replacing or removing the verifier and restarting the relay rotates or disables enrollment. Existing data-plane principals remain independently active or revoked.
The packaged CLI creates both bootstrap files without printing the credential:
konclave relay-bootstrap --relay-endpoint https://relay.example.com --access-document ./relay-access.json --external-source /run/secrets/konclave-enrollmentOmitting --external-source uses native operating-system custody and initializes the
default shared profile root. Supplying an external source is the Unix headless path;
a later konclave init validates and adopts it without stdin or secret copy/paste.
Client installation source
The daemon reads the non-secret relay-installation.conf file once from the shared
profile root. The bounded strict format selects the normalized relay endpoint and
exactly one protected source:
version=1
relay_endpoint=https://relay.example.com/
enrollment_source=native
installation_id=<installation-id>Unix headless installations use enrollment_source=external_file plus an absolute
credential_path to a permission-restricted secret mount containing the
endpoint-bound binary credential record. Native installation identifiers resolve
only inside the dedicated relay-enrollment keyring service; they cannot address
profile wrapping-key entries. Both source forms authenticate the normalized endpoint
before exposing bearer bytes. A missing, malformed, wrong-length, unavailable, or
endpoint-mismatched source fails startup; there is no environment, anonymous,
generated-authority, or shared data-plane fallback.
External records must be regular files owned by the daemon account, have one hard link, and grant no group/other permission bits. Reads and creates reject symbolic links. Windows installations use native credential custody because a portable owner-only DACL verifier is not part of the initial external-source adapter.
Profiles with an existing sealed relay credential do not reopen the installation source. A new profile generates and seals its own data-plane credential and request identity before the first outbound registration. Failed registration restarts reopen that exact intent; successful registration atomically promotes it and removes the pending journal.
HTTP contract
The authenticated endpoint is:
POST /v1/enrollment/principals
Content-Type: application/protobuf
Authorization: Bearer <enrollment-credential>Authentication uses the enrollment-specific derivation domain and occurs before request-body materialization. A data-plane token cannot authenticate enrollment, and an enrollment credential is not automatically a data-plane principal.
The bounded RelayEnrollmentRequest carries:
- protocol version;
- a stable 16-byte request identifier; and
- the 32-byte ADR 0003 principal digest derived from a client-generated data-plane token.
It never carries the raw token, profile identity, route, requested permission, account
identity, or hosted-provider field. Community Relay assigns its fixed self-hosted
wildcard send, replay, and acknowledge policy. Other deployments may implement a
different enrollment-authentication adapter while returning the same public outcome.
The response echoes the exact version, request identifier, and principal digest. Its
outcome is REGISTERED for a new commit or ALREADY_REGISTERED for an exact retry.
Reusing either identifier with a different counterpart is a conflict.
Status and error behavior
Wide tables scroll horizontally.
| Outcome | HTTP status | Stable error code |
|---|---|---|
| Registered | 201 | — |
| Exact retry | 200 | — |
| Missing, malformed, wrong, or disabled enrollment credential | 401 | relay_authentication_failed |
| Unsupported media type | 415 | unsupported_media_type |
| Malformed, oversized, or unsupported protocol | 400/413 | protocol validation code |
| Request/principal identity conflict | 409 | relay_enrollment_conflict |
| Principal capacity exhausted | 429 | relay_principal_capacity |
| Enrollment request rate exhausted | 429 | relay_enrollment_rate_limited |
| Enrollment concurrency exhausted | 503 | relay_enrollment_capacity |
| Storage unavailable | 503 | relay_storage_failure |
Enrollment permits at most eight concurrent handlers and sixteen authenticated requests per one-second window. The durable registry independently caps 1,024 active principals and 4,096 total active/revoked records.
Data-plane activation and revocation
A successful registration makes the generated principal independently usable on the unchanged data plane. Authorization is checked from durable state on each operation; revocation therefore denies later HTTP operations and replay work without changing another profile’s principal. Revoked records remain as tombstones and cannot silently re-enroll under the same identity.
The relay stores only request identifiers, principal digests, finite status, ordinary opaque envelope metadata, and ciphertext. Raw enrollment credentials and data-plane tokens are absent from relay SQLite, WAL, responses, diagnostics, and telemetry.
References
Content: Konclave,Apache-2.0. Revision: 8d0d3676e9fc746749a4fc04ddeb4499023c4104.