w3c-ccg / did-spec

Please see README.md for latest version being developed by W3C DID WG.
https://w3c.github.io/did-core/
Other
124 stars 45 forks source link

[The Generic DID Scheme] The language in this section contradicts the previous language in the Terminology section #131

Closed mwherman2000 closed 5 years ago

mwherman2000 commented 5 years ago

In https://w3c-ccg.github.io/did-spec/#the-generic-did-scheme, the language in this section (see below) contradicts the language in the terminology section with respect to DID Fragments, etc. This is super confuding.

The generic DID scheme is a URI scheme conformant with [RFC3986]. It consists of a DID followed by an optional path and/or fragment. The term DID refers only to the identifier conforming to the did rule in the ABNF below; when used alone, it does not include a path or fragment. A DID that may optionally include a path and/or fragment is called a DID reference. Following is the ABNF definition using the syntax in [RFC5234] (which defines ALPHA as upper or lowercase A-Z). did-reference = did [ "/" did-path ] [ "#" did-fragment ]

In section https://w3c-ccg.github.io/did-spec/#terminology, it states..

DID Fragment The portion of a DID reference that follows the first hash sign character ("#"). A DID fragment uses the same syntax as a URI fragment. See section 5.5. Note that a DID fragment MUST immediately follow a DID. If a DID reference includes a DID path followed by a fragment, that fragment is NOT a DID fragment. DID Path The portion of a DID reference that follows the first forward slash character. A DID path uses the identical syntax as a URI path. See section 5.4. Note that if a DID path is followed by a fragment, that fragment is NOT a DID fragment. DID Reference A DID plus an optional DID path or DID fragment.

The language in these sections contradict each other - especially the phrase:

A DID that may optionally include a path and/or fragment is called a DID reference.

mwherman2000 commented 5 years ago

Misuse of "DID" ...see https://github.com/w3c-ccg/did-spec/issues/121#issuecomment-455267182

Reference: Hyperledger Indy/Sovrin Comprehensive Architecture Reference Model (INDY ARM) - latest version - bullets (12) thru (16) in both the diagram, Narration, and principles.

jandrieu commented 5 years ago

Agreed. This whole section appears to be inconsistent.

I would argue the problem is that the ABNF is wrong as is the language describing it. IMO, the entire string is the DID, just as the entire string is the URL (the "URL" is not a subset of the string, it is the string entire, which is comprised of parts).

For example, URLs are defined as

       <scheme>:<scheme-specific-part>

in RFC 1738

https://www.ietf.org/rfc/rfc1738.txt

To state the DID is just the first part is confusing and misleading.

We should discuss this on the weekly CCG call.

mwherman2000 commented 5 years ago

The id (DID) attribute of a DID Document/DID Entity is actually a URN ...a subclass of URI ...and specifically not a URL. URL is a centralized concept.

Reference: https://github.com/w3c-ccg/did-spec/issues/155

jandrieu commented 5 years ago

Incorrect. A URL is a URI that resolves to a resource. DIDs resolve to DID Documents. And this DID Entity thing you mention is apparently a construct of your work. It's not a thing in the the W3C work.

dmitrizagidulin commented 5 years ago

Addressed in PR #168.

rhiaro commented 5 years ago

The sections mentioned have been completely rewritten, and "DID Reference" is no longer a concept in the spec. I think that is sufficient to close this issue.