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

Expand referenced keys to inline keys #39

Open
peacekeeper opened this issue Jul 12, 2019 · 3 comments
Open

Expand referenced keys to inline keys #39

peacekeeper opened this issue Jul 12, 2019 · 3 comments

Comments

@peacekeeper
Copy link
Collaborator

This issue tracks hyperledger/aries-rfcs#117 by @mitfik:

When DID resolver resolves DID url with service query it provides the block for whole service with keys references.

Does it make sens that DID resolver can already compile all keys inline so the requester does not have to resolve each key separately?

@llorllale
Copy link

@peacekeeper what would this look like? A JWK in compact form?

@peacekeeper
Copy link
Collaborator Author

I think what @mitfik is looking at are service endpoints like this:

{
  "service": [{
    "id": "did:example:123456789abcdefghi#did-communication",
    "type": "did-communication",
    "recipientKeys" : [ "did:example:123456789abcdefghi#1" ],
    "serviceEndpoint": "https://agent.example.com/"
  }],
  "publicKeys": [{
    "id": "did:example:123456789abcdefghi#1",
    "type": "Ed25519VerificationKey2018",
    "controller": "did:example:123456789abcdefghi",
    "publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
  }]
}

You can see that the service block references the public key did:example:123456789abcdefghi#1.

I believe he is suggesting that a DID Resolver could automatically expand that referenced public key inside the service block, i.e.:

{
  "service": [{
    "id": "did:example:123456789abcdefghi#did-communication",
    "type": "did-communication",
    "recipientKeys" : [{
      "id": "did:example:123456789abcdefghi#1",
      "type": "Ed25519VerificationKey2018",
      "controller": "did:example:123456789abcdefghi",
      "publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
    }],
    "serviceEndpoint": "https://agent.example.com/"
  }]
}

My feedback in that other original issue is that I think a standard JSON-LD processor could have built-in support for transformations like this.

@tplooker
Copy link

+1 to this I think this is a great addition!

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

3 participants