hyperledger / aries-vcx

aries-vcx is set of crates to work with DIDs, DID Documents, DIDComm, Verifiable Credentials and Hyperledger Aries.
https://didcomm.org
Apache License 2.0
125 stars 83 forks source link

Mediated connection - empty string for DIDDoc's publickey controller in the Invitee Request message #1080

Closed mkempa closed 8 months ago

mkempa commented 11 months ago

Hi, I've found out that the mediated connection request has an empty string as a controller of the DIDDoc's public key.

The similar bug has been reported and already resolved - #877

The bug appears to originate in the protocols/mediated_connection/invitee/state_machine.rs, function build_connection_request_msg on lines

let mut did_doc = AriesDidDoc::default();
did_doc.set_service_endpoint(service_endpoint);
did_doc.set_routing_keys(routing_keys);
did_doc.set_recipient_keys(recipient_keys);
did_doc.set_id(self.pairwise_info.pw_did.clone());

which look very much like the ones in the aforementioned bug report.

I would very much appreciate if you had a look into it. I would open a PR myself but I have troubles building the lib for the android so I haven't tested the possible fix. Thanks in advance.

Patrik-Stas commented 11 months ago

Hi @mkempa apologies for late feedback. Indeed, it looks like it should be straightforward, but addressing this is currently beyond our bandwidth capacity. The best course of actions I advise for you is try to reproduce the issue locally on Rust level, rather than dealing with it through extra android layer.

Also, please beware that mediated connection along with vcxagency-node are deprecated. To give you some additional context where we are, where we heading:

If you are in early stages of your project, one thing you could consider is to use our "dummy" mediator https://github.com/hyperledger/aries-vcx/tree/main/misc/simple_message_relay This implementation is non-standard, it's unsafe, it's really "dummy" just for development and testing. But if your timeframes allow, this might be sufficient to where you are in the dev cycle, and wait out the period while the mediator component (or particularly its client) further matures. This way you could drop the use of MediatedConnection and vcxagency-node.

I went on detour about your original question here, but it's relevant in regard to the fact you are using MediatedConnection at all.

Patrik-Stas commented 8 months ago

The mediated connection has been decomissioned and is no longer available.