Approvers is part of the TKeeper core. Every peer stores immutable credential versions in its
own database. The API registers SIGNATURE credentials with installed signature providers
(including PQC where installed) and WEBAUTHN credentials through a verified ES256 ceremony.
Send requests to an initialized peer after unsealing it. Non-coordinators accept registry requests too.
| Operation | Permission |
|---|---|
POST /v1/keeper/approvers |
tkeeper.approvers.register |
POST /v1/keeper/approvers/webauthn/registration/options |
tkeeper.approvers.register |
POST /v1/keeper/approvers/webauthn/registration/finish |
primary authentication and registration invitation. No additional permission |
GET /v1/keeper/approvers |
tkeeper.approvers.read |
GET /v1/keeper/approvers/{ref} |
tkeeper.approvers.read |
PUT /v1/keeper/approvers/{ref}/metadata |
tkeeper.approvers.metadata |
These permissions are independent. Registration returns the registered record, but does not
grant access to list or read other versions. Metadata updates return the updated record.
Primary authentication is required for every endpoint. In production, send a JWT in
X-JWT-TOKEN, including on WebAuthn finish. Finish also requires its single-use invitation.
Operation mandates cannot authorize registry calls or replace that JWT.
Register a credential
{
"id": "alice",
"credential": {
"type": "SIGNATURE",
"algorithm": "ED25519",
"publicKey64": "11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo="
},
"metadata": {"team": "treasury", "displayName": "Alice"}
}
id is case-sensitive and matches [A-Za-z0-9][A-Za-z0-9._-]{0,127}. The server validates
and re-encodes the public key with its algorithm provider, then computes:
digest = SHA256(UTF8("TKEEPER_APPROVER_V1") || 0x00 || canonicalJson(normalizedCredential))
ref = id || "@sha256:" || lowercaseHex(digest)
The normalized credential contains version: 1, type, canonical algorithm, and publicKey64.
Canonical JSON sorts object keys recursively. The example's ref is
alice@sha256:65c61b68b633767fa1f7666832f3967a8d4d83b8fdd1ac4a62f3b127e985ef1f.
Metadata, id, and timestamps are excluded from the digest.
A key identity combines the canonical algorithm with the normalized public-key fingerprint. Identical byte encodings on different curves represent distinct keys.
A new version returns 201. An identical version under the same id returns 200 with its
existing metadata. The same normalized key under another id returns 409. A different key
under the same id creates another version and retains the previous versions. The API does not provide endpoints to update or delete descriptors.
Registration does not make the credential an authorized approver. A key's FourEye policy or
an OCI authority policy must explicitly pin its complete ref. Both SIGNATURE and WEBAUTHN
descriptors are supported. Existing inline FourEye policies use the same request format and checks.
Pin a registered approver in a policy
Use {"ref":"alice@sha256:<digest>"} as an element of fourEye.keys. An Edict authority declares its own approver:
approver treasury {
type = "reference"
id = "treasury"
ref = "alice@sha256:<digest>"
}
Use the complete ref returned by registration. A policy can require 1 of [treasury] conditionally, or use default require treasury for a reviewed fallback. See Edict approvals.
Each participant must resolve the target refs before CREATE/REFRESH/ROTATE, including unused authority approvers reserved for later rules. Resolution reads the local replicated registry and verifies descriptor integrity and digest. Missing descriptors fail closed. There is no lookup by bare id, latest, URL, metadata, or a key supplied in a proof. Duplicate keys are rejected after resolving inline entries and refs together. A WebAuthn ref accepts WebAuthn assertions only.
Authority groups use threshold: m and a list of n approver aliases. Key-bound policies use
fourEye.m, fourEye.n, and fourEye.keys, with 1 <= m <= n <= 256. A threshold of 1
requires one valid proof from any of the configured approvers, including a 1 of 1 policy:
{
"fourEye": {
"mode": "LENIENT",
"m": 2,
"n": 3,
"keys": [
{"ref": "alice@sha256:<digest>"},
{"ref": "bob@sha256:<digest>"},
{"ref": "carol@sha256:<digest>"}
]
}
}
LENIENT requires these approvals for ROTATE, REFRESH, and generation destruction. STRICT
also protects signing and decryption. Initial CREATE has no existing key policy. A policy supplied
during CREATE protects subsequent operations. Key-bound and authority approval groups are cumulative.
The original policy retains the literal ref in its signing hash. A new version or metadata update does not change an existing policy. Changing a pinned ref requires REFRESH/ROTATE authorized by the current policy. Historical generations retain their exact refs. Existing policies remain usable for signing while a registry write is waiting for peers. Recovery and MONO promotion transfer the registry before the affected keys are made usable.
Register WebAuthn from a hub
Configure the same RP on every peer. The origins identify the approval hub frontend, independently of the Keeper API hostname. RP parameters are never inferred from Host or Forwarded headers.
keeper.webauthn {
enabled = true
rp-id = "approvals.example.com"
rp-name = "Keeper approvals"
origins = ["https://approvals.example.com"]
registration-ttl = 5m
}
Registration is turned off by default and requires the P256 platform. HTTPS origins must be exact origins under the RP ID: no wildcard, path, credentials, query, or fragment. Explicit HTTP localhost configuration is allowed for development. Origins are pinned in sorted order in each descriptor.
Send {"id":"alice","metadata":{"team":"treasury"}} to the options endpoint. Its response is
{registrationId, invitation, expiresAt, publicKey}. publicKey is standard JSON creation options: binary fields
are unpadded Base64url. Convert challenge, user.id, and excludeCredentials ids to browser buffers
before navigator.credentials.create({publicKey}), or use the browser's JSON options parser.
Creation options contain a fresh 32-byte challenge and a random user handle.
The server requests ES256 with required user verification. Known credentials for this
id/RP appear in excludeCredentials.
The response includes X-EXPIRES-AT, the session deadline as a Unix timestamp in
whole seconds. The JSON expiresAt field remains in milliseconds.
Send the resulting browser credential JSON to finish:
{"invitation":"<returned invitation token>","credential":{
"id":"<base64url>","rawId":"<same base64url>","type":"public-key",
"response":{"clientDataJSON":"<base64url>","attestationObject":"<base64url>","transports":["usb"]},
"clientExtensionResults":{}
}}
Standard browser-derived response fields and the requested credProps extension are accepted.
The public key and credential ID used by Keeper come from verified attestation data, with an
explicit check that the attested ID equals id/rawId. There is no client-supplied descriptor override.
UV/UP, challenge, exact origin, RP hash, COSE algorithm/key and attestation are checked by the
Yubico verifier. Private/unknown COSE key parameters, malformed encodings, duplicate JSON/CBOR
keys, cross-origin responses and unrequested client extensions are rejected.
The registrar starts the ceremony with tkeeper.approvers.register, then passes the invitation
and browser options to the intended credential holder. The holder sends their own valid JWT
and the invitation to finish, possibly through another peer. No registry permission or match
with the registrar's JWT subject is required. The writer independently checks a forwarded JWT.
The session pins the registrar, target id,
metadata, RP, origins, algorithm, and deadline. Use the returned invitation to finish enrollment.
The public registrationId identifies the session and cannot authorize finish. The registrar's
app creates the enrollment link and delivers it to the intended holder.
A session defaults to five minutes (maximum ten). Each registrar can have eight unfinished sessions and the writer retains at most 256 unexpired sessions. Capacity exhaustion returns 429.
Finish returns 201 for a new version and 200 for an identical successful retry within the
session deadline. A different
response for a completed session is rejected. Completed enrollment survives writer restarts.
A failed verification leaves an otherwise valid invitation available for another attempt.
Recovery and promotion preserve enrollment sessions and their consumption state. Treat the invitation as a bearer
secret: any authenticated holder can enroll a credential for its pinned id. The recipient's
JWT does not change that id or establish that the registrar intended this holder.
Registration does not grant approval rights. A policy must explicitly pin the resulting ref.
The deadline limits enrollment checks and new confirmations from peers. A change already confirmed by every member can still be delivered after that deadline. Partial signed reservations retain locks for their keys, credentials, and metadata until coordinated settlement. TTL does not release those locks or permit a conflicting registration.
The WebAuthn descriptor contains version/type, credentialId, canonical public ES256 COSE key,
rpId, sorted origins, userVerification: REQUIRED, userHandle and backupEligible. Every field
enters its digest. (rpId, credentialId) is unique. The normalized P256 key shares its owner index
with SIGNATURE keys, so switching formats cannot acquire another owner's key.
Read and filter
Pass the complete URL-encoded ref in path parameters, such as alice%40sha256%3A<digest>.
Bare ids and shortened or uppercase hashes are invalid.
The list response is {items, nextCursor}. Supported filters are id, type=SIGNATURE|WEBAUTHN,
and exact string matches such as metadata.team=treasury. Multiple metadata filters combine
with AND. URL-encode both parameter names and values. The response includes each matching version.
There is no implicit latest version.
limit defaults to 50 and must be between 1 and 200. Pass the returned nextCursor as cursor
with the same filters. Versions sort by full ref. Pagination is not a snapshot: concurrent
registrations or metadata updates can change subsequent pages. nextCursor is null on the last page.
Replace metadata
Registration, exact reads and metadata updates return metadataRevision and a matching quoted
numeric ETag. To replace metadata, send the current value as If-Match, such as "1":
{"metadata": {"team": "operations"}}
The map replaces all previous pairs. { "metadata": {} } clears it. Successful updates increment
the revision, update updatedAt, and retain the ref, descriptor and createdAt. A missing
If-Match returns 428. Stale revisions, weak validators, wildcards and validator lists return
412. Read the current record before reconciling a conflict.
Metadata is a Map<String, String> with at most 32 pairs. Keys use 1 to 64 UTF-8 bytes. Values use
at most 512 UTF-8 bytes. Total key and value bytes must not exceed 16 KiB. Unknown body fields,
duplicate JSON keys, explicit nulls, trailing JSON and non-string metadata values are rejected.
Metadata is for search and display and has no effect on approval permissions or thresholds.
Persistence
Full database backups include the registry, enrollment sessions, and pending changes. Preserve the peer's integrity-key history when restoring. A write succeeds only after every current member has durably stored the result. Registry writes can increase storage latency for other operations on the same peer.
Mutations are ordered by the lowest peer ID in the current membership. A mono Keeper has one member even when its configuration includes future promotion targets. Any public peer forwards the caller's original authenticated request to the writer. Before preparation, every current member must be ready with matching topology. Identity keys are obtained through authenticated, signed peer responses. Each member must independently check the actor's permission and exact command. It also validates the canonical descriptor and key ownership, with separate checks for metadata revision and WebAuthn proofs where required. No member can authorize a registry change on behalf of the others. Registry writes are processed one at a time. Signing, registry reads, and health checks can continue while a write waits for peers.
Every current member must validate and confirm the exact change. Signature registration, WebAuthn finish, and metadata updates succeed only after every member has persisted the result. WebAuthn options also require every member online and mirror the actor-bound session everywhere.
An unavailable or sealed member causes 503 APPROVER_REPLICATION_UNAVAILABLE. A failed request
can leave a pending or partially delivered change. Peers can finish delivering a change confirmed
by every member after the writer stops or the actor token expires. Pending delivery resumes
after restart. A partially confirmed change remains locked, including after expiry.
Each peer retains at most 256 uncommitted changes, including expired ones. Expiry does not free this capacity while protective locks remain. Another preparation then returns 429. An identical registration retry converges to the existing version. For a metadata retry, read the current revision before reconciling the previous request. Older deliveries cannot roll metadata back.
ECC and PQC share recovery restore the registry together with the key. Selected helpers must have no uncommitted changes and must agree on credential versions, metadata, enrollment state, and completed changes. A failed key installation leaves the target registry unchanged.
Mono-to-threshold promotion transfers the registry even when no key sets exist. A nonempty
registry requires tkeeper.approvers.register and tkeeper.approvers.metadata on
the promotion principal. The source pins one transfer draft and blocks registry mutations until
promotion completes. Targets require a draft authenticated by the source and an empty, settled registry/vault with no active DKG. Retries remain bound to that transfer.
After a failed promotion, retry the same transfer because its safety state remains stored after TTL expiry.
Registration and metadata writes produce signed audit events. Successful events include
context.approverRef and context.metadataRevision. Metadata remains protected by the request
body digest and is not copied into the audit context. These fields describe registry changes,
not verified approval votes.
Share recovery does not replace full peer backups or rebuild node identity and seal state. See backup and recovery and OpenAPI Documentation.