-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add support for initial-state #23
Conversation
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Tagging @peacekeeper and @csuwildcat and @OR13 and @TelegramSam and @swcurran . This is my proposed update to peer DIDs that would make support for |
core.html
Outdated
@@ -169,6 +169,8 @@ <h2>Recognizing and handling peer DIDs</h2> | |||
capture group 1, <code>transform</code> in capture group 2, and <code>encnumbasis</code> in capture group 3. | |||
</p> | |||
|
|||
<p>Note that peer DIDs can also be used in DID URIs, with query parameters. Currently, the only query parameter formally defined for peer DIDs is <code>initial-state</code>, discussed <a target="#initial-state">below</a>. However, other parameters may be used by a given implementation, so recipients of a peer DID URI should at least be prepared to parse the DID into its base DID value and its query string portion (which begins with the <code>?</code> character. All query parameter values in peer DID URIs are base64url encoded.</p> |
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.
Are you planning to just use the default version-time stuff from did-core which is why we have this statement: "Currently, the only query parameter formally defined for peer DIDs is initial-state
," because technically this method only defines one. However, we would expect implementations to use some if not all of the query parameters defined in did-core.
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.
Ooh, good catch.I will remove the "only query parameter" language.
I think peer dids need to support version stamping. I don't know about version timing; each party sees evidence for an update accumulate in different orders and at different times. @kdenhartog or @peacekeeper , can you point me to docs on the versioning parameters?
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.
Fixed.
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 only documentation I'm aware of is here: https://w3c.github.io/did-core/#generic-did-url-parameters
did-docs.html
Outdated
<p> | ||
This places the value of the <code>initial-state</code> parameter in capture group 1. | ||
</p> | ||
<p>To interpret the parameter value, it must first be base64url decoded. The result MUST be a JSON array containing zero or more deltas. An empty parameter value is also allowed, and is considered equivalent to an empty JSON array.</p> |
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.
I'm a bit confused about what you're describing with the JSON array containing zero or more deltas. Is the recipient expected to rebuild the did document from the various deltas provided in the initial-value parameters?
In sidetree just the did document is provided in base64url encoding, but there's no requirements about the canonicalization of the data in the document unlike what would occur with the deltas to get a proper output from the CRDT by the reciever. So, my interpretation is the value of this parameter is slightly different than what's in sidetree, but the end goal is the same (pass the information in a did document as a query parameter)
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 peer DID spec differentiates between the stored variant of a DID doc and the resolved variant. The resolved variant is a canonical DID doc. The stored variant is a set of deltas from which a resolved variant can be derived. The deltas are what must be transmitted in initial state, not the rendered doc.
Here is my documented its got test vectors and a spec, and it lets you decide how you want to interpret a "mutation" to a did documents, represented as a URI...
@dhh1128 I suggest considering |
@OR13 : Converting the deltas strategy of peer DIDs to use |
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
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.
Looks good, lets continue the discussion about initial-state
vs signed-ietf-json-patch
on the linked issue.
lacks complete update of the new method in the rest of the document. Signed-off-by: Sam Curren <telegramsam@gmail.com>
Signed-off-by: Sam Curren <telegramsam@gmail.com>
Signed-off-by: Sam Curren <telegramsam@gmail.com>
Not yet polished. Signed-off-by: Sam Curren <telegramsam@gmail.com>
Signed-off-by: Sam Curren <telegramsam@gmail.com>
Signed-off-by: George Aristy <george.aristy@securekey.com>
From Kyle Co-authored-by: Kyle Den Hartog <kdenhartog@users.noreply.github.com>
…_to_verificationMethod refactor: publicKey -> verificationMethod
fixes spec rendering
…ch-1 fixes spec rendering
Signed-off-by: sklump <srklump@hotmail.com>
…ty-pass typo, regex finesse
fix json syntax
Fix of matching regex and example 4
- Use 2020 verification methods with publicKeyMultibase instead of outdated publicKeyBase58 - Update the main peer DID Doc example: fixed some values, added accept field to services
Fix and Updated DID Doc examples
…er-did-method-spec into fix-service-encoding � Conflicts: � core.html
Signed-off-by: dhh1128 <daniel.hardman@sicpa.com>
Add additional authors
…ice-encoding Fix of service encoding in numalgo2
publicKeyMultibase must contain multicodec prefix (and hence equal to the encnumbasis)
…e-fix Fix peer DID Doc example
@dhh1128 this PR has been sitting for some time, are there any blockers to merging? It's referenced in the DIDComm v2 implementer's guide, and we're looking to use it as the mechanism to share peer DIDs over DIDComm v2 messages, so it would be good to know if this is/isn't the direction the spec will go. |
Thank you for the ping, @Moopli . I thought this had been merged. There is no impediment to doing so, in my mind. |
core.html
Outdated
@@ -169,6 +169,9 @@ <h2>Recognizing and handling peer DIDs</h2> | |||
capture group 1, <code>transform</code> in capture group 2, and <code>encnumbasis</code> in capture group 3. | |||
</p> | |||
|
|||
<p>Note that peer DIDs can also be used in DID URIs, with query parameters. Currently, the only query parameter formally defined for peer DIDs is <code>initial-state</code>, discussed <a target="#initial-state">below</a>. However, support for `hl` and `version-id` will be specified soon, |
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.
<p>Note that peer DIDs can also be used in DID URIs, with query parameters. Currently, the only query parameter formally defined for peer DIDs is <code>initial-state</code>, discussed <a target="#initial-state">below</a>. However, support for `hl` and `version-id` will be specified soon, | |
<p>Note that peer DIDs can also be used in DID URLs, with query parameters. Currently, the only query parameter formally defined for peer DIDs is <code>initial-state</code>, discussed <a target="#initial-state">below</a>. Peer DIDs also support `hl` and `version-id` which are defined in <a target="https://www.w3.org/TR/did-core/#did-parameters">DID-Core</a>. |
core.html
Outdated
@@ -169,6 +169,9 @@ <h2>Recognizing and handling peer DIDs</h2> | |||
capture group 1, <code>transform</code> in capture group 2, and <code>encnumbasis</code> in capture group 3. | |||
</p> | |||
|
|||
<p>Note that peer DIDs can also be used in DID URIs, with query parameters. Currently, the only query parameter formally defined for peer DIDs is <code>initial-state</code>, discussed <a target="#initial-state">below</a>. However, support for `hl` and `version-id` will be specified soon, | |||
and other parameters may be used by a given implementation, so recipients of a peer DID URI should at least be prepared to parse the DID into its base DID value and its query string portion (which begins with the <code>?</code> character. All query parameter values in peer DID URIs are base64url encoded without padding (consistent with JOSE conventions).</p> |
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.
and other parameters may be used by a given implementation, so recipients of a peer DID URI should at least be prepared to parse the DID into its base DID value and its query string portion (which begins with the <code>?</code> character. All query parameter values in peer DID URIs are base64url encoded without padding (consistent with JOSE conventions).</p> | |
Other parameters MAY be used by a given implementation, so recipients of a peer DID URL should at least be prepared to parse the DID into its base DID value and its did parameters. All query parameter values in peer DID URLs MUST be base64url encoded without padding (consistent with JOSE conventions).</p> |
did-docs.html
Outdated
</p> | ||
<p> | ||
The way to do this is to use the <code>initial-state</code> query parameter of a peer | ||
DID URI. All implementations of peer DIDs are required to recognize the meaning of this |
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.
DID URI. All implementations of peer DIDs are required to recognize the meaning of this | |
DID URL. All implementations of peer DID implementations MUST recognize the meaning of this |
did-docs.html
Outdated
The way to do this is to use the <code>initial-state</code> query parameter of a peer | ||
DID URI. All implementations of peer DIDs are required to recognize the meaning of this | ||
query parameter, though only implementations that support deltas (layer 2 or 3) need to | ||
process it. The parameter value can be extracted from a peer DID URI with the following |
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.
process it. The parameter value can be extracted from a peer DID URI with the following | |
process it. The parameter value can be extracted from a peer DID URL with the following |
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.
Just some minor editorial changes I spotted which should help implementers with interop - the content of the PR still looks good to me and if anything is controversial and you don't want to merge it that's fine. Feel free to leave it off and we can sort it later.
@dhh1128 @kdenhartog we're preparing to release a new version of afgo which uses peer DID initial-state for sharing peer DIDs in DIDComm V2; it looks like this fell through the cracks again, any chance it can be wrapped up and merged, if opinions on it remain the same? |
Signed-off-by: dhh1128 <daniel.hardman@gmail.com>
Signed-off-by: dhh1128 <daniel.hardman@gmail.com>
I resolved the merge conflicts and can now merge this. However, the reason this languished so long is that @TelegramSam wrote a different algorithm for generating a numeric basis ( |
I can't really comment if this is still needed considering the latest developments in did:peer and KERI, but wanted to mention that we switched to camelCase for DID parameters (including |
Signed-off-by: dhh1128 <daniel.hardman@gmail.com>
Thanks for the reminder, @peacekeeper . I have updated the PR to use camelCase. |
I closed this because it appears that we never got consensus, and it is now very old. |
Signed-off-by: Daniel Hardman daniel.hardman@gmail.com