Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Did Query #85

Closed
SmithSamuelM opened this issue May 23, 2018 · 12 comments · Fixed by #189
Closed

Did Query #85

SmithSamuelM opened this issue May 23, 2018 · 12 comments · Fixed by #189
Assignees
Labels
discuss Wider discussion in an issue or meeting required before merging

Comments

@SmithSamuelM
Copy link

This action item from the Did Spec Completion proposals doc did not make it into the latest did spec 0.1

#2: DID URI Query Component
Motivation
We forgot to include the URI query component in defining DID ABNF. There was no reason for this; it simply an oversight.
Proposal
Add the DID query component to the ABNF in section 3.1, and add a section to define it.
did-reference = did [ ";" did-service ] [ "/" did-path ] [ "?" did-query ]
[ "#" did-frag ]
did = "did:" method ":" specific-idstring
method = 1namechar
namechar = %x61-7A / DIGIT
specific-idstring = idstring ( ":" idstring )
idstring = 1
idchar
idchar = ALPHA / DIGIT / "." / "-"
did-service = 1
servchar ( ";" 1servchar )
servchar = idchar / "=" / "&"

@SmithSamuelM
Copy link
Author

The presence of the DID query has two main syntactical interpretations.

When a DID path component is present the DID query is a modifier on the did path resource in the same way that it works on a URL.

When a DID path component is not present then the DID Query is a modifier on the Did meta-data obtained from the DDO and narrowed by the did fragment if present.

@SmithSamuelM
Copy link
Author

The query string can be used for any query purpose after the id-string, the md-string, or the path-segment.

@SmithSamuelM
Copy link
Author

What is remaining to close and merge this pull request? The Query was always meant to be part of the DID syntax but was left out as an oversight.

@peacekeeper
Copy link
Member

I think PR 106 nicely fixes the ABNF, but..

  1. There are a number of other small issues with the PR which I have articulated there (e.g. in a few places it seems to assume that fragment comes before query?).
  2. While adding did-query to the ABNF seems uncontroversial, there is more discussion about did-service elsewhere.

Perhaps @mikelodder7 can update his PR accordingly, or we start a new PR.

@mikelodder7
Copy link
Contributor

Okay, I'll do that and try to get to pushing an update today.

@mwherman2000
Copy link

mwherman2000 commented Jan 30, 2019

Shouldn't the URI/URL/URN refactoring of the draft DID spec precede these kinds of changes? Reference: #159 (comment) I believe the refactoring will require more changes than is currently being imagined (even with the goal being to minimize these effects).
CC: @msporny

@SmithSamuelM
Copy link
Author

See my comments on #90. If we use the existing elements in the right way we don't have to redefine the URL/URI syntax. Its a big hit if we do so we should be clever about the semantics and restrain ourselves on modifying the syntax. If we use the JSON PTR in the fragment and the DID path presence as a semantic switch then we can define custom but narrowed contextual semantics for the DID query which I believe future proofs the specification.

@mwherman2000
Copy link

mwherman2000 commented Jan 30, 2019

There's several additional issues related to the ABNF grammar in section https://w3c-ccg.github.io/did-spec/#the-generic-did-scheme ...shouldn't these be addressed as well ...as a single PR?

  1. Did Query #85 - DID Query (this issue).
  2. [TERMINOLOGY] DID Fragment issues #126 - DID Fragment issues
  3. [TERMINOLOGY] The definition of a DID Reference omits the need for the punctuation character #128 - DID Reference omits the need for the punctuation character
  4. [TERMINOLOGY] The definition (the specific wording) of/for DID Scheme is confuding. #129 - definition (the specific wording) of/for DID Scheme is confuding
  5. [The Generic DID Scheme] The language in this section contradicts the previous language in the Terminology section #131 - language in this section contradicts the previous language
  6. [The Generic DID Scheme] References are not referred to consistently e.g. "[RFC3986]" .vs "[URI]" #132 - References are not referred to consistently
  7. [Specific DID Method Schemes] Very, very confuding non-recommendation for central registries needs to be removed #133 - confuding non-recommendation for central registries
  8. [Specific DID Method Schemes] Reference to "The fully qualified DID" ...not necessary #134 - Reference to "The fully qualified DID"
  9. [Specific DID Method Schemes] Names of "ABNF rules" not named consistently (capitalization) #135 - "ABNF rules" not named consistently
  10. [The Generic DID Scheme] ABNF definitions for did-path and did-fragment are missing from the draft specification #136 - definitions for did-path and did-fragment are missing

@SmithSamuelM
Copy link
Author

It would be great if there were anyway to get them all resolved in a batch. We spent a lot of time last year on a DID Hardening effort to resolve issues in a batch. #85 was part of that. The ones above are all new since then. Some of the confusion in the above is not realizing that the DID query is supposed to be there and can be used. So if I seem discouraged its because after a year stuff was agreed upon still did not get merged. So getting 9 new things resolved at the same time seems impossible.

@msporny
Copy link
Contributor

msporny commented Jan 30, 2019

Shouldn't the URI/URL/URN refactoring of the draft DID spec precede these kinds of changes?

No, because of the reasons @SmithSamuelM mentions. This is also a much smaller change thatn refactoring the entire spec. Small changes go in first, then large changes (as a general rule)... it causes way less merge conflicts. This change has also been hanging out there for a while and implementers need some closure on it.

@SmithSamuelM
Copy link
Author

+1

@dmitrizagidulin
Copy link

Addressed in PR #168.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discuss Wider discussion in an issue or meeting required before merging
Projects
None yet
7 participants