ceramicnetwork / CIPs

The Ceramic Improvement Proposal repository
https://cips.ceramic.network/
MIT License
82 stars 22 forks source link

Accounts Index #14

Closed michaelsena closed 3 years ago

michaelsena commented 4 years ago
cip: 14
title: Accounts Index
author: Michael Sena (@michaelsena), Joel Thorstensson (@oed)
status: Draft
category: Standards
type: RFC
created: 2020-05-22
requires: Tile Doctype (CIP-8), DocId Map (CIP-10)

Simple Summary

Accounts Index stores a list of documents that contain information about a DID's publicly linked accounts.

Abstract

Oftentimes users want to publicly associate various identities from external services to their DID in order to prove to others that all are owned by the same person or entity. These identities can include blockchain accounts and/or contracts, other forms of cryptographic accounts, social accounts such as Twitter or Github, domain names, DIDs and more.

Collectively these account associations can function as a powerful form of identity verification for DIDs and can serve to add trust to our digital interactions since counter-parties can be sure, with cryptographic proof, that the entity they are interacting with is the authentic owner of another well-known public account. This aspect allows implicit or explicit reputation accrued on the linked account to be transferred to the DID, and by extension, all the other accounts linked to the DID.

Accounts Index is a directory of documents that each contain specific aspects of a DID's linked account universe. Because of this, Accounts Index functions as a discovery and routing mechanism to those verifications. By standardizing how one or more types of linked accounts are associated to a DID, the Accounts Index simplifies the process of integrating many different accounts with the same identity and provides a common interface for applications to use when querying or discovering those various accounts.

Accounts Index is a component of the Identity Index (IDX) (CIP-11) and is often linked from the Root Index (CIP-12). In turn, Accounts Index usually links to a Crypto Account Links (CIP-21) and/or a Social Account Links (CIP-22) document.

Motivation

Accounts Index aims to:

Specification

The Accounts Index specification includes a doctype, schema, table, and tag.

Accounts Index Diagram

Doctype

Accounts Index is a Tile Doctype (CIP-8).

Schema

Accounts Index utilizes the DocId Map (CIP-10) schema, which simply stores a list of strings which map to Ceramic DocIds. In this case, Ceramic DocIds represent documents that store lists of linked accounts. A reference to this schema should be included in your Accounts Index document when it is created.

Table

The Accounts Index Table (coming soon) contains the standard set of properties that may be contained in any given Accounts Index document. New properties can be added to the table by following the steps below. Additional properties not found in this table may be stored in any Accounts Index, however they may be less interoperable since others may not know what they represent.

Here are some examples from the Accounts Index Table:

Property Description Value Max Size Required Example
crypto The DocId of a Crypto Account Links (CIP-21) document, which contains a list of crypto accounts and links to their proofs DocId 150 char optional ceramic://bafy...
social The DocId of a Social Account Links (CIP-22) document, which contains a list of social accounts and links to their proofs DocId 150 char optional ceramic://bafy...

How to add a new property to the Accounts Index table

  1. Choose a unique, descriptive property name.
  2. Add a description for your property.
  3. Submit a PR to the CIP repository updating the Accounts Index table with your property.
  4. Mention the authors of this CIP in the comments of your PR.

Example

An example Accounts Index document.

"doctype": "tile"
"schema": "<insert canonical schema for DocId Map>"
"tags": ["AccountsIndex", "DocIdMap"],
"content": {
  "crypto": "ceramic://bafyljsdf1...",
  "social": "ceramic://bafysdfoijwe2..."
}

Suggested Usage

Root Index: Accounts Index provides an index of documents that store linked accounts. However accounts are just one type of resource that can be associated with a DID. The Root Index (CIP-12) provides a top-level directory of a DID's resources, and can contain a property called accounts which stores a link to the Accounts Index. The recommended path from a DID to the Accounts Index is: DID/Root Index/Accounts Index.

Content: It is recommended that the Accounts Index only be used to store mappings to documents that contain lists of similar account links. Examples of this would be linking to a Crypto Accounts Links and Social Accounts Links documents.

Rationale

Extensibility & Flexibility: It is impossible to predict all of the types of accounts that need to be associated with any particular DID. Therefore Accounts Index was designed to be infinitely extensible to support indexing many different kinds of linked account lists.

Decentralization & Trust: Linked account information is data that needs to be globally-available, cross-platform, censorship-resistant, and live permissionlessly in the public domain (not on any single server). Additionally this information should be owned by a DID and will need to be updated from time to time. These requirements make Ceramic the most appropriate platform for publishing this content.

Implementation

DocId Map Schema: Find the DocID Map (CIP-10) schema here.

Accounts Index Table: Find the table containing standard Account Index properties here (coming soon).

Libraries: Not yet available.

Copyright

Copyright and related rights waived via CC0.

oed commented 4 years ago

Should crypto be renamed to caip10?

oed commented 3 years ago

Stale, closing.