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

Fix: Do not replace public verkey on mediator #2269

Conversation

mkempa
Copy link
Contributor

@mkempa mkempa commented Jun 15, 2023

This PR fixes a case when public verkey of the mediated agent is removed from the keylists of its mediator during establishing a connection.

Assuming there is mediation established for an agent.
If the DID was promoted to public via POST /wallet/did/public?did={}&mediation_id={non_empty_id} then an ATTRIB 'endpoint' transaction was created on the ledger with the url pointing to the mediator and the respective routing_keys.

Next, the Inviter creates an invitation using the public=true (or use_public_did: true) flag, the communication of the Inviter goes through the mediator as it should. Then in the Inviter's accept-request phase, the public verkey is removed from the keylist of the mediator.
That prevents any next attempts to answer to the Inviter's invitations with its public DID since the mediator does no longer have the routing key (verkey) associated to the public DID.

In conclusion, the public verkey must remain in the mediator as the routing key.

@mkempa mkempa force-pushed the fix-do_not_remove_public_verkey_on_mediator branch from 66a15b4 to f8558bd Compare June 15, 2023 15:06
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@swcurran swcurran merged commit a6d942b into openwallet-foundation:main Jun 19, 2023
@mkempa mkempa deleted the fix-do_not_remove_public_verkey_on_mediator branch July 10, 2023 08:23
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 this pull request may close these issues.

3 participants