Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

refactor: enable usage of legacy Anoncrypt packer. Make nested forwards while creating forward message. Add legacyForward model #3272

Merged
merged 4 commits into from
Jul 18, 2022

Conversation

Abdulbois
Copy link
Contributor

@Abdulbois Abdulbois commented Jul 11, 2022

Title:
Enable legacy Anoncrypt packer. Make nested packed forwards while creating forward message

Summary:

  • Add legacy Anoncrypt packer while creating packers
  • Add ability to create nested packed forwards (one nested forward for each routing key)
  • Check and convert msg field of Forward to Envelope in order to support DIDComm V1 Forward types
  • Revert part of 04bfea8 commit related to generating keys inside mediator service. Because with previous changes (having two types of generated keys belonging to the same router) it breaks Route Coordination protocol (while creating nested forwards it will pack two times to the same mediator then mediator cannot handle second forward message
  • Remove test (which checks bad sender key) due to forcing anoncrypt while calling createForwardMessage method

Copy link
Contributor

@sudeshrshetty sudeshrshetty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your contribution @Abdulbois.
PR looks good to me, but please also signoff your commits as per guidelines.

@sudeshrshetty sudeshrshetty self-requested a review July 12, 2022 13:50
@sudeshrshetty
Copy link
Contributor

sudeshrshetty commented Jul 12, 2022

@Abdulbois can you please squash your commits.
Refer these guidelines

@codecov
Copy link

codecov bot commented Jul 13, 2022

Codecov Report

Merging #3272 (cea4da5) into main (d96b693) will increase coverage by 0.01%.
The diff coverage is 92.78%.

@@            Coverage Diff             @@
##             main    #3272      +/-   ##
==========================================
+ Coverage   88.28%   88.29%   +0.01%     
==========================================
  Files         315      315              
  Lines       42668    42706      +38     
==========================================
+ Hits        37669    37709      +40     
+ Misses       3674     3671       -3     
- Partials     1325     1326       +1     
Impacted Files Coverage Δ
pkg/didcomm/protocol/mediator/service.go 88.47% <63.15%> (+0.88%) ⬆️
pkg/didcomm/dispatcher/outbound/outbound.go 90.88% <100.00%> (-0.09%) ⬇️
pkg/didcomm/packager/packager.go 89.88% <100.00%> (+0.21%) ⬆️
pkg/framework/aries/default.go 77.38% <100.00%> (+0.34%) ⬆️

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 d96b693...cea4da5. Read the comment docs.

@Abdulbois Abdulbois force-pushed the nested-forwards branch 3 times, most recently from fc873de to e5f2607 Compare July 13, 2022 11:10
@fqutishat
Copy link
Contributor

@Abdulbois can you rebase

baha-ai and others added 3 commits July 16, 2022 16:14
…dger-archives#3259)

this change updates the remote CryptoBox api URIs to point to remote KMS's key /wrap and /unwrap to match ECDH-ES and ECDH-1PU key wrapping.

This change requires the KMS server to udpate /easy to /wrap, /easyOpen and /sealOpen to /unwrap

Signed-off-by: Baha Shaaban <baha.shaaban@securekey.com>
Signed-off-by: Abdulbois <abdulbois.tursunov@avast.com>
…archives#3263)

This change updates the webkms server in bdd tests and re enables commented out webkms tests requiring cryptobox's /wrap and /unwrap operations.

closes hyperledger-archives#3262

Signed-off-by: Baha Shaaban <baha.shaaban@securekey.com>
Signed-off-by: Abdulbois <abdulbois.tursunov@avast.com>
…ds while creating forward message. Add legacyForward model

- Add legacy Anoncrypt packer while creating packers
- Add ability to create nested packed forwards (one nested forward for each routing key)
- Check and convert msg field of Forward to Envelope in order to support DIDComm V1 Forward types
- Revert part of 04bfea8 commit related to generating keys inside mediator service. Because with previous changes (having two types of generated keys belonging to the same router) it breaks Route Coordination protocol (while creating nested forwards it will pack two times to the same mediator then mediator cannot handle second forward message)

Signed-off-by: Abdulbois <abdulbois.tursunov@avast.com>
…rwardMessage. Fix lint errors

Signed-off-by: Abdulbois <abdulbois.tursunov@avast.com>
@Abdulbois Abdulbois changed the title refactor: change type of Forward.Msg from byte array to Envelope stru… Enable usage of legacy Anoncrypt packer. Make nested forwards while creating forward message. Add legacyForward model Jul 16, 2022
@Abdulbois Abdulbois changed the title Enable usage of legacy Anoncrypt packer. Make nested forwards while creating forward message. Add legacyForward model refactor: enable usage of legacy Anoncrypt packer. Make nested forwards while creating forward message. Add legacyForward model Jul 16, 2022
@Abdulbois
Copy link
Contributor Author

Abdulbois commented Jul 16, 2022

@Abdulbois can you rebase

done. Pls check it

@fqutishat fqutishat merged commit cea4427 into hyperledger-archives:main Jul 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants