w3c-ccg / did-key-test-suite

Interoperability test suite for did:key
https://w3c-ccg.github.io/did-key-test-suite/
BSD 3-Clause "New" or "Revised" License
1 stars 4 forks source link

`invalidDid` or `notFound` if method-specific ID doesn't start with `z`? #21

Open peacekeeper opened 2 years ago

peacekeeper commented 2 years ago

I see that one of the tests is:

MUST raise invalidDid if the multibaseValue does not begin with the letter z.

I have been assuming so far that the invalidDid error would be returned only if the DID doesn't conform to the generic DID Core syntax. So if you try to resolve did:key:12345, the error would actually be notFound, since the DID does conform to the generic DID Core syntax, but the method-specific ID "12345" doesn't exist within the did:key method.

But maybe my assumption was wrong. I also understand the rationale that invalidDid would cover not only the generic DID Core syntax, but also method-specific syntax requirements (starting with z, in this case). So, just opening this issue to talk about it. We could define this in more detail in the DID Resolution spec: https://w3c-ccg.github.io/did-resolution/#errors

aljones15 commented 2 years ago

I actually agree with you here and think that invalidDid should only be used for dids that don't meet the requirements from did core. There is an issue on the spec itself about this: https://github.com/w3c-ccg/did-method-key/issues/60

I think invalidDidKey would be a better error.