-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Hi, while trying to implement DIDComm, a colleague of mine noticed that there is a problem with Sidetree-/ION-based DIDs.
Context & Problem
In particular, the DIDComm messaging protocol demands an array for the serviceEndpoint field (in the service property of a DID document). In their spec, they provide the following example:
{
"id": "did:example:123456789abcdefghi#didcomm-1",
"type": "DIDCommMessaging",
"serviceEndpoint": [{
"uri": "https://example.com/path",
"accept": [
"didcomm/v2",
"didcomm/aip2;env=rfc587"
],
"routingKeys": ["did:example:somemediator#somekey"]
}]
}However, this does not align with the Sidetree specification, which does not allow arrays. Sidetree only allows strings (URIs) and JSON objects, but no arrays:
Line 145 in bcc0cdb
| 3. The object ****MUST**** include a `serviceEndpoint` property, and its value ****MUST**** be either a valid URI string (including a scheme segment: i.e. http://, git://) or a JSON object with properties that describe the Service Endpoint further. If the values do not adhere to these constraints, the entire _Patch Action_ ****MUST**** be discarded, without any of it being used to modify the DID's state. |
But actually, the DIDComm spec is compliant with the current DID specification, because there it says that
The value of the serviceEndpoint property MUST be a string, a map, or a set composed of one or more strings and/or maps.
-- Decentralized Identifiers v1.0, 5.4 Services
As you can see, there is a mismatch between the DID spec and the Sidetree spec.
Requested Action
I think that Sidetree should also support arrays for the serviceEndpoint field and not discard corresponding PATCH actions (as the spec demands currently). Otherwise, Sidetree-based DID methods become unusable for protocols that build on top of the DID standard.
Any takes? Or does anyone know a good workaround how to use DIDComm with Sidetree-based DID methods (e.g. ION)?