Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conformance issues with current implementation #342

Open
jandrieu opened this issue Apr 2, 2022 · 0 comments
Open

Conformance issues with current implementation #342

jandrieu opened this issue Apr 2, 2022 · 0 comments

Comments

@jandrieu
Copy link

jandrieu commented Apr 2, 2022

I'd like to share my observations based on the testing Steve Apps ([email protected]) has done with a test network using the module.

  1. The context property MUST be @context, not context

  2. The context https://www.w3.org/ns/did/v1 does not provide definitions for the following terms:
    a. EcdsaSecp256k1VerificationKey2019
    b. publicKeyMultibase

  3. The following properties should not be present
    a. service -- "If present, the value of the serviceEndpoint property MUST be a string, a map, or a set composed of one or more strings and/or maps." https://www.w3.org/TR/did-core/#services
    b. assertionMethod -- "If present, the associated value MUST be a set of one or more verification methods."https://www.w3.org/TR/did-core/#assertion"
    c. keyAgreement -- "If present, the associated value MUST be a set of one or more verification methods." https://www.w3.org/TR/did-core/#key-agreement
    d. capabilityInvocation -- "If present, the associated value MUST be a set of one or more verification methods." https://www.w3.org/TR/did-core/#capability-invocation
    e. capabilityDelegation -- "If present, the associated value MUST be a set of one or more verification methods." https://www.w3.org/TR/did-core/#capability-delegation

  4. The following properties should either be removed or changed.
    a. controller property at the top level should probably be the DID of this document. It certainly is not valid as an empty array. If it is empty, it should not be present. "If present, the value MUST be a string or a set of strings that conform to the rules in § 3.1 DID Syntax." https://www.w3.org/TR/did-core/#did-controller
    b. controller property on the verification method maps, through the DID context, to https://w3id.org/security#controller This may or may not be the right definition for EcdsaSecp256k1VerificationKey2019

  5. After JSON-LD processing (after updating "@context" and removing the non-conformant properties), we are left with the following,

{ 
   "@context": "https://www.w3.org/ns/did/v1",
   "id": "did:cosmos:net:cash:regulator",
   "verificationMethod": [
      {
        "id": "did:cosmos:net:cash:regulator#cosmos1z0k8l777e287hyg97vkh0vlf0w978s0mh9yjpk",
        "type": "EcdsaSecp256k1VerificationKey2019",
        "controller": "did:cosmos:net:cash:regulator",
      }
    ],
    "authentication": [
      "did:cosmos:net:cash:regulator#cosmos1z0k8l777e287hyg97vkh0vlf0w978s0mh9yjpk"
    ],
  }

Note that because publicKeyMultibase is not in the JSON-LD context, it gets dropped. This is, unfortunately, the most important piece of data in the document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant