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

LegacyPeerDIDResolver: erroneously assigning same ID to multiple services #2475

Closed
dbluhm opened this issue Sep 7, 2023 · 6 comments · Fixed by #2476
Closed

LegacyPeerDIDResolver: erroneously assigning same ID to multiple services #2475

dbluhm opened this issue Sep 7, 2023 · 6 comments · Fixed by #2476

Comments

@dbluhm
Copy link
Member

dbluhm commented Sep 7, 2023

This appears to be the underlying issue to both:

The LegacyPeerDIDResolver is assigning the same ID to multiple services (converted from IndyAgent services). This results in resolved DID Docs like the following:

{
  "did_document": {
    "@context": "https://w3id.org/did/v1",
    "id": "did:sov:4wvr7DC2XUtsHbpUpYaKvM",
    "authentication": [
      "did:sov:4wvr7DC2XUtsHbpUpYaKvM#1"
    ],
    "service": [
      {
        "id": "did:sov:4wvr7DC2XUtsHbpUpYaKvM#didcomm",
        "type": "did-communication",
        "priority": 0,
        "recipientKeys": [
          "did:sov:4wvr7DC2XUtsHbpUpYaKvM#1"
        ],
        "serviceEndpoint": "https://aries-endorser-agent-dev.apps.silver.devops.gov.bc.ca"
      },
      {
        "id": "did:sov:4wvr7DC2XUtsHbpUpYaKvM#didcomm",
        "type": "did-communication",
        "priority": 0,
        "recipientKeys": [
          "did:sov:4wvr7DC2XUtsHbpUpYaKvM#1"
        ],
        "serviceEndpoint": "wss:https://aries-endorser-agent-dev.apps.silver.devops.gov.bc.ca"
      }
    ],
    "verificationMethod": [
      {
        "id": "did:sov:4wvr7DC2XUtsHbpUpYaKvM#1",
        "type": "Ed25519VerificationKey2018",
        "controller": "did:sov:4wvr7DC2XUtsHbpUpYaKvM",
        "publicKeyBase58": "39msujHp1jPTPbWA5Ry9BnwGvbVw8WYGh8WYjoEryyQp"
      }
    ]
  },
  "metadata": {
    "resolver_type": "native",
    "resolver": "LegacyPeerDIDResolver",
    "retrieved_time": "2023-09-07T12:53:06Z",
    "duration": 42
  }
}

The corrections should be assigning unique IDs to the two services in this example.

This will require a patch release to be pushed out. This will be the first release after the Poetry conversion. We should get #2471 merged in support of this release as well.

@swcurran @WadeBarnes @usingtechnology

@swcurran
Copy link
Member

swcurran commented Sep 7, 2023

@dbluhm — given the AATH issue we currently have (which may be nothing, but is annoying and unsolved…), should we do a patch release of this as 0.10.2, without the Poetry change? Or is it not worth it?

@dbluhm
Copy link
Member Author

dbluhm commented Sep 7, 2023

It wouldn't be too bad; I can probably cherry-pick the commit from #2476 over onto 0.10.1 tag without incident. Are there any challenges with doing a release from a branch rather than main?

@swcurran
Copy link
Member

swcurran commented Sep 7, 2023

No — we’ve done it before. Easy to do.

@dbluhm
Copy link
Member Author

dbluhm commented Sep 7, 2023

I'll prepare a branch off of 0.10.1 with the cherry picked changes 👍

@dbluhm
Copy link
Member Author

dbluhm commented Sep 7, 2023

Pushed to: https://github.com/hyperledger/aries-cloudagent-python/tree/0.10.2

I haven't done anything but branch and cherry-pick so the publishing workflow will still be needed. Let me know if there's anything I can do to help with that process -- otherwise I'll assume you guys (BC Gov team) have it in hand 😄

@swcurran
Copy link
Member

swcurran commented Sep 7, 2023

@usingtechnology @Jsyro — can you please review this? Is it likely to fix the issue that we are seeing with the IDIM issuer is the big concern.

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

Successfully merging a pull request may close this issue.

3 participants