Skip to Content
DocumentationCompanion MemoryTrust and identity standards

Trust and identity standards

Companion Memory and Companion Hub operate as an API and data Swiss Army knife for decentralized identity, agentic workflows, and interoperable storage.

Rather than discarding emerging specifications or provisional research protocols (such as Solid, Portable Web Spaces, IdentiKey, OpenVTC, and DIDComm), Companion implements them with full type-safety, dedicated NestJS routing modules, and automated test coverage. To protect production privacy, every provisional and decentralized protocol is shut off by default behind fail-closed feature flags. An operator can selectively enable any interface using environment variables without modifying application code.

Fail-closed guarantee: With feature flags unset or set to false, endpoints return 404 Not Found (indistinguishable from an unmounted route) and make zero outbound network calls.


Standards and feature flag activation

The table below outlines each standard, its role in the Swiss Army Knife architecture, the mounted API route, the corresponding feature flag, the default state, and how to activate it.

Standard & SpecificationScope & RoleRoute / InterfaceFeature Flag / Env VariableDefault StateHow to Activate & UI Surface
Solid Protocol
(W3C Solid, WebID, LDP, Turtle RDF)
Read-only WebID profile document, LDP discovery headers (Vary, Allow, Link, WAC-Allow), and owner-isolated entity containersGET / OPTIONS /solid/profile/:userId
GET / OPTIONS /solid/storage/:userId/entity
GET / OPTIONS /solid/storage/:userId/entity/:entityId
ENABLE_SOLID_PROTOCOL
(features['solid.protocol'])
OFF (false)Set ENABLE_SOLID_PROTOCOL=true in CI-Memory (status in Settings → Trust & protocols)
Portable Web Spaces (PWS)
(W3C CCG v0.5 / zCaps)
Permissioned object-capability storage (Space > Collection > Resource)ALL /pws/*
GET /pws/service
ENABLE_PWS_STORAGE
(features['pws.storage'])
OFF (false)Set ENABLE_PWS_STORAGE=true in CI-Memory (status in Settings → Trust & protocols)
IdentiKey Protocol
(identikey-auth Phase 1, dCBOR + BLAKE3)
Single-use challenge/response authentication (Ed25519/P-256 + optional PQ ML-DSA co-signature)POST /auth/identikey/challenge
POST /auth/identikey/verify
ENABLE_AUTH_IDENTIKEY
(features['auth.identikey'])
OFF (false)Set ENABLE_AUTH_IDENTIKEY=true in CI-Memory (status in Settings → Trust & protocols)
OpenVTC
(W3C VC 2.0 / DTG Credentials v1)
Offline W3C VC 2.0 / DTG v1 envelope, eddsa-jcs-2022 proof, and Bitstring Status List evaluationPOST /vtc/verify
POST /vtc/status-list/evaluate
ENABLE_VTC_CREDENTIALS
(features['vtc.credentials'])
OFF (false)Set ENABLE_VTC_CREDENTIALS=true in CI-Memory (status in Settings → Trust & protocols)
DIDComm Messaging v2.1
(DIF DIDComm v2.1 + OOB 2.0)
Ephemeral did:peer:2 identity, Out-of-Band _oob= invitation creation & offline parsing, encrypted envelopes (authcrypt/anoncrypt), trust-ping, and discover-featuresGET /didcomm/did
POST /didcomm/oob
POST /didcomm/oob/parse
POST /didcomm/message
ENABLE_DIDCOMM_MESSAGING
(features['didcomm.messaging'])
OFF (false)Set ENABLE_DIDCOMM_MESSAGING=true in CI-Memory (_oobid= remote URLs refused to preserve zero-SSRF posture)
Trust Tasks
(https://trusttasks.org , https/0.3)
Task document envelopes with in-band eddsa-jcs-2022 proofsPOST /agent/v1/trust-tasksENABLE_TRUST_TASKS
(features['trust.tasks'])
OFF (false)Set ENABLE_TRUST_TASKS=true and configure peer signing keys
Protected Resource Metadata (PRM)
(RFC 9728 / MCP 2026-07-28)
OAuth 2.0 metadata discovery for MCP agents with Client ID Metadata Document (CIMD) support and DCR disabledGET /.well-known/oauth-protected-resource
GET /.well-known/oauth-protected-resource/mcp
ENABLE_MCP_PRM
(features['mcp.prm'])
OFF (false)Set ENABLE_MCP_PRM=true in CI-Memory
Local.Pub / ActivityPub Discovery
(W3C Social Web)
Handle-to-key discovery over WebFinger and ActivityPub actorsGraphQL localPubPeerLookupCI_PEER_LOCAL_PUB_ENABLED
(config.peers.localPubEnabled)
OFF (false)Set CI_PEER_LOCAL_PUB_ENABLED=true in CI-Memory
Companion Asks & ISO 27560 Receipts
(RFC 9421 + DPV v2 + CESR I-SAID)
Peer asks, standing grant ceilings, append-only disclosure audit, and on-demand ISO/IEC TS 27560 consent receiptsPOST /agent/v1/ask, GraphQL ask*, askDisclosureHistory, askAuditReceiptENABLE_ASK
(features['ask'])
Deployment configInspected via /asks Disclosure History and ConsentDetailModal receipt drawer
KERI OOBI
(Frozen experimental pre-spec)
Isolated Out-Of-Band Introduction test surface (non-CESR internal format)GET /.well-known/keri/oobi
GET /.well-known/keri/oobi/:aid
CI_HUB_KERI_OOBI (process env)OFF (unset)Set CI_HUB_KERI_OOBI=true in Companion-Hub; exposed via /api/user-context (keriOobiEnabled) to Settings → System
DID Authentication
(did:key Ed25519 + SIOPv2)
Browser WebCrypto Ed25519 did:key generation, account linking, and SIOPv2 id_token sign-inGET /api/auth/did/links
POST /api/auth/did/challenge
POST /api/auth/did/verify
POST /api/auth/did/link
DELETE /api/auth/did/links/:id
CI_HUB_DID_AUTH (process env)OFF (unset)Set CI_HUB_DID_AUTH=true in Companion-Hub; enables Login DidSignInPanel and Settings → Security DidLinksCard (via /api/user-context didAuthEnabled)
Fail-Closed Privacy Boundary
(Cloud fallback guard)
Blocks automatic cloud inference failover when local Ollama/vLLM/oMLX/Lemonade engines failInferenceRouterService, GET /api/inference/cloud-policy (CloudFallbackPolicyDto)CI_HUB_ALLOW_CLOUD_FALLBACK (process env)OFF (unset)Default fail-closed (502 when local backends are unreachable). Visible in Settings → AI policy banner and Settings → System
Forward-Auth EdDSA & Passkeys
(OIDC / RFC 6749 / RFC 7636)
Reverse-proxy app SSO assertions (urn:ci-hub:<directoryId>), Hub login (better-auth), and CI-Portal session-gated /api/peers OIDC federation/api/auth/*, Hub JWKS, CI-Portal POST /api/peersCore auth serviceWorks todayActive by default (CI-Portal peer directory enforces OIDC session auth, server-derived (issuer, subject), and HTTPS endpoints)
Model Context Protocol (MCP)
(Anthropic MCP)
Tool registry and memory resource inspection for connected agentsPOST /mcp, GET /mcp, DELETE /mcpCore platform featureWorks todayActive by default with scoped token gates
Capability Keys & Field Crypto
(Biscuit-style Ed25519 + AES-256-GCM)
Scoped API keys (/keys) plus internal offline-attenuable Ed25519 capability token helpers (capabilityToken.ts)POST /keys, GET /keys, GET /keys/checkCore platform featureWorks todayActive by default (full / write / read capability attenuation)
HTTP Message Signatures
(RFC 9421)
Tamper-evident signed requests between paired CompanionsPOST /agent/v1/ask, GET /agent/v1/ask/:askIdConfig peers.requireHttpSignatureOptional (false)Unsigned Portal-token asks accepted unless peers.requireHttpSignature: true is set; outbound signed when peers.signingKeyJwk is configured
iCalendar (RFC 5545)Calendar .ics VEVENT import parsingData import sources (.ics upload / connector)Core platform featureWorks todayAvailable via calendar import sources

Activating features via environment variables

To activate any of the standards behind feature flags, configure the environment variable in the respective service’s deployment configuration (.env file or docker-compose.override.yml).

Companion Memory configuration

Edit the CI-Memory environment (e.g. in .env or container env block):

# Enable Solid Protocol (WebID & LDP read storage at /solid/profile/* and /solid/storage/*) ENABLE_SOLID_PROTOCOL=true # Enable Portable Web Spaces (W3C CCG v0.5 storage at /pws/*) ENABLE_PWS_STORAGE=true # Enable IdentiKey authentication (challenge/response at /auth/identikey/*) ENABLE_AUTH_IDENTIKEY=true # Enable OpenVTC credential verification at /vtc/verify ENABLE_VTC_CREDENTIALS=true # Enable DIDComm Messaging v2.1 at /didcomm/* (GET /didcomm/did, POST /didcomm/message) ENABLE_DIDCOMM_MESSAGING=true # Enable Trust Tasks document exchange at /agent/v1/trust-tasks ENABLE_TRUST_TASKS=true # Enable RFC 9728 Protected Resource Metadata discovery for MCP ENABLE_MCP_PRM=true # Enable Local.Pub handle discovery CI_PEER_LOCAL_PUB_ENABLED=true

Companion Hub configuration

Edit the Companion-Hub environment (e.g. $CI_HUB_DATA_DIR/.env):

# Enable KERI OOBI endpoints (/.well-known/keri/oobi/*) CI_HUB_KERI_OOBI=true # Enable DID authentication (did:key sign-in at /api/auth/did/*) CI_HUB_DID_AUTH=true # Allow cloud inference fallback when local Ollama/vLLM is offline # WARNING: Setting this to true allows inference prompts to be sent to external cloud providers CI_HUB_ALLOW_CLOUD_FALLBACK=false

Restart the service after updating environment variables:

cihub restart

Cryptographic and operational comparison

Each trust and interoperability standard in Companion addresses a different layer of identity, transport, storage, or consent. None replaces the others outright:

StandardIdentifier & AgilityCryptosuite / EncryptionRevocation / Replay DefenseOffline VerificationMaturity Tier
Forward-Auth EdDSA / OIDCurn:ci-hub:<directoryId>, CI-Portal OIDC (issuer, subject)EdDSA JWTs via Hub JWKS / OIDC PKCEShort-lived tokens, better-auth session storeYes (Hub JWKS); OIDC initial login requires IdPCore
RFC 9421 + ISO 27560 + CESR SAIDAccount / did:keri:D… key id (non-rotating)RFC 9421 Ed25519 HTTP Signatures, RFC 8785 JCS + CESR I-SAIDReplay headers (created, nonce), durable ci.ask_audit, lazy askAuditReceiptYes (SAID & HTTP sig verify offline)Provisional (ENABLE_ASK)
Solid Protocol (LDP)WebID HTTP URI (#me)OIDC / Bearer + WAC-lite owner isolationOAuth token expiry + owner-only 404 boundaryNo (OIDC/JWKS)Provisional (Flag-gated)
Portable Web Spaces (PWS)did:key controller DID (immutable)Ed25519 zCap delegations + HTTP Signatures + DigestExpiring caveat timestamps + controller-scoped 404YesProvisional (Flag-gated)
IdentiKey (identikey-auth)BLAKE3 Base58 key fingerprintdCBOR + Ed25519 / P-256 + optional ML-DSA PQ co-signatureSingle-use 300s challenge nonce + retry cap (3 attempts) + Host audience bindingYes (challenge/verify offline within host)Experimental
OpenVTC (VC 2.0 / DTG v1)did:key or pinned community DID (refuses did:keri)eddsa-jcs-2022 Data Integrity ProofW3C Bitstring Status List v1.0 (POST /vtc/status-list/evaluate, 24h max age)Yes (strictly offline; no remote fetch)Provisional (Flag-gated)
DIDComm Messaging v2.1did:peer:2 (ephemeral), did:key, did:web (refuses did:keri)ECDH-1PU (authcrypt) / ECDH-ES (anoncrypt) + JWSInMemoryReplayGuard + message expires_time + offline _oob= (_oobid= refused)Yes for did:peer / did:keyProvisional (Flag-gated)
Trust Tasks (https/0.3)Linked peer did:key / Ed25519 signing keyeddsa-jcs-2022 signed task document envelopesBounded payload & peer allowlistYesProvisional (Flag-gated)
Hub did:key SIOPv2did:key:z6Mk… (WebCrypto or external Ed25519, immutable)JWS / SIOPv2 id_token (EdDSA)Single-use challenge nonce + Hub audience checkYesProvisional (Flag-gated)
KERI OOBI (Hub)Frozen internal pre-spec prefix (non-CESR)Frozen pre-spec JSON structuresIsolated behind CI_HUB_KERI_OOBI=truePartial (non-interoperable)Experimental

UI/UX inspection and boundary controls

Both Companion Memory and Companion Hub surface flag states and verification evidence directly in operator settings without probing disabled routes:

  • Companion Memory — Settings → Trust & protocols: TrustProtocolsSection reads /api/_internal/features (authenticated only; unauthenticated /api/_internal/features/global omits all provisional flags) to filter and search active vs. fail-closed 404 interfaces and display activation variables.
  • Companion Memory — /asks Disclosure History (ConsentDetailModal): Lazily fetches GraphQL askAuditReceipt on click to display ISO/IEC TS 27560 + W3C DPV v2 legal basis, purposes, processing categories, and CESR I-SAID / receipt d digests with copy/JSON export.
  • Companion Hub — Login (DidSignInPanel) & Settings → Security (DidLinksCard): Dynamically revealed only when GET /api/user-context reports didAuthEnabled: true (CI_HUB_DID_AUTH=true). Uses browser WebCrypto Ed25519 (did:key:z6Mk…) to sign SIOPv2 challenges or accepts external JWS proofs.
  • Companion Hub — Settings → AI (cloud-fallback-policy-banner): Queries GET /api/inference/cloud-policy (CloudFallbackPolicyDto) to show clearly whether CI_HUB_ALLOW_CLOUD_FALLBACK is fail-closed local routing (false) or permits cloud failover (true).
  • Companion Hub — Settings → System (TrustProtocolsSection): Displays read-only protocol gate status (did:key, KERI OOBI, Cloud Inference Fallback, Forward-Auth EdDSA) derived from /api/user-context.
  • Companion Portal (/api/peers): Remains unchanged in CI-Portal — peer registration and resolution require authenticated OIDC sessions, enforce HTTPS endpoints, bind identities server-side from (issuer, subject), and return 404 when unconfigured.

Architectural design principles

  1. API & Data Swiss Army Knife: The memory server is built to interface with external decentralized trust ecosystems without requiring code rewrites. All parser, crypto, and transport layers reside in the codebase.
  2. Fail-Closed Privacy: A feature flag set to false (or left unset) does not return a “Feature Disabled” or “Forbidden” status code. Instead, the endpoint throws a 404 Not Found indistinguishable from an unmounted path, preventing scanner enumeration and zero-outbound SSRF leaks.
  3. Strict Cryptographic Soundness:
    • CESR SAIDs: Audit helpers (auditSaid.ts) compute RFC 8785 canonical JSON with CESR I prefix (SHA2-256) qb64 self-addressing identifiers (computeAuditSaid, verifyAuditSaid) and Merkle root/proof verification helpers.
    • Data Integrity: Proofs follow W3C eddsa-jcs-2022 with RFC 8032 verification.
    • Consent Receipts: Receipt builders (consentReceipt.ts) follow ISO/IEC TS 27560 and W3C Data Privacy Vocabulary (DPV v2).
    • Capability Tokens: capabilityToken.ts provides offline-attenuable Biscuit-style Ed25519 capability tokens with monotonic caveat verification (mintRootCapabilityToken, attenuateCapabilityToken, verifyCapabilityToken).
Last updated on