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

Accepting an invitation with an invalid DID should fail #963

Open
gmulhearn-anonyome opened this issue Aug 29, 2023 · 0 comments
Open

Accepting an invitation with an invalid DID should fail #963

gmulhearn-anonyome opened this issue Aug 29, 2023 · 0 comments

Comments

@gmulhearn-anonyome
Copy link
Contributor

gmulhearn-anonyome commented Aug 29, 2023

accept_invitation for invitee current will succeed even if the DID within the Public DID invitation is invalid. This is because the implementation for into_did_doc will assume a default service of AriesService::default(), which is full of dummy data, and then that default is used in the case that resolving the DID from the ledger fails...

Default logic found here; https://github.com/hyperledger/aries-vcx/blob/main/aries_vcx/src/common/ledger/transactions.rs#L102

E.g.

let invitation = PublicInvitation::with_decorators(
            random_id(),
            PublicInvitationContent::new("label".to_string(), "InvalidDID!!!".to_string()),
            NoDecorators,
        );

will result in InviteeConnection<Invited> after accept_invitation, and the did_doc will be:

{
id: InvalidDID!!!,
public_key: [],
authentication: [],
service: {
   id: did:example:123456789asdfasdf,
   service_endpoint: https://dummy.dummy/dummy,
   recipient_keys: [],
   routing_keys: []
}
} 

IMO it should just fail to accept if the diddoc cannot be properly resolved

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

1 participant