Specification · Authentication & organization identity
Organization identity and verifiable membership on Kotoba Cloud
Kotoba Cloud adds an organization layer between the individual Stable Principal and resources: billing, database tenants and delegation. This page is the normative summary of ADR-2609141633 — how organizations are named, transferred, granted members, and verified. The design follows the Issuer/Holder/Verifier separation of Microsoft Entra Verified ID and the trust-registry, DID-method-separation and credential-status practices of EBSI.
Status: Accepted, 2026-09-14. Shipped so far: the trust registry endpoint and the KotobaOrgMembership/v1 schema; the private org authority and the /v1/org API surface. Webvh issuance of organization identifiers and the /account organization panel are still landing. This page describes the accepted design, not a finished product.
One source of truth per layer
The design refuses to mix concerns. Each question has exactly one canonical answer, and every other representation is a cacheable projection of it.
Name and keys: the organization's did:webvh document. Membership: Verifiable Credentials with a status mechanism. Runtime capability: Biscuit tokens attenuated from an org authority block. Session authentication: CACAO/SIWE, unchanged.
A verification that mixes layers fails closed: a Biscuit token whose holder cannot show a currently valid membership VC does not authorize anything, however intact the token itself is.
Organization identity: did:webvh
An organization is addressed as did:webvh:<SCID>:com-<handle>.kotoba.cloud, rooted in the same first-party webvh trust system as kotoba.cloud's own identifier (SCID-pinned, witness threshold 3, portable).
The DID document carries keys and names only — updateKeys, the controlling principal, alsoKnownAs. Membership, roles and billing state are never written into it.
Transfer of the organization (sale, succession, operator intervention) is a webvh update: rotate updateKeys, hand over the signing key, witness the log entry. The SCID does not change, so every external reference — Stripe customer metadata, tenant ownership display, published links — survives the transfer untouched. Old-key credentials and Biscuit tokens fail closed afterwards.
Membership: W3C Verifiable Credentials with status
The statement 'principal P is a member of organization O with role R' is a W3C Verifiable Credential. The issuer is the organization's webvh DID; the subject is the member's Stable Principal (a self-certifying did:key-family identifier, deliberately not registered anywhere — the same person/organization DID-method separation EBSI applies).
Roles are owner, admin, member and billing. The credential carries a credentialStatus entry (status-list style) so that removing a member, suspension or role change takes effect at verification time without touching the DID document.
The schema is published at /.well-known/kotoba-org-membership-schema/v1.json on kotoba.cloud and is intentionally ordinary JSON Schema so any verifier — kotoba.cloud, the database gateway, or a third party — validates the same way.
The trust registry
Kotoba Cloud operates a first-party trust registry, the EBSI direction rather than the Entra one: verification anchors on a registry, not on domain reputation alone. It is served at /.well-known/kotoba-org-registry.json as a cacheable projection; the webvh logs and status lists remain the tamper-evident records.
Verifying a membership VC has four fail-closed steps: resolve the organization's webvh document and check the updateKeys chain; verify the VC signature against the organization's current signing key; check credentialStatus is neither revoked nor expired; and check the registry's current issuer entry matches the organization. All four, every time.
Runtime capability: Biscuit
Fine-grained authority — run a research job, write to database tenant t_xxx — is expressed with Biscuit, the workspace's delegation format since ADR-2608180200. The authority block is signed by the organization's current signing key; members attenuate with their own keys for a concrete task, and attenuation is monotone by construction.
The bridge is one policy fact: the verifier derives valid-membership only from a currently valid membership VC (all four registry checks). A revoked, expired or transferred-away member's tokens fail closed even though the token bytes themselves are perfect.
Biscuit was chosen over pure-VC delegation for this layer because attenuation must happen offline, per task, without issuer contact; a VC per task would make the issuer a per-operation dependency.
Billing and transfer
The Stripe customer is bound to the organization DID in metadata; the pre-existing per-principal billing account remains as the personal (org-less) fallback. Checkout and Billing Portal flows are unchanged.
A transfer, end to end: rotate webvh updateKeys (witnessed) → hand over the org signing key → issue fresh membership VCs. From that moment old-key VCs fail at the signature step, old Biscuit tokens fail at the valid-membership fact, and the name, SCID and external references continue without change.
Current API surface
Shipped: GET /.well-known/kotoba-org-registry.json; GET /.well-known/kotoba-org-membership-schema/v1.json; POST /v1/org/create, POST /v1/org/delegate, POST /v1/org/revoke, POST /v1/org/status — session-authenticated, same-origin only, fail-closed on missing session, foreign origin or unconfigured authority.
Not yet shipped: webvh issuance of organization identifiers (operator-run), the /account organization panel, and consumption of membership VCs by the database gateway. These are the next steps in the ADR's implementation order.
