Further Information

Decentralized identifiers (DIDs) are a type of globally unique identifier that enables anyone and anything to be identified in a manner that is verifiable, persistent, and does not require the use of a centralized registry. DIDs enable a new model of decentralized digital identity that is often referred to as self-sovereign identity (SSI).

A W3C DID Working Group developed a specification for decentralized identifiers to standardize the core architecture, data model, and representation of DIDs and version 1.0 of this specification was approved as a W3C Recommendation in 2022. This pages provides a validation service for DID Documents - a set of data describing the DID subject and result of the resolution process when resolving a DID.

Semantic Overlay Architecture (SOyA) is a data model authoring and publishing platform and also provides functionalities for validation and transformation. It builds on W3C Resource Description Framework (RDF) and related semantic web technologies to provide a lightweight approach for data integration and exchange.

At the core of SOyA is a YAML-based data model for describing data structures with bases and optional overlays, which provide additional information and context. This website uses for validating DID Documents the following SOyA structure - click here.

This website is just a frontend for the underlying technology of validating DID Documents. You can also use this service via an REST API by calling one of the following API endpoints:

  • GET /api/validate/:did: provide a DID identifier (:did) and the service automatically resolves and validates the DID document;
    curl https://didlint.ownyourdata.eu/api/validate/did:oyd:zQmZZbVygmbsxWXhP2BH5nW2RMNXSQA3eRqnzfkFXzH3fg1
  • POST /api/validate: provide a DID document in the body of a POST request;
    cat did_document.jsonld | curl -H 'Content-Type: application/json' -d @- -X POST https://didlint.ownyourdata.eu/api/validate

Swagger API of this service is available here: https://didlint.ownyourdata.eu/api-docs
Docker image can be downloaded here: https://hub.docker.com/r/oydeu/didlint

All functionality provided on this website leverages tools available on the command line. With the necessary building blocks and libraries installed you can perform the complete validation process locally. For convenience a Docker image with everything pre-installed is available here: https://hub.docker.com/r/oydeu/didlint

The process of validation actually comprises of 3 steps:

  1. Pre-processing DID Documents to be usable by the soya-cli
    example script is available here: prep.sh
  2. Executing the SHACL validation with the SOyA structure and input DID document
    syntax for valiating a DID document is: cat did_document.jsonld | ./preps.sh | soya validate Did
  3. Verifying the correct JSON-LD context is not within the scope of SHACL and requires a separate step
    execute verify_context.rb: cat did_document.jsonld | ./verify_context.rb

To make the output easier to read, the response (SHACL output and context checks) should be further processed as demonstrated in this script: iterate.sh

A typical sequence of commands to validate a DID document locally on your preferred shell is:

docker run -it --rm oydeu/didlint bash
cat test/example_did_document.json | script/prep.sh | soya validate Did

This service is a Proof-of-Concept to demonstrate the validation overlay capabilities of SOyA, i.e., show-case an easy but still machine-readable format to describe DID Documents and use the built-in mechanisms of SOyA to either validate conformance or list identified violations.

The current DID Document SOyA structure is most certainly not a complete and correct representation of the DID Core Spec and we would like to encourage everyone to report issues or even provide pull-requests on the public DID Lint Github repository.

This project has received funding from the European Union’s Horizon 2020 research and innovation program through the NGI ONTOCHAIN program under cascade funding agreement No 957338.  Learn more about DID Lint.