Skip to content

https://w3c.github.io/did-resolution/contexts/did-resolution-v1.json may not be correct #117

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

Open
iherman opened this issue Jan 31, 2025 · 5 comments
Labels
pending-close Issue will be closed shortly if no objections pr-exists There is an open PR to address this issue.

Comments

@iherman
Copy link
Member

iherman commented Jan 31, 2025

At present, the context file includes

didDocument: "https://www.w3.org/ns/did/v1"

That is incorrect; the URL is the context file's reference for DID v1, not the URL of the didDocument property.

What this shows is that, at some point, the vocabulary for the did resolution must be properly defined, as it was done for the various vocabularies in the VC spec family.

@peacekeeper
Copy link
Collaborator

I agree, there are some aspects of this context that need to be fixed/improved.

In this case of the didDocument property, I think my rationale was that yes, https://www.w3.org/ns/did/v1 is the URL of the DID v1 context file. But could it not simultaneously ALSO be the URL of the didDocument property?

In other words, wouldn't it be somewhat logical that the URL of a property equals the URL of a context file which defines the data model that is the value (range) of the property?

If this makes no sense from an RDF / Linked Data perspective, no problem, happy to change it :)

@iherman
Copy link
Member Author

iherman commented Feb 1, 2025

In this case of the didDocument property, I think my rationale was that yes, https://www.w3.org/ns/did/v1 is the URL of the DID v1 context file. But could it not simultaneously ALSO be the URL of the didDocument property?

One could argue that the RDF specification does not say anything, formally, about the Resource that is retrieved by the URI used to identify a resource, so this is not fully incorrect. But I believe it goes against Linked Data practice. When dereferencing a property's URL, one expects an RDF Schema entry definition of a term or, at the minimum, a human readable definition of the term. Not a JSON-LD context file, which is a totally different animal.

(See, for example, the controller term, whose identifier is https://w3id.org/security#controller, and which dereferences to an HTML+RDFa definition if HTML is requested, or Turtle equivalent if Turtle is requested.)

I believe the right thing to do is to say:

didDocument: "https://w3id.org/did-resolution#didDocument",

and, at some point, we should work on the formal vocabularies (including the DID Core vocabulary) to provide a proper definition for the term (and the others). Just repeat what we did for VC. Such vocabulary definition(s) would include a Class definition for DidDocument, subclass of sec:controlledIdentifierDocument, which would be the range for didDocument.

Whether we define one common vocabulary for DID Core and for Resolution, or whether we define two separate vocabularies, is up to the WG to decide. (E.g., in VC, we have three separate vocabularies (VCDM, Status list, and Data Integrity) and, for historical and deployment reasons, we put all the controlled identity terms into the Data Integrity vocabulary.)

CC @pchampin @msporny @dlongley

@msporny
Copy link
Member

msporny commented Feb 1, 2025

I agree with Ivan's take on the situation.

We also might want to question whether resolver results should be JSON-LD (and not just plain JSON). We might be creating more work than necessary for ourselves if we try to make resolver results themselves be JSON-LD.

@iherman
Copy link
Member Author

iherman commented Feb 2, 2025

We also might want to question whether resolver results should be JSON-LD (and not just plain JSON). We might be creating more work than necessary for ourselves if we try to make resolver results themselves be JSON-LD.

I am not really versed in the work on resolvers, so I did not want to say that... But I agree. When reading the spec, I was a bit surprised to see JSON-LD there.

Nevertheless, although not necessarily a concern for the resolution spec, we will have to clean up the vocabulary for DID Core.

@peacekeeper peacekeeper added the pr-exists There is an open PR to address this issue. label Mar 15, 2025
@peacekeeper
Copy link
Collaborator

Marking as pending-close, since #135 has been merged and new issues w3c/did#884 and #137 have been created.

@peacekeeper peacekeeper added the pending-close Issue will be closed shortly if no objections label Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-close Issue will be closed shortly if no objections pr-exists There is an open PR to address this issue.
Projects
None yet
Development

No branches or pull requests

3 participants