-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide reusable context compatible with VC data model context #51
Comments
Yes, this is possible -- it's just a matter of someone putting in the time to do it, including thinking about how to best accomplish it and testing it. For example, should we have a different context per signature/proof type -- so you just attach your signature/proof type context? Or should there be one comprehensive security/v3 context that includes all of the latest? Should we do both? |
yes, this seems like a critical thing to do. |
Ran into this problem when trying to update the {
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"VerifiableCredential": {
"@id": "https://www.w3.org/2018/credentials#VerifiableCredential",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"cred": "https://www.w3.org/2018/credentials#",
"sec": "https://w3id.org/security#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"credentialSchema": {
"@id": "cred:credentialSchema",
"@type": "@id",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"cred": "https://www.w3.org/2018/credentials#",
"JsonSchemaValidator2018": "cred:JsonSchemaValidator2018"
}
},
"credentialStatus": { "@id": "cred:credentialStatus", "@type": "@id" },
"credentialSubject": {
"@id": "cred:credentialSubject",
"@type": "@id"
},
"evidence": { "@id": "cred:evidence", "@type": "@id" },
"expirationDate": {
"@id": "cred:expirationDate",
"@type": "xsd:dateTime"
},
"holder": { "@id": "cred:holder", "@type": "@id" },
"issued": { "@id": "cred:issued", "@type": "xsd:dateTime" },
"issuer": { "@id": "cred:issuer", "@type": "@id" },
"issuanceDate": { "@id": "cred:issuanceDate", "@type": "xsd:dateTime" },
"proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" },
"refreshService": {
"@id": "cred:refreshService",
"@type": "@id",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"cred": "https://www.w3.org/2018/credentials#",
"ManualRefreshService2018": "cred:ManualRefreshService2018"
}
},
"termsOfUse": { "@id": "cred:termsOfUse", "@type": "@id" },
"validFrom": { "@id": "cred:validFrom", "@type": "xsd:dateTime" },
"validUntil": { "@id": "cred:validUntil", "@type": "xsd:dateTime" }
}
},
"VerifiablePresentation": {
"@id": "https://www.w3.org/2018/credentials#VerifiablePresentation",
"@context": {
"@version": 1.1,
"@protected": true,
"id": "@id",
"type": "@type",
"cred": "https://www.w3.org/2018/credentials#",
"sec": "https://w3id.org/security#",
"holder": { "@id": "cred:holder", "@type": "@id" },
"proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" },
"verifiableCredential": {
"@id": "cred:verifiableCredential",
"@type": "@id",
"@container": "@graph"
}
}
},
"proof": {
"@id": "https://w3id.org/security#proof",
"@type": "@id",
"@container": "@graph"
}
}
}
Sent a message to the VC mailing list to try and get attention to this topic: https://lists.w3.org/Archives/Public/public-vc-wg/2020Oct/0000.html |
yep, see also: https://github.com/w3c-ccg/lds-ed25519-2020/blob/master/contexts/lds-ed25519-2020-v1.json https://github.com/transmute-industries/vc.js/tree/master/packages/ed25519-signature-2020 TL;DR is JSON-LD and VC Context and document loaders remain confusing for developers :( we need better examples. |
The v3 context should not bring in the v1 and v2 contexts, but instead define all of their terms directly, use |
agreed, PRs welcome to start that process for this file: https://github.com/w3c-ccg/security-vocab/blob/master/contexts/security-v3-unstable.jsonld |
That makes sense to me now. Wasn't thinking about that option. I'll start that effort so I can finish up v3 for BBS+ signatures |
Would it be possible to cook up a context for the security vocabulary that is compatible with VC data model context? So that it would be simple to reuse terms from the security vocabulary in the verifiable claims and presentations.
Currently both contexts are conflicting on some protected terms - namely Ed25519Signature2018 and maybe others.
The following example fails with
jsonld.SyntaxError: Invalid JSON-LD syntax; tried to redefine a protected term.
:open in playground
The text was updated successfully, but these errors were encountered: