decentralized-identity / uni-resolver-driver-did-key

A Universal Resolver driver for did:key identifiers.
5 stars 2 forks source link

Did Document Response changed in new docker images #9

Closed nitin-vavdiya closed 3 months ago

nitin-vavdiya commented 7 months ago

Hey,

I am using universalresolver/driver-did-key:latest to resolve did document of did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6.

When I use docker image tag 0.2.0-f98a04a, it is returning below response:

{
    "@context":
    [
        "https://www.w3.org/ns/did/v1",
        "https://w3id.org/security/suites/jws-2020/v1"
    ],
    "id": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
    "verificationMethod":
    [
        {
            "id": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
            "type": "JsonWebKey2020",
            "controller": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
            "publicKeyJwk":
            {
                "kty": "OKP",
                "crv": "Ed25519",
                "x": "FN5URrQRnKSaEjQvC8e6vpNGxivoocgPLgmzv_5JH2k"
            }
        }
    ],
    "assertionMethod":
    [
        "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "authentication":
    [
        "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "capabilityInvocation":
    [
        "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "capabilityDelegation":
    [
        "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ]
}

When I use latest docker tag, it is returning below response:

{
  "didDocument": {
    "@context": [
      "https://www.w3.org/ns/did/v1",
      "https://w3id.org/security/suites/jws-2020/v1"
    ],
    "id": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
    "verificationMethod": [
      {
        "id": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
        "type": "JsonWebKey2020",
        "controller": "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6",
        "publicKeyJwk": {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "FN5URrQRnKSaEjQvC8e6vpNGxivoocgPLgmzv_5JH2k"
        }
      }
    ],
    "assertionMethod": [
      "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "authentication": [
      "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "capabilityInvocation": [
      "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ],
    "capabilityDelegation": [
      "did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6#z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6"
    ]
  }
}}

Why both docker images are returning did document in different json format?

peacekeeper commented 7 months ago

@nitin-vavdiya Thanks for reporting this. It seems this bug was introduced when we made some changes to how the DIDs are resolved. I think I managed to fix this in https://github.com/decentralized-identity/uni-resolver-driver-did-key/commit/07c0af73e0f8397b39b4ab69f41039732e99a9c8.

Can you try again with the latest Docker image? We can also do another release tag with this fix.

peacekeeper commented 3 months ago

Closing. Feel free to open a new issue if there is still a problem.