sicpa-dlab / aries-cloudagent-python

Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://wiki.hyperledger.org/display/aries
Apache License 2.0
1 stars 0 forks source link

Story: Modify connection protocol to use DID Resolver component #9

Closed dbluhm closed 3 years ago

dbluhm commented 3 years ago

As an ACA-Py user, I want to receive connection invitations with public DIDs from multiple ledgers, so that I can connect with agents rooted in multiple ledgers.

Replace current Indy ledger resolution of public DIDs with usage of new DID Resolver component.

Acceptance Criteria

Luis-GA commented 3 years ago

I have been a while trying to figurate out what I have to do. After a global view and a specific view, I guess that I have to do some changes in the files “manager.py” and “base_manager.py”.

I have some questions:

dbluhm commented 3 years ago

If you haven't already, read the following Aries RFCS, paying particular attention to anywhere the phrase "public DID" is used:

ACA-Py uses a "Ledger" (really an Indy ledger) to resolve a info that it subsequently uses to send a connection request. In the connection/DID exchange managers, you'll find instances of the calls ledger.get_key_for_did and ledger.get_endpoint_for_did. These should be replaced with something that looks like:

resolver = session.inject(DIDResolver)
doc = await resolver.resolve(did)
didcomm_service = doc.dereference(...)
# ... use service to form connection target

It may be useful for us to implement a ConnectionTarget.from_service or similar to make using the service more straightforward. Looking through usages of ConnectionTarget may be informative.

dbluhm commented 3 years ago

A DIDDoc.get_service_by_type may also be useful in retrieving the registered didcomm services from the doc in priority order.