Japanese Ver: https://zenn.dev/mizuki/articles/1190fd44eda130

0. Background

I designed a DID Method did:content, and it was Merge’d.
but currently universal resolver dose not resolve it. I tried to solve an error that occurred in the Universal Resolver.

I can find is that it is non-compliant and missing.

1. Aiming for Valid DID Document

Check if the Schema is correct as a DID Document.
https://www.w3.org/TR/did-core/#did-document-properties
Universal Resolver has a useful Lint for checking DID Document.
https://didlint.ownyourdata.eu/validate

Here’s a quick check
did:content:3SqTXtoMpiPeNo5vEP2p7yNGQUeCGjqW1wnctv8yaCWXojD29GYcUEo

I get Verification Relationship is missing.
The verification relationship is a method that is used to link a DID subject to a verification method. It includes authentication / assertionMethod.
https://www.w3.org/TR/did-core/#dfn-verification-relationship

Note: I didn’t think it was necessary because there is only id in Required, but I wonder if it becomes Required when under certain conditions?🤔

I added authentication / assertionMethod etc. and Lint stopped getting angry.

2. But not worked.

I search a code from Repository, wondering where this content is determined in the first place. https://github.com/decentralized-identity/universal-resolver-frontend/blob/18f7be728ecebbe75e6a5b2347194594571f02de/src/components/App.jsx

Then I found out that the popup is based on JSON data on the net. https://identity.foundation/universal-resolver/result.json

  ....
  "did:content": {
    "status": "no response",
    "identifiers": [
      {
        "did:content:3SqTXtoMpiPeNo5vEP2p7yNGQUeCGjqW1wnctv8yaCWXojD29GYcUEo": {
          "error": "no response",
          "duration": 62.026434094
        }
      }
    ]
  },
  ...

If I trace the source of this JSON update, I can see what Validation is being violated. The update was a periodic execution by CI(GitHub Actions). https://github.com/decentralized-identity/universal-resolver/blob/main/ci/did-lint-check/run.sh

GitHub Actions shows that there is indeed an error.

 X> invalid SHACL validation response
processing Did: did:content:3SqTXtoMpiPeNo5vEP2p7yNGQUeCGjqW1wnctv8yaCWXojD29GYcUEo 

Note: What does SHACL mean? I thought it might be this, but I guess not. https://www.w3.org/TR/shacl/

3. Look into did-status-generator.

At first, I pulled docker container oydeu/did-status-generator:latest which is used in CI, and read the Validation part in it. (I found the source code here) https://github.com/OwnYourData/didlint/blob/main/did_status_generator/status.rb

I found that accessing here causes a timeout 🤔

$ curl https://didlint.ownyourdata.eu/api/validate/did:content:3SqTXtoMpiPeNo5vEP2p7yNGQUeCGjqW1wnctv8yaCWXojD29GYcUEo
{"valid":false, "error": "time out"}

I dived into the implementation of https://didlint.ownyourdata.eu/api/validate/, What is Timeout?, it looks like dev.uniresolver.io/1.0/identifiers/. https://github.com/OwnYourData/didlint/blob/05ba4758655eb7148cb57bbb80870aa10f2e5512/app/helpers/application_helper.rb#L28

$ curl https://dev.uniresolver.io/1.0/identifiers/did:content:3SqTXtoMpiPeNo5vEP2p7yNGQUeCGjqW1wnctv8yaCWXojD29GYcUEo
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
</body>
</html>

Oh I see!, certainly https://dev.uniresolver.io/1.0/methods is also 504 Gateway Timeout today,
so https://dev.uniresolver.io/ itself is not working correctly.

4. Wait, wait

The dev.uniresolver.io/1.0/* API is down, so the lint is non-compliant. It’s Experimental, so I’ll wait patiently.
However, I have to make the DID Document more valid (I’m writing a Document in the atmosphere).

5. it works (mistake was found)

It worked, but I deleted something necessary in the context and got an Error.

*If you follow this Warning, you may get an error, so don’t worry about it.

Notes on JSON-LD Context:.
'https://w3id.org/security/suites/secp256k1recovery-2020/v2' is
not yet listed as Verification Method Type in the DID Specification Registries

6. Compliant!

7. Extends

I designing DID-Methods did:content to manage content IDs independently of the platform. https://github.com/KataruInc/did-content-spec