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

feat: 0.2.0 connection migration script #731

Conversation

TimoGlastra
Copy link
Contributor

@TimoGlastra TimoGlastra commented Apr 30, 2022

Adds migration script for the breaking changes introduced in 0.2.0 with the addition of out of band protocol and did:peer dids.

This should be merged after #717 is merged ( I will update the target to main then ), as it depends on those Changes. Keeping it as separate PR to not make the PR bigger.

I think there's some issues with the transformation of the invitations and did documents that we should address, but that can be address separately. This PR just leans on the methods for transformation already provided in PR #717

There's one FIXME left because I wasn't 100% sure on how it worked. @jakubkoci maybe you can help me answer. When creating an oob record that is reusable, is it correct that all connections will have the same oob id? If that's true I need to make some small tweaks to the script.

Signed-off-by: Jakub Koci <[email protected]>
Signed-off-by: Jakub Koci <[email protected]>
Signed-off-by: Jakub Koci <[email protected]>
jakubkoci and others added 18 commits April 26, 2022 12:10
Signed-off-by: Jakub Koci <[email protected]>
Signed-off-by: Jakub Koci <[email protected]>
* Create a new connection instead of reusing an existing one
* Add did doc signature
* Add state machine and state updates
* Add did exchange handlers
* Add did exchange protocol to connections module
* Make it work with peer dids
* Revert changes in old authentication and public key tranformations
* Allow to set hanshake protocol when creating oob message
* Extract did exchange state machine
* Add generic way to get auth public key from diddoc
* Add did exchange problem report
* Iterate over all service endpoints
* Allow only numalgo 1 and peer dids inside message
* Send stored variant of did document in message
* Update accepted didcomm profiles
* Add routing keys as verification methods and use publicBase58 keys in service
* Add oob test with mediation

Signed-off-by: Jakub Koci <[email protected]>
* Add oob record and make it work with did exchange
* Make oob work also with connection protocol
* Add auto accept connection flag to create oob config
* Save oob record when receiving message
* Separate accept invitation according to handshake protocol
* Use oob record for connections protocol initiated by oob message
* Add oob service to access repository
* Add oob record state update
* Iterate over all endpoints in routing
* Use uniqe array of keys from all services

Signed-off-by: Jakub Koci <[email protected]>
…ion#676)

* Separate OOB invitation and OOB message handling
* Replace create connection method with oob
* Update oob API with default values and remove old invitation methods
* Rename oob method to use invitation instead of message
* Split making a mediation connection and provisioning mediation
* Expose method to create legacy connection invitation

Signed-off-by: Jakub Koci <[email protected]>
…oundation#680)

* Refactor assert state, role and rename methods
* Narrow oob state checks

Signed-off-by: Jakub Koci <[email protected]>
…let-foundation#687)

* Remove verkey and theirKey from connection record
* Remove did docs from connection record
* Reuse oob keys for created connection
* Remove check for peer did and rename sender did doc to our did doc
* Assume one did record per recipient or sender key
* Resolve did doc instead of fetch from repository
* Take only auth keys as their verkeys when storing did record

Signed-off-by: Jakub Koci <[email protected]>
…undation#698)

* Extract creation of did doc from services
* Create peer did from service and store it as invitation did

Signed-off-by: Jakub Koci <[email protected]>
It fixes changes after rebase

Signed-off-by: Jakub Koci <[email protected]>
…ndation#700)

* Use instance of Key in message context

Signed-off-by: Jakub Koci <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
@TimoGlastra TimoGlastra requested a review from a team as a code owner April 30, 2022 14:30
@TimoGlastra TimoGlastra marked this pull request as draft April 30, 2022 14:31
@TimoGlastra TimoGlastra changed the base branch from main to feat/out-of-band April 30, 2022 14:31
@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2022

Codecov Report

Merging #731 (a799116) into feat/out-of-band (337d6a2) will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@                 Coverage Diff                  @@
##           feat/out-of-band     #731      +/-   ##
====================================================
+ Coverage             87.19%   87.34%   +0.14%     
====================================================
  Files                   388      390       +2     
  Lines                  8850     8954     +104     
  Branches               1518     1533      +15     
====================================================
+ Hits                   7717     7821     +104     
  Misses                 1072     1072              
  Partials                 61       61              
Impacted Files Coverage Δ
...modules/connections/repository/ConnectionRecord.ts 100.00% <ø> (ø)
packages/core/src/storage/BaseRecord.ts 86.95% <ø> (ø)
...ages/core/src/modules/dids/repository/DidRecord.ts 100.00% <100.00%> (ø)
.../modules/dids/repository/didRecordMetadataTypes.ts 100.00% <100.00%> (ø)
...core/src/modules/oob/repository/OutOfBandRecord.ts 100.00% <100.00%> (ø)
...rc/storage/migration/updates/0.1-0.2/connection.ts 100.00% <100.00%> (ø)
...ore/src/storage/migration/updates/0.1-0.2/index.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 337d6a2...a799116. Read the comment docs.

@TimoGlastra TimoGlastra mentioned this pull request May 11, 2022
33 tasks
@TimoGlastra TimoGlastra deleted the branch openwallet-foundation:feat/out-of-band May 13, 2022 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants