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: implicit invitation to specific service #1592

Conversation

genaris
Copy link
Contributor

@genaris genaris commented Sep 28, 2023

It seems that our implicit invitation implementation for DID Exchange does not conform exactly with what's written in RFC 0023:

An invitation is presented in one of two forms:

An explicit out-of-band invitation with its own @id.
An implicit invitation contained in a DID document's service attribute that conforms to the DIDComm conventions.
When a request responds to an explicit invitation, its ~thread.pthid MUST be equal to the @id property of the invitation as described in the out-of-band RFC.

When a request responds to an implicit invitation, its ~thread.pthid MUST contain a DID URL that resolves to the specific service on a DID document that contains the invitation.

So it assumes that the implicit invitation should go to a specific service that contains a suitable DIDComm communication endpoint (e.g. did:method:example#invitation). However, in our implementation we are simply using the did and just selecting the highest priority DIDComm service.

Whilst I don't think it is bad for implicit invitations to work the way we are using it, here I'm adding the possibility of directing them to a specific service, so it will use it instead of resolving all DIDComm services the DID Document may have.

@genaris genaris requested a review from a team as a code owner September 28, 2023 12:40
@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2023

Codecov Report

Merging #1592 (1b78bf1) into main (dd75be8) will increase coverage by 4.27%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1592      +/-   ##
==========================================
+ Coverage   81.46%   85.73%   +4.27%     
==========================================
  Files         950      950              
  Lines       22838    22842       +4     
  Branches     4010     4013       +3     
==========================================
+ Hits        18604    19584     +980     
+ Misses       3959     3073     -886     
+ Partials      275      185      -90     
Files Coverage Δ
...src/modules/connections/ConnectionsModuleConfig.ts 77.77% <ø> (ø)
.../modules/connections/services/ConnectionService.ts 86.49% <100.00%> (+0.04%) ⬆️
...modules/didcomm/services/DidCommDocumentService.ts 100.00% <100.00%> (ø)
packages/core/src/modules/oob/OutOfBandApi.ts 90.47% <100.00%> (ø)

... and 31 files with indirect coverage changes

@TimoGlastra TimoGlastra merged commit 4071dc9 into openwallet-foundation:main Sep 28, 2023
7 checks passed
auer-martin pushed a commit to auer-martin/aries-framework-javascript that referenced this pull request Nov 15, 2023
auer-martin pushed a commit to auer-martin/aries-framework-javascript that referenced this pull request Dec 4, 2023
genaris added a commit to genaris/credo-ts that referenced this pull request Dec 4, 2023
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