跳转到内容

ak.schema.recovery_session.v1

← Schemas

Arkret Recovery Session
ak.schema.recovery_session.v1 · file: schemas/recovery-session.schema.json

Wire contract for the device recovery session state machine. The root object is the recovery session state shape; request body/result helper shapes and kind-specific recovery proof transcripts live in $defs. Completion is owned by the bound RecoveryTransaction; see zh/identity/security-transactions.md §2 and zh/crypto-media/device-lifecycle.md §14.

* $ · object · $ref #/$defs/recovery_session_state
Wire contract for the device recovery session state machine. The root object is the recovery session state shape; request body/result helper shapes and kind-specific recovery proof transcripts live in $defs. Completion is owned by the bound RecoveryTransaction; see zh/identity/security-transactions.md §2 and zh/crypto-media/device-lifecycle.md §14.
allOf · allOf[0] · ?
allOf · allOf[1] · ?
* schema · const "ak.schema.recovery_session.v1"
enum: "ak.schema.recovery_session.v1"
* request_id · string · $ref #/$defs/request_id
pattern: ^ak:request:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
* recovery_session_id · string · $ref #/$defs/recovery_session_id
pattern: ^ak:recovery_session:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
* session_grant_id · string · $ref ./common-ids.schema.json#/$defs/session_grant_id
Exact recovery_session grant that created and owns this session.
pattern: ^ak:session_grant:[A-Za-z0-9_-]{44}$
* session_grant_cnf_jkt · string
Exact cnf.jkt of session_grant_id. All subsequent recovery requests and proof transcripts must use the same DPoP key.
pattern: ^[A-Za-z0-9_-]{43}$
* account_id · object · $ref #/$defs/account_id
Complete protocol identity for a principal at one Station, including human, Agent, Applet-managed Ghost and integration accounts. It does not imply a human login, provisioning workflow, credential class or authorization. Equality is byte-for-byte equality of both canonical did_core_id components; neither component may be inferred from a DID Document, route, session audience, current service, handle, or local database key. Accounts with the same principal_id at different station_id values are permanently distinct. Principal equality MUST NOT establish account equivalence or any permission inheritance, merging, delegation, substitution or recovery relationship. Account-scoped authority requires independent authorization for the exact AccountId. Permanent loss of a Station does not permit its accounts or PCR lineages to migrate to or revive at another Station; Realm takeover and RealmCommit recovery do not waive this boundary. See models/common-fields.md section 4.2.
* principal_id · $ref #/$defs/did_core_id · $ref #/$defs/did_core_id
* station_id · $ref #/$defs/did_core_id · $ref #/$defs/did_core_id
* requesting_device_id · string · $ref #/$defs/device_id
New device being recovered/authorized.
pattern: ^ak:device:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
* requesting_device_public_key_did · string · $ref #/$defs/requesting_device_public_key_did
Authoritative device signing key as an Ed25519 did:key (multibase base58btc, multicodec ed25519-pub). Mirrors ak.device.authorize.payload.device_public_key_did (device-lifecycle.md §5.2 / §5.4). To check SignalEnvelope and durable Event proofs, receivers resolve a verification_method DID URL under the verified principal did, validate its bare did through the registered adapter, require project(did) to equal the actor/principal did_core_id, and require its fragment to equal the full ak:device:<uuidv7> id. Constructing a verification method by appending a fragment to did_core_id is forbidden.
pattern: ^did:key:z[1-9A-HJ-NP-Za-km-z]+$
* trust_domain · string · $ref #/$defs/trust_domain
pattern: ^ak:trust_domain:[a-z0-9][a-z0-9._\-:]{0,127}$
* policy_id · string · $ref #/$defs/policy_id
pattern: ^ak:policy:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
* policy_version · integer
* identity_model · const "pcr_policy" · $ref #/$defs/identity_model
The v1 base recovery model: an accepted PCR recovery policy directly authorizes the next device generation. Current DID control is not implicit.
enum: "pcr_policy"
* current_device_generation_ref · integer · $ref #/$defs/pcr_generation_ref
Reducer-managed PCR device generation snapshotted at session creation.
* realm_stream_head · object · $ref ./realm-commit.schema.json#/$defs/stream_head
* stream_ref · $ref #/$defs/stream_ref · $ref #/$defs/stream_ref
* stream_position · integer
* commit_id · string · $ref ./common-ids.schema.json#/$defs/realm_commit_id
Content-addressed identity of a closed unsigned RealmCommit body. The suffix uses the fixed v1 digest suite and the same canonical 33-octet token encoding as Event IDs.
pattern: ^ak:realm_commit:[A-Za-z0-9_-]{44}$
* publication_authority_context · object · $ref #/$defs/publication_authority_context
Server-snapshotted PCR recovery authority evaluated by the current governance Station.
* authority_commit_id · string · $ref ./common-ids.schema.json#/$defs/realm_commit_id
Content-addressed identity of a closed unsigned RealmCommit body. The suffix uses the fixed v1 digest suite and the same canonical 33-octet token encoding as Event IDs.
pattern: ^ak:realm_commit:[A-Za-z0-9_-]{44}$
* scope_ref · oneOf[4] · $ref ./event-envelope.schema.json#/$defs/scope_ref
oneOf · oneOf[0] · object
* kind · const "realm"
enum: "realm"
* realm_id · string · $ref ./common-ids.schema.json#/$defs/realm_id
Retyped ak.realm.create Event token. It therefore carries the same fixed current-v1 0x01/SHA-256 content-address identity and is not selected by Realm state.
pattern: ^ak:realm:[A-Za-z0-9_-]{44}$
oneOf · oneOf[1] · object
* kind · const "circle"
enum: "circle"
* realm_id · string · $ref ./common-ids.schema.json#/$defs/realm_id
Retyped ak.realm.create Event token. It therefore carries the same fixed current-v1 0x01/SHA-256 content-address identity and is not selected by Realm state.
pattern: ^ak:realm:[A-Za-z0-9_-]{44}$
* circle_id · string · $ref ./common-ids.schema.json#/$defs/circle_id
pattern: ^ak:circle:[A-Za-z0-9_-]{44}$
oneOf · oneOf[2] · object
Native controller-and-owned-Agents private scope. It is not a Circle and has no editable membership.
* kind · const "sidecar"
enum: "sidecar"
* realm_id · string · $ref ./common-ids.schema.json#/$defs/realm_id
Retyped ak.realm.create Event token. It therefore carries the same fixed current-v1 0x01/SHA-256 content-address identity and is not selected by Realm state.
pattern: ^ak:realm:[A-Za-z0-9_-]{44}$
* sidecar_id · string · $ref ./common-ids.schema.json#/$defs/sidecar_id
pattern: ^ak:sidecar:[A-Za-z0-9_-]{44}$
oneOf · oneOf[3] · object
Genesis scope for ak.realm.create only. It carries no realm_id because the receiver derives every Realm id, including Collaboration, Direct Conversation, human PCR, and Agent PCR, as retype(event_id, "realm") from this create Event (zh/models/realm-and-space.md section 2.5.0). The uniform omission also prevents the digest cycle.
* kind · const "realm_genesis"
enum: "realm_genesis"
* authority_set_policy · object · $ref ./authority-set-policy.schema.json
A recovery or admission signer policy materialized by the current governance Station. It is not an offline publication lease.
* schema · const "ak.schema.authority_set_policy.v1"
enum: "ak.schema.authority_set_policy.v1"
* authority_set_id · string
pattern: ^ak\.authority_set\.[a-z0-9_]+(?:\.[a-z0-9_]+)*\.v1$
* policy_kind · string (enum)
enum: "principal_control" "realm_admission"
* scope_ref · oneOf[4] · $ref ./event-envelope.schema.json#/$defs/scope_ref
oneOf · oneOf[0] · object
* kind · const "realm"
enum: "realm"
* realm_id · string · $ref ./common-ids.schema.json#/$defs/realm_id
Retyped ak.realm.create Event token. It therefore carries the same fixed current-v1 0x01/SHA-256 content-address identity and is not selected by Realm state.
pattern: ^ak:realm:[A-Za-z0-9_-]{44}$
oneOf · oneOf[1] · object
* kind · const "circle"
enum: "circle"
* realm_id · string · $ref ./common-ids.schema.json#/$defs/realm_id
Retyped ak.realm.create Event token. It therefore carries the same fixed current-v1 0x01/SHA-256 content-address identity and is not selected by Realm state.
pattern: ^ak:realm:[A-Za-z0-9_-]{44}$
* circle_id · string · $ref ./common-ids.schema.json#/$defs/circle_id
pattern: ^ak:circle:[A-Za-z0-9_-]{44}$
oneOf · oneOf[2] · object
Native controller-and-owned-Agents private scope. It is not a Circle and has no editable membership.
* kind · const "sidecar"
enum: "sidecar"
* realm_id · string · $ref ./common-ids.schema.json#/$defs/realm_id
Retyped ak.realm.create Event token. It therefore carries the same fixed current-v1 0x01/SHA-256 content-address identity and is not selected by Realm state.
pattern: ^ak:realm:[A-Za-z0-9_-]{44}$
* sidecar_id · string · $ref ./common-ids.schema.json#/$defs/sidecar_id
pattern: ^ak:sidecar:[A-Za-z0-9_-]{44}$
oneOf · oneOf[3] · object
Genesis scope for ak.realm.create only. It carries no realm_id because the receiver derives every Realm id, including Collaboration, Direct Conversation, human PCR, and Agent PCR, as retype(event_id, "realm") from this create Event (zh/models/realm-and-space.md section 2.5.0). The uniform omission also prevents the digest cycle.
* kind · const "realm_genesis"
enum: "realm_genesis"
* source_commit_id · string · $ref ./common-ids.schema.json#/$defs/realm_commit_id
Content-addressed identity of a closed unsigned RealmCommit body. The suffix uses the fixed v1 digest suite and the same canonical 33-octet token encoding as Event IDs.
pattern: ^ak:realm_commit:[A-Za-z0-9_-]{44}$
* authorization_rules · array<object>
items · object
* rule_id · string
pattern: ^[a-z][a-z0-9_]{0,63}$
* issuer_role · string (enum)
enum: "identity_recovery" "accepted_device" "realm_admission"
* allowed_actions · array<string>
items · string
pattern: ^ak\.[a-z0-9_]+(?:\.[a-z0-9_]+)*$
* issuers · array<object>
items · object
* verification_method · string · $ref ./common-ids.schema.json#/$defs/did_url
Arkret verification-method DID URL profile (identity/did-usage-and-verification.md section 2.2): lowercase method name, no query, required fragment, fragment limited to ASCII [A-Za-z0-9._:-]. Every verification_method-family field and every kid/key_ref a schema declares to be a DID URL MUST resolve to exactly this definition; values compare byte-for-byte with no URI normalization or percent-decoding.
pattern: ^did:[a-z0-9]+:[^\s#?]+#[A-Za-z0-9._:-]+$
* threshold · integer
* allowed_actions · const ["ak.device.reanchor"]
enum: ["ak.device.reanchor"]
* publication_authority_context_digest · string · $ref #/$defs/digest
SHA-256 of JCS(publication_authority_context). Recovery proof transcripts and RecoveryTransaction session snapshots bind this exact digest.
pattern: ^(sha256|blake3):[0-9a-f]{64}$
* challenge · string · $ref #/$defs/challenge
base64url(no padding) encoding of 256 bits from a CSPRNG. The value is single-use and bound to one recovery_session_id.
pattern: ^[A-Za-z0-9_-]{43}$
* state · string (enum) · $ref #/$defs/session_state
enum: "pending" "verified" "completed" "rejected" "expired"
proof_summary · object · $ref #/$defs/proof_summary
* kind · string (enum) · $ref #/$defs/proof_kind
enum: "did_root" "recovery_unlock" "device_quorum" "trusted_recovery_service"
* proof_digest · string · $ref #/$defs/digest
Digest of the canonical recovery proof transcript that satisfied this session.
pattern: ^(sha256|blake3):[0-9a-f]{64}$
verification_method · string · $ref #/$defs/did_url
pattern: ^did:[a-z0-9]+:[^\s#?]+#[A-Za-z0-9._:-]+$
transaction_id · string · $ref #/$defs/transaction_id
Unique durable RecoveryTransaction bound by CAS after verification. Absent until transaction create succeeds.
pattern: ^ak:transaction:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
rejection_reason_code · string (enum)
Closed enum. proof_failed: proof verification failures reached the server policy limit; operator_rejected: explicit operator/admin rejection; risk_policy: server risk policy rejection; superseded: replaced by a newer recovery session for the same principal/device.
enum: "proof_failed" "operator_rejected" "risk_policy" "superseded"
* expires_at · string (date-time) · format=date-time · $ref #/$defs/timestamp
Canonical Arkret-owned absolute instant. UTC Z form with exactly three millisecond digits. Whole seconds MUST use .000Z; offsets, missing/finer fractions, lowercase separators, leap seconds, and invalid Gregorian calendar dates are forbidden. Shape validation by this pattern is supplemented by semantic date validation.
pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\.[0-9]{3}Z$
* created_at · string (date-time) · format=date-time · $ref #/$defs/timestamp
Canonical Arkret-owned absolute instant. UTC Z form with exactly three millisecond digits. Whole seconds MUST use .000Z; offsets, missing/finer fractions, lowercase separators, leap seconds, and invalid Gregorian calendar dates are forbidden. Shape validation by this pattern is supplemented by semantic date validation.
pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\.[0-9]{3}Z$
* updated_at · string (date-time) · format=date-time · $ref #/$defs/timestamp
Canonical Arkret-owned absolute instant. UTC Z form with exactly three millisecond digits. Whole seconds MUST use .000Z; offsets, missing/finer fractions, lowercase separators, leap seconds, and invalid Gregorian calendar dates are forbidden. Shape validation by this pattern is supplemented by semantic date validation.
pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\.[0-9]{3}Z$

Source