TBD54566975 / web5-spec

Web5 Spec
https://tbd54566975.github.io/web5-spec/
Apache License 2.0
7 stars 5 forks source link

Clarify "DID Document & Resolution Validation" #28

Closed frankhinek closed 7 months ago

frankhinek commented 10 months ago

Can clarification be provided for this set of SDK requirements:

Screenshot 2023-11-09 at 12 00 49 PM
mistermoe commented 10 months ago

apologies for the lack of clarity @frankhinek. This feature would've been better off surfacing as an issue in this repo first

Common Error

The idea behind this was to scrub through our existing implementations to ensure that our resolve implementations were using the errors defined in DID specification registries for didResolutionMetadata.error

image

Json Schema

Usage of common errors led me to consider whether it'd be worthwhile to produce a JSON schema that could be used across all of our SDKs to validate did documents and did resolution results

thoughts on whether either is worth the time?

frankhinek commented 9 months ago

No worries and thanks for the additional insight. Agreed on supporting error reporting during DID resolution. A few error types are included (invalidDid and methodNotSupported) were included in the JS DidResolver, but we ought to have a consistent set of error codes across SDKs. At a minimum we should support all of the required error codes.

I haven't completed an exhaustive search but didn't turn up an existing JSON schema published for DID documents / DID resolution results. It seems like consistent test vectors ought to be the higher priority and then address JSON schema validation if there's value to be gained.