Skip to content

Add @vocab for private claims in /credentials/v2 @context #953

Closed
@OR13

Description

@OR13

PROPOSAL: Add an @vocab to the /credentials/v2 @context.

Reasoning:

We (as editors of the did spec registries, and reviewers of various VC-JWT implementations) have seen a consistent failure to leverage @context properly in DID Core and Verifiable Credentials... due to the "term not defined in the context" issue.

The problem is not that "people don't want to define semantics"... its the opposite, they are eager to rely on semantics defined by the standards, but they don't know how to define new terms, or they don't want to take responsibility for hosting a vocabulary for their new terms as the first step in using or leveraging a new term... this is a barrier to adoption created by the W3C Working Groups, based on an argument for semantic purity... that has in my opinion, greatly harmed the adoption of semantic technologies and standards, including Decentralized Identifiers and Verifiable Credentials.

By adding @vocab to the core data model context, we can give these developers the same experience they have with JWT private claims, which you should read about here: rfc7519#section-4.3

If this proposal is adopted, developers will be allowed to do this:

{
  "@context": [
    // "https://www.w3.org/2018/credentials/v1",
    "https://www.w3.org/ns/credentials/v2",
    // "https://www.w3.org/2018/credentials/examples/v1"
    // { "@vocab": "https://www.w3.org/ns/credentials#" }
  ],
  "id": "http://example.edu/credentials/1872",
  "type": ["VerifiableCredential", "NewCredentialType"],
  "issuer": { 
    "id": "did:example:123", 
     "type": ["Organization", "OrganizationType"] 
   },
  "issuanceDate": "2010-01-01T19:23:24Z",
  "credentialSubject": {
    "id": "did:example:456", 
    "type": ["Person", "JobType"],
    "claimName": "claimValue"
  }
}

and claimName will get a default IRI, assigned by https://www.w3.org/ns/credentials/v2... something like:

https://www.w3.org/ns/credentials/#claimName.

https://www.w3.org/ns/credentials/claims/private#claimName

This will produce beautiful and valid JSON-LD, which can immediately be processed in an interoperable way, using SPARQL, RDF, or other semantic standards developed at W3C and elsewhere, including conversion to Cypher, GQL or Labeled Property Graphs (Automatically).

The issuer's of such credentials might later decide to refine term definitions for such credentials by either:

  1. inlining the new term definition
 { "claimName": { "@id": "https://industry.consortium.example/vocab#claimName" } }
  1. hosting a new context
https://industry.consortium.example/contexts/v1
{ "claimName": { "@id": "https://industry.consortium.example/vocab#claimName" } }

This allows for issuers to gradually improve their semantic precision over time, as they become more skilled and knowledgable about graph interoperability... Its been our experience this leads to better engagement, and better semantics in the long run.

The alternative to this proposal is the status quo, where we see a new DID Method registered every week, that fails to define JsonWebKey2020 or Ed25519VerificationKey2020 properly, but includes references to them and includes an @context that simply points at the did core v1 context.... These folks are only making a "mistake" because our working group chose not to take the same path I am proposing here when publishing https://www.w3.org/ns/did/v1.

We can see why people are assuming what they are doing is legal, we expect them to keep doing what they are doing... we can make what they are doing legal and interoperable, and useful.... why would we choose not to accept this proposal?... especially given that it does not block advanced context users from improving precision in the 2 ways mentioned above.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions