-
Notifications
You must be signed in to change notification settings - Fork 13
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
How to authenticate a DID rotation #3
Comments
The DID spec is light on the details of how controllers should be interpreted, leaving the explanation to specific DID methods it seems. A good number of the open issues have to do with the semantics of controllers: https://github.com/w3c/did-core/issues?q=is%3Aissue+is%3Aopen+controller We can say that the top-level controller field is optional, and can be a DID string or set of DID strings identifying other subjects. If provided, then only the set of controllers are allowed to make changes to the DID document (and presumably, should authorize version 0 as well). If left out then we would want the DID subject to be authorizing changes on their own behalf, as opposed to them not requiring any authorization. Looking at |
After thinking through this and texting with Drummond and @peacekeeper, I think this is the best we can do if we want to enforce that only an authorized key (or keys) can update the DIDDoc of a DID. The first part of this covers the single key use case of a
For multi-sig, we define that a
|
A thought I've had after reading the I also like that they have a ranking of recovery keys in their list but I don't like that they allow you to make changes with a higher authority for 72 hours so I'm not sure we can do anything with that idea..
|
I agree that the keys that are allowed to update the DID document should be separate from the keys used for other purposes, like signing VCs. Based on my reading of the DID Core spec,
It gets a little complicated for me when considering external controllers:
|
@andrewwhitehead and I talked about this and we think we have a generalized approach, with some “details” that we can adjust based on feedback. Basically:
|
^ One caveat here is that an external controller probably wants to separate the keys they use to update their own DID Document versus the keys used to update (authorize an update to) someone else's DID Document. |
Arrgghh…turtles all the way down. Yes — I think I momentarily thought about that and decided to suppress the idea. Ah…does the |
In regards to the
Essentially it is meant to point to the entity that controls the key data. Manu adds some explanation here: (w3c/did-core#802 (comment)). Looking at the different combinations of key IDs and controllers, with an example DID document
|
I believe that given the RDF interpretation of |
Wow…that seems very unhelpful. The “same key” stuff seems very unhelpful. Do you understand that well enough to know what we need to do? The issue seems to be that there is no key type (e.g. |
I would suggest for self-signed documents, use the For external controllers, we can't predict the DID method that will be used, and so we can't assume they are able to add new proof purposes. For this reason, one of the existing purposes should be chosen. |
Hmmm…ok I guess, but weird that we would use a differnt type depending on whether it is an internal vs. an external controller DID. Not my favourite and it does make the code more complicated. |
Planned approach:
For signing, the DID controller would indicate what key reference(s) are to be used, and provide an endpoint for a signing service. The DI proof would contain the references to the key(s) used. For verifying, the verifier would confirm that the reference(s) to the keys are in the authorized list (with the threshold met if using |
I think in the interest of keeping validation efficient, we should only look at verification methods (authentication keys) in the current document and NOT require resolution of any controller DIDs. Every proof would have to reference a key within the previous version of the document. The verification methods in the document may have an external controller value set, which would have to be listed in the DID doc controllers as well, but I suggest we should not take the step of resolving that controller and checking that the key is also present there, at least when used for the purpose of DID document updates. If the key is used for other purposes then of course verifiers are capable of doing that extra check. |
I think you are indicating a difference in what should be in the spec. vs. an implementation. I think the spec. should indicate that anything valid is…well, valid. So if the DID wants to put external DIDs into the controller property, it can do so. For verification, the key reference being used in the proof is in the proof itself (right?). A verifier only needs to resolve an external DID if the key reference is to an external DID and that DID is listed in the DID For the controller signing an update, it is up to the DID Controller to decide what key reference is to be used for the DID. It can decide to only use internal keys, to use an external DID or even to list multiple DIDs and then use whichever one it needs. |
New proposal:
The reason I think the first is important is the typical Multi-Sig use case -- such as when a Board of Directors control the DID of an entity. In that case, it is likely all of the DIDs are of the same type, and so resolvable. It does create the possibility of turtles all the way down, but... @andrewwhitehead -- acceptable? |
This creates an external dependency such that another DID is able to break the history of my DID. For example If an external |
I feel like it should be up to the client to resolve an external controller for extra verification if that is what they want to do. The resolution process is just returning the current state of the DID document and checking the internal consistency of the history. |
I disagree. It’s not your DID, it’s “their” DID, since they are a controller. That’s the point of a controller.
The problem with this is that we’re saying — “We’re resolved the DID and verified the history. Well, most of it. Over to you.”. I don’t see a problem with resolving DIDs that we know we can (at least try) to resolve. Agree we should not include all DIDs, hence the limit to the DIDs we know. But you do raise the interesting case of resolving the DID that we can’t full verify, and (somehow…) communicating to the caller that we did that. AFAIK — there is no way the client to a resolver can know that the resolution is only partially complete. They only get a DIDDoc from the resolution — they don’t get the log. |
yes fair, but I mostly mean it creates a technical external dependency. So the resolution of a DID that has a |
Solution that we're going to put in the first draft:
|
Interestingly, the digital bazaar libraries require a |
Ok, I think I have removed my fear of that. The main controller can revoke the key themselves.. so they can be watching the other controllers did doc themselves and then revoke it themselves should there be any funny business |
To update a DID Document a key MUST be listed as a |
Questions about the implementation:
|
Yeah right now I am requiring authentication type. This is actually something I realized is wrong about my mental model of DIDs. I used to think keys always had to be in one of the relationship lists and then keys were listed in verificationMethod so that they could be repeated with multiple relationships. But it sounds like most people treat the verificationMethod list as a catch all so keys in there are valid for any purpose. I'll have to update both my mental model and the implementation 😅 Unfortunately I haven't had a chance to investigate verifiableCondition enough so I can't answer that second question |
I don't think that keys in verificationMethod should be acceptable for just any purpose, but it seems to be preferred to put the full key definition there and only place references in the other properties. |
The method must only allow rotations of DID documents by the
controller
.Controller is a bit of a loaded term but my assumption is that this is the
controller
property of the DID doc. If so, the first document will be lacking this property won't it? What do we expect a controller property to look like? It can be a set of keys but we would have to further specify (see #2)The text was updated successfully, but these errors were encountered: