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

Finalize and implement the DID resolution spec with published field as resolution response #336

Closed
thehenrytsai opened this issue Nov 26, 2019 · 7 comments
Assignees
Labels
feature A new implementation feature request good first issue Good for newcomers protocol Sidetree protocol change proposal

Comments

@thehenrytsai
Copy link
Collaborator

Assigning @csuwildcat to get the spec finalized before implementation can begin.

@thehenrytsai thehenrytsai added protocol Sidetree protocol change proposal feature A new implementation feature request labels Nov 26, 2019
@kdenhartog
Copy link
Contributor

@csuwildcat would it be possible to return transaction metadata as method metadata so that the integrity of the resolution can be validated without needing to launch a node? I would think this would be an optional parameter that could be passed in the URL.

Something like this for a potential strawman solution

GET /did:sidetree:exKwW0HjS5y4zBtJ7vYDwglYhtckdO15JDt1j5F5Q0A?options=base64URL<{"methodMetadata": true }> HTTP/1.1

And the resulting object could be:

{
  "didDocument": {
  "@context": "https://w3id.org/did/v1",
  "id": "did:sidetree:EiBJz4qd3Lvof3boqBQgzhMDYXWQ_wZs67jGiAhFCiQFjw",
  "publicKey": [{
    "id": "#key1",
    "type": "Secp256k1VerificationKey2018",
    "publicKeyHex": "029a4774d543094deaf342663ae672728e12f03b3b6d9816b0b79995fade0fab23"
  }],
  "service": [{
    "id": "IdentityHub",
    "type": "IdentityHub",
    "serviceEndpoint": {
      "@context": "schema.identity.foundation/hub",
      "@type": "UserServiceEndpoint",
      "instance": ["did:bar:456", "did:zaz:789"]
    }
  }]
},
"didMetadata": [{
  "header": "ewogICJvcGVyYXRpb24iOiAiY3JlYXRlIiwKICAia2lkIjogImtleTEiLAogICJhbGciOiAiRVMyNTZLIgp9",
  "payload": "eyJAY29udGV4dCI6Imh0dHBzOi8vdzNpZC5vcmcvZGlkL3YxIiwicHVibGljS2V5IjpbeyJpZCI6IiNrZXkxIiwidHlwZSI6IlNlY3AyNTZrMVZlcmlmaWNhdGlvbktleTIwMTgiLCJwdWJsaWNLZXlIZXgiOiIwMmY0OTgwMmZiM2UwOWM2ZGQ0M2YxOWFhNDEyOTNkMWUwZGFkMDQ0YjY4Y2Y4MWNmNzA3OTQ5OWVkZmQwYWE5ZjEifSx7ImlkIjoiI2tleTIiLCJ0eXBlIjoiUnNhVmVyaWZpY2F0aW9uS2V5MjAxOCIsInB1YmxpY0tleVBlbSI6Ii0tLS0tQkVHSU4gUFVCTElDIEtFWS4yLkVORCBQVUJMSUMgS0VZLS0tLS0ifV0sInNlcnZpY2UiOlt7InR5cGUiOiJJZGVudGl0eUh1YiIsInB1YmxpY0tleSI6IiNrZXkxIiwic2VydmljZUVuZHBvaW50Ijp7IkBjb250ZXh0Ijoic2NoZW1hLmlkZW50aXR5LmZvdW5kYXRpb24vaHViIiwiQHR5cGUiOiJVc2VyU2VydmljZUVuZHBvaW50IiwiaW5zdGFuY2VzIjpbImRpZDpiYXI6NDU2IiwiZGlkOnphejo3ODkiXX19XX0",
  "signature": "mAJp4ZHwY5UMA05OEKvoZreRo0XrYe77s3RLyGKArG85IoBULs4cLDBtdpOToCtSZhPvCC2xOUXMGyGXDmmEHg"
}]

@csuwildcat
Copy link
Member

@kdenhartog what integrity/proof are you imagining be sent back? The deltas and chain data refs used to compile the state?

@kdenhartog
Copy link
Contributor

yeah that's what I had in mind. The initial payload and deltas is what I originally had in mind. chain data refs are probably useful as well, but I'm not sure how it should be structured in with the deltas to show which chain data refs are connected to the payload/deltas.

@csuwildcat
Copy link
Member

@kdenhartog without at least running a light Sidetree node that stores all the anchor files, the only assurance you'd gain in a chain inclusion proof for op deltas is that whatever delta trail a node responded with was indeed present in the target chain, but there are many attacks possible - for example:

Say Alice has performed 5 ops against her DID. The last op was to remove a key she believed could have fallen into someone else's hands. A node could simply resolve the first 4 of her ops and omit the last one, and if all you had was proof of chain inclusion, you'd never realize it was a 'fake tip' of her total state. You must run a light node to avoid such attacks, or, for a lesser security assurance, query a larger randomized subset of nodes to probabilistically increase the chances you receive the correct current state.

@kdenhartog
Copy link
Contributor

kdenhartog commented Mar 10, 2020

Hmm that's a good point. I'm wondering if we may be able to change the structure of the protocol to make this possible. I'll have to think about this more though.

@csuwildcat
Copy link
Member

Hmm that's a good point. I'm wondering if we may be able to change the structure of the protocol to make this possible. I'll have to think about this more though.

If you can, I'd be thrilled, but after thinking about it really hard for a long time, I got to a point where I feel like it is in the same underlying problem-space as a formally validated solution to fraud proofs.

@tplooker tplooker added the beta label Jul 14, 2020
@thehenrytsai thehenrytsai added this to 2020 September in Reference implementation Jul 23, 2020
@thehenrytsai thehenrytsai added the good first issue Good for newcomers label Aug 11, 2020
@thehenrytsai thehenrytsai moved this from 2020 September to 2020 August in Reference implementation Aug 13, 2020
thehenrytsai added a commit that referenced this issue Aug 14, 2020
…d issue #833

* feat(ref-imp): #336 - added published field in method metadata
* fix(ref-imp): #833 - fixed bug where long-form DID is used in document of a published DID
@thehenrytsai
Copy link
Collaborator Author

Implemented.

Reference implementation automation moved this from 2020 August to Done Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new implementation feature request good first issue Good for newcomers protocol Sidetree protocol change proposal
Projects
No open projects
Development

No branches or pull requests

4 participants