hyperledger / 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
404 stars 511 forks source link

Produce peer:did:3 from existing connections' did_documents. #2345

Closed Jsyro closed 1 month ago

Jsyro commented 1 year ago

In the transition to using peer did's for connections, acapy has unqualified dids and the target of those connections may being to use did:peer:3 without notice. This is directly related to #2249.

Acapy needs to be able to produce a did:peer:3 (which may required a did:peer:2), from a did_document of an established connection.

This should be added to this repository if possible. https://github.com/sicpa-dlab/peer-did-python

NOTE: ACAPY's DIDDoc class is not complaint with the actual did_document spec if references (i'm currently working on that). So the developer of this task should be working to produce a did:peer:3 from an instance of the DIDDocument class from pydid found here https://github.com/Indicio-tech/pydid/blob/main/pydid/doc/doc.py.

Jsyro commented 1 year ago

I needed to tackle this in #2249. did:peer:3 is the identifier, did:peer:2 should be treated as did:peer:3 + did_doc, did:peer:2 documents are not saved as they can be resolved at anytime.

did:peer:3's need to be resolved to a document, which should one that was previously seen and stored in the db. the id and controller' entries of that did_doc should have the did:peer:3, requiring manipulating the DIDDocument object.... circumventing the 'immutable' behaviour of the class....