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

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

Closed
mkempa opened this issue Dec 3, 2023 · 2 comments

Comments

@mkempa
Copy link
Contributor

mkempa commented Dec 3, 2023

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
Copy link
Contributor

Patrik-Stas commented Dec 12, 2023

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:

  • The mediated connection - MediatedConnection - abstraction has been deprecated early 2023
  • Instead we created non-mediated version of connection - Connection<I, S>. Using this, there can be still mediation, but it must be dealt with externally by the aries_vcx consumer.
  • One of the reason why MediatedConnection is deprecated is because it relies on non-standard protocol to talk to the mediator itself.
  • In 2024, we have created new mediator project (as part of mentorship project, by our mentee) https://github.com/hyperledger/aries-vcx/tree/main/aries/agents/rust/mediator - this follow standard mediation protocols- - There's no client component to it yet, which is a missing piece here. Technically there's kind of client which is used tests for the mediator service, but practically there's outstanding work to make that a user friendly black box component.

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
Copy link
Contributor

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

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

No branches or pull requests

2 participants