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

Inconsistency between using key or value to define different types #358

Closed
JelleMillenaar opened this issue Jul 24, 2020 · 3 comments
Closed
Assignees
Labels
pending close Issue will be closed shortly if no objections

Comments

@JelleMillenaar
Copy link

Recently, the DID standard got updated to include five verifiable relationships. The set of verifiable relationships are an array of authentication methods that all implement the same fields. The key has been used to differentiate the verifiable relationships from each other such instead of a field. This conflicts with how types are implemented for services and public keys. This is seen back in the current DID working draft, which has to describe the different verifiable relationships while linking to the DID specification registries to add more. This is not the case for public key types as the different verification method types are not defined in the DID working draft, but are to be registered in the DID specification registry.

I propose to clean up the DID working draft and simplify the DID Document structure by introducing a new optional field inside of a public key object called "purpose" (Happy to change the name). The purpose field will indicate what type of verifiable relationship the public key carries out. This will significantly reduce the complexity of a DID Document as the DID Documents will now consist of a set of base properties and two fields that contain arrays of objects, publicKey and service. In addition, similarly to service and public key types, the verifiable relationships are now out of scope for the DID working draft and should be registered at the DID specification registry.

Example Old style:

{
     ...
     "capabilityDelegation": [{ 
         "id": "did:example:123#z6MkpzW2izkFjNwMBwwvKqmELaQcH8t54QL5xmBdJg9Xh1y4",
         "type": "Ed25519VerificationKey2018",
         "controller": "did:example:123",
         "publicKeyBase58": "BYEz8kVpPqSt5T7DeGoPVUrcTZcDeX5jGkGhUQBWmoBg"
    }],
    ...
}

Example new style:

 {
     ...
     "publicKey": [{ 
         "id": "did:example:123#z6MkpzW2izkFjNwMBwwvKqmELaQcH8t54QL5xmBdJg9Xh1y4",
         "type": "Ed25519VerificationKey2018",
         "purpose": "capabilityDelegation",
         "controller": "did:example:123",
         "publicKeyBase58": "BYEz8kVpPqSt5T7DeGoPVUrcTZcDeX5jGkGhUQBWmoBg"
     }],
     ...
}
@dlongley
Copy link
Contributor

This has been discussed before, see #273 and #294 for similar issues. I recommend we close this as as duplicate.

@msporny
Copy link
Member

msporny commented Jul 28, 2020

Duplicate, closing in 7 days unless @JelleMillenaar objects.

@msporny msporny self-assigned this Jul 28, 2020
@msporny msporny added the pending close Issue will be closed shortly if no objections label Jul 28, 2020
@brentzundel
Copy link
Member

no objections raised, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending close Issue will be closed shortly if no objections
Projects
None yet
Development

No branches or pull requests

4 participants