-
Notifications
You must be signed in to change notification settings - Fork 96
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
Current language around equivalent canonical DIDs increases signature verification complexity #421
Comments
This aligns with some of the comments I saw during the normative statements review document. Making this change will be incredible beneficial to the uncertainty that was added to those normative statements. I'm in favor of changing the normative statement from:
to
|
I always felt uncomfortable about allowing the An alternative to |
Proposal for a definition of the The |
+1 to @kdenhartog suggested revision to the definition for +1 to @peacekeeper suggestion around spelling preferred right too :) w.r.t whether the property should exist in the resolution meta-data or the actual did document, I can see an argument being made either way but am personally leaning towards it being a property of the did document. |
My argument for it being in the DID Doc is primarily based on two key points:
|
agree with the proposal, not a big fan of the term consider the triples:
|
Since we are picking colours for the bikeshed :)
|
Of the options, my first preference is |
I think the value should be allowed to be any URI, not just DID, to be consistent with |
+1 to @csuwildcat - the property belongs in the DID document. |
I'm a fan of |
@dlongley can you chime in to make sure we've settled on the right terminology? I chatted with Manu, Drummond, and others and they were good with this (sans whatever property name we choose) |
First, I'd like there to be a solution to the problem here. I'm onboard for helping where I can to find a good one. Second, however, I'm not sure this won't be trading one problem for another. Can someone explain how this will work when resolving the shortform version? If I see a Does special software have to be written to consider How will the verification method IDs appear in the DID Document? If there are two DID Documents (a long form one and a short form one), then I think the answer to that is more straightforward, i.e., getting a DID via ion should just be thought of as always getting two DIDs at once. Each DID resolves to its own DID Document and the short form one doesn't do any of this From this perspective, perhaps "preferredId" is not a strong enough name. Perhaps we want something that's more like a permanent redirect. Of course, this would have to be more like a "permanent redirect, if it exists" since I presume "preferredId" would appear in the long form DID Document. It's also a bit weird to make that statement about the DID subject, which may have multiple DIDs (with different methods) that refer to it -- which should be preferred? This points to it being a resolution thing as it seems to relate to the DID method rather than the DID subject. Is there way to do this elegantly such that if you try to resolve the long form DID, you get a DID Document with the long form in it -- but the metadata may say "permanent redirect" for when the short form DID is available on ledger ... and make it so that did:ion resolvers can automatically follow that redirect? That way, when you plug in a did:ion driver into a DID resolver library, it would follow the redirection and set the proper base URI and so on? Does this still cause the verification problems alluded to here? I suppose the problems may be caused by an attempt to do automated redirection instead of just surfacing this extra value that may optionally be used. But that doesn't seem to address the "ion is special" case -- I think it would be better if it didn't need special treatment, as it will harm adoption. Can we have a more concrete example of existing verification code and where it fails -- so we can analyze potential solutions? |
The spec text would be restored to state that you MUST always have the same DID in the
Not sure how - this is just about one logical DID, and you would see in
I just want to clarify that Sidetree is not special case: any implementation of DIDs that is strongly decentralized (like, come-and-take-my-Bitcoin-from-my-cold-dead-hands decentralized) will have a consensus delay before propagation. As a rule of thumb in decentralized consensus systems: if it's really fast to generate and propagate an L1 transaction (as in a couple seconds or less), it's probably not truly decentralized, and someone is slapping a on a "Decentralized!" sticker to sell a bill of goods.
^ This is more or less what this proposal is doing, but I think the existing language around the |
If I do |
Whatever ID you resolve would come back in the |
Veres One solves the problem differently. It requires that the DID itself include the public key fingerprint for its capability invocation key (the same key used to perform an action to register with the ledger). The resolution rules still resolve a Veres One DID whether it's on ledger or not, but the DID never changes. The difference is that, only once it's on ledger can you make edits to add additional keys, etc. This avoids the long form/short form problem entirely -- allowing usage of off-ledger or on-ledger DIDs with proof of control, but with the trade off that only on-ledger DIDs support updates and additional information. This approach also bridges the "wait for the ledger to reach consensus" issue. If Sidetree's use case always involves putting a DID on-ledger, then they may be able to take a similar approach. You can sign VCs before it's on-ledger that will remain valid once it is on-ledger. But if you need to have additional information like extra keys/services prior to the DID hitting the ledger, then you may need something like this other approach we're discussing. Other options involve signing VCs that would express that additional information instead. I just wanted to point out that there are other options for decentralized mechanisms -- it just depends on your constraints. |
Ok, that's what I meant by having two different DID Documents. That's relevant because I'm trying to see if there's a way to generalize this so it could become a part of DID consuming software vs. special casing it for ion. Another use case would be someone just trying to cause people to migrate from using one DID to a different one (including with a possibly different DID method). |
^ This is a good point, I wondered the same yesterday. |
Yeah, this is the case, we want to allow people to have full DID Documents with all features at inception. |
I'd like to explore this one more too |
This is somewhat related to whether or not the standard practice is for service endpoints to be in DID Documents or if they'd be found elsewhere ... because, if it were the latter, this would be a non-issue, right? Sidetree could take the same approach Veres One uses then. I don't want to bring the "service endpoint in DID Documents" issue into yet another thread, of course, but I do think this was worth mentioning because it's another benefit we would get from the separation of concerns. However, if we can figure out a way for this to function just like a "migration feature" would, I think that's the way to go. We don't have to debate the above because that sort of feature is useful regardless. I think we should make the solution/language used reflect that. |
@dlongley to an extent, however I would posit that there are other cases where we cannot get away with just one key at the inception for a DID document that does not involve service endpoints. Such as when I as the DID subject would like a DID that features keys that support key agreement and also keys that support bound signatures like a BLS12-381G1 key in BBS+ signatures. In general what I am saying is that we should not rely on the assumption that a single key at inception style DID is sufficient to cover all use-cases. |
We have a use case for a canonical network name along with aliases that can assist in discoverability. We currently allow DIDs that contain a domain name with
With canonical DIDs (or "migration feature"), we can also effectively "redirect" the resolver to a stable/permanent (canonical) identifier that doesn't depend on a domain.
An example of a permanent network identifier can be a genesis block hash, configuration hash (or similar). |
How does the following spec text sound? The |
untestable, suggest deleting. Suggest: It is RECOMMENDED that any parties relying the DID Document use the |
|
I agree with @dlongley ... but its not clear who is setting this property, and it is valid for a did controller to use the property... for example: Alice may want to leave DID Method A, and use DID Method B.... If A DID Method is ALWAYS setting this property, then its metadata, and doesn't belong in the did document.... but if a did controller can set it.... I think it's a property of the did subject..... consider a DID Web User, who realizes did:web lacks almost all the security advantages on DIDs... they simply update their DID Document:
Now everyone who relied on the If the property can be either metadata or a property of the did subject, I suggest we default to "self sovereign / controller" preference over did method reference from a spec interpretation perspective, obviously we can't control what did methods do, but we can guide standard interpretation of a canonical link relation. |
@dlongley the intention was not for some random ID assertion to be possible, the intention was to address the case where a DID Method contains multiple DIDs/formulations of the same singular, logical entity/DID within the Method. This property was not supposed to be something a Subject can just set, with it potentially being false or inaccurate, it was supposed to be a deterministic, secure, reliable output of the DID Method. As of now, we have no way for a DID Document to add any equivalence properties where it, the Method itself, can provide other deterministic DID formulations/entries that are all deterministically known to represent the same entity in the target Method <-- that's what we really want, and it's just as important as other fields where a Subject can paste the DID of the Queen of England, claiming to be the owner. (I would argue even more crucial, because we're talking about securely resolved/populated fields) There are really two props that would fill this whole:
|
Seems like a method specific extension, if the did method is the only party that injects this property. I see 2 options:
|
Proposal for an even more 'generic' The |
+1 to |
Two things dawned on me:
To that end, I believe a The |
@csuwildcat makes sense to me! |
@csuwildcat A DID method can still have a preference for a certain form of the DID. A Sidetree based DID method VDR (client) implementation needs to decide to switch to short form after observing it has been published. Similarly in our case (mentioned above) where we switch from a domain in the network segment to a genesis hash. The DID method has a preference for the genesis hash form of the DID. The VDR/app needs to be aware that some DID methods have this preference behavior, so that it uses the preferred DID form once available. It would be best to be able to signal the preferred/canonical form generically. The current draft has a signal during resolution where the subject ID can be the canonical form - which is where this thread started - and this capability is still valuable. |
@troyronda I agree that a separate canonical or redirection property is certainly a good idea, and would support an additional PR to express that distinct need. |
I assume this is now a request for 2 new did document properties?
Both seem like they are more accurately described as DID Document Meta Data, rather than DID Document Properties. It seems like hidden inside these proposals is the desire to require an RP to be able to switch on did document properties instead of did resolution meta data. I think the statements about the RP are untestable. I wrote some tests associated with these "long and short form" ids here: https://github.com/transmute-industries/vc.js/blob/master/packages/vc.js/src/vc-ld/__tests__/long-form-did.sanity.test.ts TL;DR; is that when you have 2 identifiers and the DID Method wants to say they are the same... thats a use case for OWL sameAs.... and any RP that is aware of both will have to support both forever (extra burden on RPs). https://www.w3.org/TR/owl-ref/#sameAs-def Before continuing on this thread, please review: @msporny strongly objected to the use of OWL, but I wonder if we limited the use of sameAs to "only a did method can set this property" would the objection continue? IIRC you mostly objected to the idea that a controller could set sameAs.
IMO the correct solution to this is:
And since the question will come up.... yes, the content present in both did documents MUST be identical for the property to apply... only the controller and |
@OR13 the owl:sameAs is about two individuals sharing the same identity, not two identifiers being deterministically synonymous variants of the exact same logical ID: "The built-in OWL property owl:sameAs links an individual to an individual. Such an owl:sameAs statement indicates that two URI references actually refer to the same thing: the individuals have the same identity". Regardless of who sets the property, owl sameAs is simply the wrong semantic, and not what this is about. |
Yes, if I'll also note that this is a super annoying burden on RPs. The DID Method is exposing its implementation beyond the DID Document and causing the rest of the ecosystem to get more complicated as a result. I expect active lobbying against the complexity of such a DID Method. :( |
Any lobbying against this will come from folks who don't have to deal with relativistic anchoring in decentralized systems, which is actually a fantastic litmus test that likely indicates they are not building truly decentralized DID Methods. There are many reasons IDs in a system can have exact deterministic synonyms/aliases, and the inability for a controller to present them securely to ensure exact equivalence recognition across them would be a big problem. |
@msporny if we can point to owl:sameAs and provide the same clarifying language for requirements/handling as I have in the associated PR, I could live with that. |
@msporny completely agree with you, and to get the lobbying started... nobody should be using the "LongForm" specifically because of this issue, however... I can't stop it, Microsoft is committed to forcing this burden on RPs, and I would like to at least have the equivalence formally documented.... if it's not documented, they will just do it anyway. @csuwildcat Let me rephrase your proposal in language I would not object to:
Note that I didn't say anything about "determinism and identifiers"... its not needed and overly coupled to sidetree's use case. will this work for you @csuwildcat ? |
This issue will be resolved once PR #431 is merged. |
Problem
As per PR which introduced the note in section 5.1 around intermediate representations now allowing the id to be populated with an equivalent canonical DID. This appears to have created some problematic cases that will increase the complexity around verifying digital signatures that involve DIDs making use of this feature.
For context, in this issue I am going to make things concrete with an example based on how sidetree intends to use the feature to convey the problem.
A Sidetree did has two canonical forms
The current behaviour around resolution making use of the newly added note, leads to the following
Resolving a long form ID where the did is un-anchored
resolve(did:ion:<long-form-id>)
Will yield the following response
Where as resolving a long form ID where the did is anchored
resolve(did:ion:test:<long-form-id>)
Will yield the following response, note the short form ID is present instead of the long form ID.
The above behaviour is potentially problematic when verifying certain digital signatures that makes use of DID's such as linked data proofs, as today much of the infrastructure assumes that the resolved document id matches that of the id used in the resolution request.
To make things concrete take the following example using VC's
If resolving
did:ion:test:<long-form-id>
returns a did document withdid:ion:test:<short-form-id>
as the ID, and further more, forms the base URI for the rest of the DID document, signature verification with many current implementations would fail.Proposal
Restore the restriction that the id in the resolved did document must match that used in the resolution request AND if there is a canonical or preferred alternative DID that is available (logic defined by the did method) then it should instead appear in a seperate property in the did document called
preferredDid
, meaning the example provided above would change toResolving a long form ID where the did is anchored
resolve(did:ion:test:<long-form-id>)
Will yield the following response.
The text was updated successfully, but these errors were encountered: