Open gerardsn opened 1 year ago
So the title should be about service dereferencing, not DID resolvement/resolution?
Changed it back. I thought resolution referred to both dereferencing and resolving. I did not look at resolving, but did not want to exclude it either.
The DID specification distinguishes between resolving a DID document and dereferencing to a specific item on that document. The specifications also describes how
conforming resolvers
should be implemented. https://w3c-ccg.github.io/did-resolution/ (draft) provides some more details and useful examples on did resolutionRFC006 service dereferencing approach
More specifically, in RFC006 we have defined a service as
According to RFC006 we need to (de-)reference this service as
DID v1.0 service dereferencing approach
Lets say that the service has
"id": "<did>#service1"
then according to the DID standard, aconforming resolver
can (de-)reference this service using the id fragmentDifferences
The official (de)referencing method does not seem to conflict with ours and can just be implemented.
The main difference is that we dereference based on the
service.type
(and therefore require the type to be unique), while the standard does this based on the fragment in theservice.id
(which is also specced to be unique).My understanding is that we use
service.type
as a unique parameter to prevent issues when a service is replaced. For example, ifdid-1
references a service ondid-2
, anddid-2
wants to change thisserviceEndpoint
fromA.example.com
toB.example.com
, we still want the reference indid-1
to dereference properly. However, this issue only exists because we have defined theid
fragment asid-string
that is derived from the rest of the service (that is not being used for anything as far as I can see, but could be related to #242).Dropping the
id-string
requirement means that theid
field can be used as an identifier that is consistent even after changing theserviceEndpoint
. This would also allow us to useservice.type
as a type that we can impose more constraints on to make validation easier. We currently have the following types:node-contact-info
,NutsComm
,NutsService
,NutsCompoundService
that each have a clearly defined format. (node-contact-info and NutsComm can be considered services or compound services with additional requirements)If we are to apply (some) of these changes, we need to come up with a migration strategy. Since both methods do not conflict they can probably exists at the same time. Bolts specified types also need more thinking