-
Notifications
You must be signed in to change notification settings - Fork 16
Adds the technical definition of watchers to the specification #181
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
Conversation
Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
Updated the PR to add items discussed at the 2025-03-13 Meeting. Notably:
Not done yet:
|
…version of the specification and includes the OpenAPI yml definition Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
spec/specification.md
Outdated
@@ -1027,7 +1030,8 @@ has the following data structure: | |||
"threshold": n, | |||
"witnesses" : [ | |||
{ | |||
"id": "<did:key DID of witness>" | |||
"id": "<did:key DID of witness>", | |||
"watcherURL": "<URL>" |
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.
here we have the watcher URL in the witness but above there is a watchers array. I'm confused on this is this intended mixing witnesses and watchers feel strange to me.
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 idea is that if a witness is a watcher, we want the resolver to know that as it provides additional metadata about who the witness is that can be helpful for governance (which is outside the scope of the spec.). The DID Controller also uses that with the “watcher API” that it can send the witness a notification of a new entry before it is published, to allow getting back a witness proof. I think it is logical that a witness for a DID also be a watcher and so we should encourage it and tie the two together.
That said, it does add a bit of complication, and I’m not 100% tied to it. I can see removing that and the watcher entry notification API endpoint.
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 don't know if tying the two concepts together this tightly makes sense although I do understand the desire to have a URL for a witness. I don't think cheating and calling it a watcherURL is the way 😄
[[ref: Watchers]] are components found in some digital trust and DID ecosystems that monitor DIDs on behalf of clients for various purposes, such as: | ||
|
||
- **Caching verified DIDs:** Storing verified DID documents to facilitate efficient resolution. | ||
- **Ensuring persistence:** Maintaining access to DIDs even after removal by the [[ref: DID Controller]]. For example, the [Verifiable Data Gateway](https://github.com/LedgerDomain/did-webplus?tab=readme-ov-file#verifiable-data-gateway-vdg) in [did](https://github.com/LedgerDomain/did-webplus/blob/main/README.md)[:webplus](https://github.com/LedgerDomain/did-webplus/blob/main/README.md) could function as a [[ref: watcher]] for enduring DIDs. |
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 don't know if the reference to did:webplus is a good idea it might confuse people
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.
Reasonable. My hope was that the it would encourage the did:webplus folks to formalize their VDG as a watcher as we have defined it. It’s non-normative, so not a spec issue.
spec/specification.md
Outdated
|
||
did:webvh provides two mechanisms for notifying resolvers (and their clients via [[spec:DID-RESOLUTION]] metadata) about configured [[ref: watchers]]: | ||
|
||
1. Witness-watchers: A [[ref: witness]] **MAY** also act as a [[ref: watcher]], indicated by the watcherURL attribute in the witnesses [[ref: parameter]]. If a [[ref: witness]] is removed, it ceases to be a [[ref: watcher]]. |
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.
Why have the differences? Can't a witness watcher euro just be put into the standalone watchers?
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.
It can — it just has to be done explicitly. If the witness is dropped, they are removed from the witness and the (implied) witness-watcher list. If the DID Controller redefines the watcher list with that watcher, that’s fine.
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.
It feels like we have three different concepts now
- a witness
- a witness-watcher
- a watcher
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.
Yes. But for the reasons given, that second category is useful.
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.
Maybe 1 isn't then? This comes back to the question about how to get a proof from a witness. Previously, we had said this was out of spec and now we sort of have this in spec in the second category, but not in the first category.
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.
Interesting idea…requiring that all witnesses be a watcher and provide a Watcher URI? Others?
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.
Strong -1 from me, as we have significant work done with the didcomm witness protocol and this would effectively scrap the current did webvh server work and acapy witnessing work.
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.
It's not clear to me where the desire to have an endpoint to get a witness signature in the log file comes from. Who does this benefit? Surely the controller already knows how to get a witness signature prior to adding this witness to an entry. The witness parameter is there for resolvers to ensure the log has been properly witnessed.
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.
We can leave it off — it was a bit of throw in and perhaps not well thought out.
It has value in that it defines an optional way to retrieve a witness proof. A DID Controller/Witness is not forced to use it if the witness is also a watcher — it is just possible. So the approach you are using is completely valid. It is just that since we have this option, it can be used. That said, we can remove it from the Watcher spec, and a DID Controller can have its witnesses use such as endpoint.
As I write this, I think it is best that we drop it from the spec — it is not obvious why it is there. I’ll remove it, and let’s add an article to the information site about the different ways DID Controllers and Witnesses can interact — including what you have done, @PatStLouis and this approach.
1. Witness-watchers: A [[ref: witness]] **MAY** also act as a [[ref: watcher]], indicated by the watcherURL attribute in the witnesses [[ref: parameter]]. If a [[ref: witness]] is removed, it ceases to be a [[ref: watcher]]. | ||
2. Standalone watchers: The watchers [[ref: parameter]] lists URIs that identify independent [[ref: watchers]]. | ||
|
||
Watcher URIs MAY use schemes other than HTTP(S), such as a DID ([[spec:DID-CORE]]), depending on the specific implementation or network requirements. However, this specification does not define how non-HTTP(S) [[ref: watcher]] URIs should be resolved or interacted with. If a [[ref: watcher]] uses an HTTP(S) URL, it **MUST** support the HTTP-based interaction model defined in the [Watcher Endpoints and Behavior](#watcher-endpoints-and-behavior) section. |
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.
this added complexity is it worth it?
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.
See comment above. In the calls we’ve had and where this was explained, no one said anything against it…
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.
Sorry, I wasn't very clear here. I'm at the added complexity of allowing DID URIs. I think we should just focus on HTTP or else we have a ton of interoperability questions that open up
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.
That was guidance from the Work Item group (looking at @andrewwhitehead :smiling). The directive I received was to say that URIs were valid, but to provide API details only if the URI was an HTTP URL. Leaves the door open for someone defining (for example) a watcher with a DID URI and services for the Watcher endpoints. But we definitely don’t want to put that into the spec.
'200': | ||
description: successful operation | ||
content: | ||
text/jsonl: |
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.
jsonl support for openapi is being discussed, there's no clear way to define it at the moment besides documenting it.
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.
We have this in the spec, The content type for the did.jsonl file SHOULD be text/jsonl.
, so I think the OpenAPI spec should say that. If not that, any suggestions?
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.
yes I think that's good
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 took some text from the spec and suggested a description for the response
…atcher section Signed-off-by: Stephen Curran <[email protected]>
@PatStLouis -- removed the witness entry request from the API. I think I got the OpenAPI right. Please review. |
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.
Some small tweaks
Co-authored-by: Patrick St-Louis <[email protected]> Signed-off-by: Stephen Curran <[email protected]>
Co-authored-by: Patrick St-Louis <[email protected]> Signed-off-by: Stephen Curran <[email protected]>
Co-authored-by: Patrick St-Louis <[email protected]> Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
Signed-off-by: Stephen Curran <[email protected]>
Adds the concept of watchers to the spec. As always, provides a relatively short/simple technical implementation, and leaves the governance / implementation details out of the spec. That said, it does add more implementation details than, say, the witness implmentation.
Watchers are a list of URLs that monitor the DID. The URL must respond to a core set of 5 endpoints to return the cached DID Log, return the cached witness.json file, return a cached resource, webhook about an update to the DID, webhook about an update to a resource.
It's a slippery slope to define how much to include.
Questions from me:
Signed-off-by: Stephen Curran [email protected]