-
Notifications
You must be signed in to change notification settings - Fork 45
Refactor ABNF rules for DIDs and DID References. #168
Conversation
ABNF rules refactored. What remains (this should probably go in a separate PR? I'm not sure):
|
ceb72e6
to
dcded0a
Compare
1b9b126
to
22b492c
Compare
8435882
to
d9c39c7
Compare
How soon can this PR be accepted? |
did-reference = did (did-fragment-reference / did-service-reference) | ||
did-fragment-reference = "#" did-fragment | ||
did-service-reference = ";" service-id [ "/" service-path ] [ "?" service-query ] [ "#" service-fragment ] | ||
service-id = ALPHA / DIGIT / "." / "-" / "_" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following are not defined: did-fragment
, service-path
, service-query
, service-fragment
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, that's intentional. did-fragment
, -path
and -query
are mentioned in the next paragraph (basically, the ABNF for them is the same as in the URI RFC).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Unsure if that needs to be noted out or not. Leave it until someone else gets confused too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, yeah, I was wondering that same thing, but wasn't sure how to make it clearer. Does ABNF syntax have comments? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ABNF RFC is linked a few lines up! Comments: https://tools.ietf.org/html/rfc5234#section-3.9
Following is the ABNF definition using the syntax in [[RFC5234]] | ||
(which defines ALPHA as upper or lowercase A-Z). | ||
The following is the ABNF definition using the syntax in [[RFC5234]] | ||
which defines <code>ALPHA</code> and <code>DIGIT</code>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be moved up a section and phrased so that it covers The Generic DID Scheme section and DID Reference section?
@dmitrizagidulin If the preview link is correct, there's a |
@dmitrizagidulin Does |
There are more places where the def |
Co-Authored-By: dmitrizagidulin <[email protected]>
Co-Authored-By: dmitrizagidulin <[email protected]>
</p> | ||
|
||
<p> | ||
A specific DID scheme MAY specify ABNF rules for DID fragments that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be A specific <a>DID method</a> MAY...
?
DID fragments (which resolve directly within the DID document) to locate | ||
metadata contained directly in the DID document or the service resource | ||
given by the target URL without needing to rely on graph-based processing. | ||
A specific DID scheme MAY specify ABNF rules for DID Reference service paths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be A specific <a>DID method</a> MAY
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, yeah
Co-Authored-By: dmitrizagidulin <[email protected]>
Co-Authored-By: dmitrizagidulin <[email protected]>
I do not understand why we feel the need to use a different delimiter to distinguish service fragments from other types of fragments. Why can't we just use / for all fragments of any type, and require that their ID properties be unique within the DID Document? |
@dhh1128 I agree. At the Examples:
The latter, at a syntax (grammar) level, supports many levels of functional/capability innovation without having to change the grammar. It creates an "algebra" for working with a |
@dmitrizagidulin do you think everything in this PR has been addressed by #189 (in fact, that one even cherry-picked a few commits from here)? Or would you say this PR here still has content that needs to be merged? |
I wanted to highlight the example of what I brought up on the DID call today about key-type matrix param being used as a method to specify a specific key-type within a grouping of key-types. For example, let's say in my DID-Doc I specify a grouping of E.g. my DID Doc would be:
Then when referencing to the public key for verification, I could use To suggest that the same key can be used with multiple key types. If you were to use this for service-type it would be something like a grouping of services where a common set of services sit behind a single endpoint. So for example, I may run an Agent which supports DIDComm v1 and DIDCommv2 and I would specify the serialization of the object by using:
or
This is just an early example of where I think it may be used. I'm not sure if this indirection is useful, necessary, or neither. With that said, I want to take the time to agree with @dmitrizagidulin point raised that matrix params are not a method of optimizing resolver implementations. They should be used to identify a specific resource when the DID Doc contains metadata that describes a set. |
This PR is superceded by PR #189, so, it's ok to close this one. |
This PR integrates and reflects the current consensus on the DID ABNF rules, as well as DID Reference and Service Endpoint ABNF rules.
Specifically:
id:
properties in examples.Replaces PR #106, addresses #85.
Preview | Diff