Skip to content

Add @vocab to v2 context #1001

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

Merged
merged 2 commits into from
Jan 19, 2023
Merged

Add @vocab to v2 context #1001

merged 2 commits into from
Jan 19, 2023

Conversation

OR13
Copy link
Contributor

@OR13 OR13 commented Dec 14, 2022

Addresses: #953

@OR13 OR13 requested a review from msporny as a code owner December 14, 2022 20:36
Copy link
Contributor

@mprorock mprorock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an awesome path - i particularly like the private-claim approach for labeling

Copy link
Member

@msporny msporny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, supportive of the PR as long as the following change is made (see @iherman and @dlongley's comments as to why):

The @vocab URL should point to something that doesn't confuse these class of terms with the terms in the well defined vocabulary, so something like https://www.w3.org/ns/credentials/WORD# (in the case where we get rid of 2018). This will make it easy to have a separate page that caters to the intent of setting a global base vocabulary. The word we use for WORD will need to be debated, which was entirely predictable, given that some want to use @vocab to elicit something that's "undefined" (which is true for some definition of 'undefined'), while others want to use it for "private claims" (which is a misleading 'cause it can be used for public, but negotiated out of band, claims), while others want to use it for "issuer-dependent-vocabulary" (which is more accurate, but a mouthful).

@iherman
Copy link
Member

iherman commented Jan 11, 2023

The issue was discussed in a meeting on 2023-01-11

  • no resolutions were taken
View the transcript

2.4. Add @vocab to v2 context (pr vc-data-model#1001)

See github pull request vc-data-model#1001.

Manu Sporny: Next PR is 1001. It's about add vocabulary. We need more reviewers on this..

@vongohren
Copy link

vongohren commented Jan 12, 2023

Quick question, adding this vocab, technically means that all VCs will pass JSON-LD validation? So if you do a mistake it still passes and you have to look for private-claim to verify what is unreferenced? Just asking a stupid questions after trying to follow the issue

@msporny
Copy link
Member

msporny commented Jan 15, 2023

Quick question, adding this vocab, technically means that all VCs will pass JSON-LD validation?

Yes, correct. Now, in order to detect errors, you'll have to look for terms that map to the "undefined" namespace.

So if you do a mistake it still passes and you have to look for private-claim to verify what is unreferenced?

Yep, you got it.

@OR13 OR13 requested a review from msporny January 16, 2023 22:18
@OR13
Copy link
Contributor Author

OR13 commented Jan 16, 2023

@msporny please re-review.

@msporny msporny requested review from dlongley and iherman January 16, 2023 23:59
@vongohren
Copy link

Quick question, adding this vocab, technically means that all VCs will pass JSON-LD validation?

Yes, correct. Now, in order to detect errors, you'll have to look for terms that map to the "undefined" namespace.

So if you do a mistake it still passes and you have to look for private-claim to verify what is unreferenced?

Yep, you got it.

Cool cool. It sounds scary but I assume as a compromise all json ld referencers will add a warning? Or is it up to the verifiers and issuers to handle this?

@@ -1,6 +1,7 @@
{
"@context": {
"@protected": true,
"@vocab": "https://www.w3.org/ns/credentials/issuer-dependent#",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well... a minor point, however: I am not sure if we agreed on whether the URL for the VCDM vocabulary (not the context!) will be relocated to .../ns/credentials/. At this moment, it is still located in .../2018/.... We may want to wait merging this PR until that issue is solved. If, however, we decide not to relocate, then the URL for @vocab should be in .../2018/..., too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iherman yes... I discussed this with @msporny... I had same thought... This was the proposal that came from that... If this discussion balloons because of that choice, I suggest we revert to 2018.

@msporny
Copy link
Member

msporny commented Jan 17, 2023

Cool cool. It sounds scary but I assume as a compromise all json ld referencers will add a warning?

Nope, that is unlikely to happen on any sort of short term time frame. We're going to have to go back to the JSON-LD implementer community and see if they're interested in adding such a feature.

Or is it up to the verifiers and issuers to handle this?

Undefined. :)

This is why some of us were warning that putting @vocab in the base context was problematic. It basically turns off error processing. Some view turning off error processing as a good thing, leading to an easier adoption path for developers. Others view turning off error processing as silencing errors that could have catastrophic consequences for some use cases (like banking, finance, healthcare, etc.).

I know that Digital Bazaar is going to have to invest in adding a feature to our JSON-LD processors that will have a callback when certain types of triples are generated now (such as those that are in the "undefined namespace") in order to be able to throw linting warnings to developers that care about the use of @vocab.

Make no mistake, this is a "hold your nose" compromise for some of us. :)

@iherman
Copy link
Member

iherman commented Jan 19, 2023

The issue was discussed in a meeting on 2023-01-18

  • no resolutions were taken
View the transcript

2.2. Add @vocab to v2 context (pr vc-data-model#1001)

See github pull request vc-data-model#1001.

Manu Sporny: next item is remove zkp, we will address in special topic call later..
… next is PR 1001, it covers the @vocab URL, and provides terms for anything that are related to the issuer..
… we intend to provide better developer and user experience by for folks built on this feature.
… there are no objections, we intend to merge by end of day.

@msporny
Copy link
Member

msporny commented Jan 19, 2023

Normative, multiple reviews, changes requested and made, no objections, merging.

@msporny msporny merged commit 034e5d0 into main Jan 19, 2023
@msporny msporny deleted the feat/953-vocab-in-v2 branch January 19, 2023 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants