-
Notifications
You must be signed in to change notification settings - Fork 114
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
Align "usage" with "verificationMethod purpose" #362
Comments
Yes, I agree with what @OR13 said above ^ The I would also add that:
|
The reason it is ignored is that its not present in the did-core JSON-LD context. When we add our extension to the context for element, it will be returned by the universal resolver properly (and the did document will be valid JSON-LD again) https://docs.element-did.com/contexts/sidetree/sidetree-v0.0.jsonld |
@peacekeeper I wonder if we are hurting people by removing properties that are not in context from the universal resolver.... It makes it sorta hard to use the universal resolver to health check spec compliance. I was thinking of writing a script to resolve the example dids, and sign them with JSON-LD, and see which just fail, but some might pass because of things the universal resolver is doing that would otherwise fail... This is one such example. |
Another alternative would be to provide the raw json unprocessed, and some kind of indication of whether it is valid JSON-LD... |
Yes agreed, right now it is not clear that the content of the "Did Document" tab is processed and that properties may be filtered out |
Proof that sidetree did methods are not W3 compliant: https://travis-ci.org/decentralized-identity/context/jobs/641886720#L290 |
Hopefully after the F2F in Amsterdam we'll have some conclusions around the requirements and options related to the DID Document's composition and format that we can use to close this out. I would like to wait until after that to take any action, because they may made some decisions that impact what we can/must do. |
Sidetree did methods will still not be valid json-ld if they contain a context which does not define the correct way to handle this is:
ION may decide to not be linked data compliant, but element will be linked data compliant, so the protocol needs to reflect best practices for linked data, or sidetree won't be usable to create linked data did methods... all you need to do is know how to document properties in json and markdown... if you can't figure out how to do that properly you have no business touching cryptography. We need to agree on how we will document "protocol specific terms" like usage... which currently breaks document signing with linked data... making your did document not linked data is like fixing your car problem, by switching to a tricycle... not a solution for element. |
I'm not sure how "KeyUsage" from that spec refers to the cryptographic operations that a particular key can perform, which is not the same thing as a user authorizing a verification method to be used to verify a proof that was made for a particular purpose. For example: Key A, with "KeyUsage" "sign", can be used to sign proofs for the purpose of Key B, also with "KeyUsage" "sign", can be used to sign proofs for the purpose of Both keys use the "sign" cryptographic method here, but for very different purposes. Also note that both keys can mathematically (or according only to the cryptographic protocol) be used to sign proofs for either purpose. The math will work. This can be dangerous if Alice is running software that isn't sufficiently protecting her from accidentally signing the hash of a message that could be used for authentication -- when she thought it was only for making an assertion she intended to share with another party. BUT, a DID Document allows Alice to specify which verification methods are permitted to verify proofs based on the purpose of those proofs. Alice can use her DID Document to say that the verification method associated with key A (i.e., its public key) can only be used to verify proofs for the purpose of If a proof says |
KeyUsage
https://self-issued.info/docs/draft-ietf-jose-json-web-key.html#rfc.section.4.3 IMO, we should close the loop on this stuff in did-core, asap. |
See w3c/did-core#158 , we should just standardize what we are doing here in the did core spec, if possible |
Prefer:
|
Related #437 |
@thehenrytsai what is the format of this: https://github.com/decentralized-identity/sidetree/blob/master/lib/core/versions/latest/DocumentComposer.ts#L27 I assume its |
Like above? |
I'd like to close this, as I don't feel it has (or ever had?) any bearing on Sidetree's internal representations. I have updated one of the possible schema options to include a mechanism of ensuring keys are output correctly, to the right places in the resolved DID Document, regardless of what the endlessly churning DID WG renames/moves the properties and values to: https://identity.foundation/sidetree/docs/spec/#add-public-keys |
Sorry, had two tabs open, one local, one from the site - this is the right link: https://identity.foundation/sidetree/docs/spec/#add-public-keys |
I think we can close this... the property was removed... I just closed the did core issue that was related to this. |
To be clear: I have readded the property/mechanism to our own internal, non-DID Document key schema representation, which provides an abstraction layer that can be used to output keys anywhere in the DID Document they are needed/wanted: https://identity.foundation/sidetree/docs/spec/#add-public-keys Thankfully implementers can now choose a path where they'll never need to quibble at a protocol-level about this class of ramifications, which stem from seemingly endless changes to a spec that churns like the sea during a hurricane. I, for one, feel at peace knowing folks who follow the optional schema-based abstraction framework defined in the Sidetree spec can shrug and say "Whatever lil' buddies, we'll always output the right doc, no matter how frequently you attempt to pull the rug out". |
Its also the case, that Microsoft will no longer introduce breaking changes into the did document, that are not documented in did core, or a custom context, as was required previously... I call this a win win. |
We didn't introduce a breaking change with this prop, the devs simply tried to do something that seemed OK given the unsure state of play. Thankfully, there is no need to ever care about such nonsense again, given we can project keys and other values into |
You did. we have tests that prove that you did. You need to read the did core spec.... just to be super clear... you cannot add properties to a did document that are not defined in did core, and if you do, you need to extend the context, as we did to fix the breaking change for did:elem ... "usage: signing", was a breaking change... we had multiple bug reports from interop partners from it, here are the tests to show that we had to fix it: |
Yep, I realize that was the unintended outcome, but they were just trying to get something done that they didn't perceive the spec disallowed or provided for. My point in celebrating the closure of this issue is that we can now separate tracking of usage classifications from the nuances and shifting outputs of the DID Document, which should have always been abstracted away (at least in our opinion/approach) |
I agree, and I think its wise that sidetree core has this separation, but we must remain aware of anything in the outward representation that violates the did core spec... I am looking forward to adding support for did:ion to the did core registries, which will prove that it is compliant, and give us greater confidence, and warning about changes, that might be breaking. |
Consider:
capabilityInvocation
,assertionMethod
, etc... these are "usage".This topic was discussed in did core: w3c/did-core#2
IMO the correct way to handle this concept under the current world view of JSON-LD, is to define a sidetree context, and provide a new top level verificationMethod purpose called "recovery" or similar.
and then link the keys that are recovery keys as they are for
authentication
in the example above."usage = signing" is equivalent to assertionMethod.
Also note that since "usage" is not defined in the did core context, it must be defined in a method specific context to avoid errors, see also:
w3c/did-core#128
The text was updated successfully, but these errors were encountered: