-
Notifications
You must be signed in to change notification settings - Fork 285
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(cactus-plugin-ledger-connector-fabric): support delegated (offline) signatures #2644
feat(cactus-plugin-ledger-connector-fabric): support delegated (offline) signatures #2644
Conversation
…ocketio connector - Remove cactus-plugin-ledger-connector-fabric-socketio connector. - Refactor discounted cartrade sample to use openapi fabric connector instead of fabric-socketio. Sample app will use delegated signing, similar to offline signing in old connector. - Remove dead code from cmd-socketio-server - Update fabric SDK to 2.X in all cacti projects, refactor code that use it where necessary. Only exception is fabric persistence plugin which uses fabric SDK as dev dependency (for tests). It can be updated in separate PR later on. Depends on: hyperledger-cacti#2644 Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
216bd93
to
4687000
Compare
…ocketio connector - Remove cactus-plugin-ledger-connector-fabric-socketio connector. - Refactor discounted cartrade sample to use openapi fabric connector instead of fabric-socketio. Sample app will use delegated signing, similar to offline signing in old connector. - Remove dead code from cmd-socketio-server - Update fabric SDK to 2.X in all cacti projects, refactor code that use it where necessary. Only exception is fabric persistence plugin which uses fabric SDK as dev dependency (for tests). It can be updated in separate PR later on. Depends on: hyperledger-cacti#2644 Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
2952221
to
b95183c
Compare
packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json
Show resolved
Hide resolved
b95183c
to
4ee177e
Compare
This PR/issue depends on:
|
@petermetz I'm afraid the VM is running out of space after I've added new tests, any suggestions how we can fix this? :) See messages before failing tests:
Test affected: (btw need to fix cactus-cmd-api-server test as well before merge) |
…ocketio connector - Remove cactus-plugin-ledger-connector-fabric-socketio connector. - Refactor discounted cartrade sample to use openapi fabric connector instead of fabric-socketio. Sample app will use delegated signing, similar to offline signing in old connector. - Remove dead code from cmd-socketio-server - Update fabric SDK to 2.X in all cacti projects, refactor code that use it where necessary. Only exception is fabric persistence plugin which uses fabric SDK as dev dependency (for tests). It can be updated in separate PR later on. Depends on: hyperledger-cacti#2644 Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
@outSH Set the env var |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@outSH LGTM, thank you!
4ee177e
to
7425946
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ne) signatures - Add new `RunDelegatedSignTransactionEndpointV1` endpoint for delegated / offline signing. Takes `signerCertificate` and `signerMspID`, uses `signCallback` on connector to sign messages. Sign must be implemented by a user, can contain any logic (contacting 3'rd party services, reading from secure sources, etc…). Interface is similar to transact. Supports private transactions. - Refactor transact endpoint: Use common logic for handling response format. with delegated transact - Refactor logic of choosing ednorsers in transact endpoint. Previously both `endorsingPeers` and `endorsingParties` were selecting organizations in sligly different way under different circumstances. Now `endorsingPeers` selectes peers and `endorsingOrgs` selects orgs for all cases (query, send, privatesend) in both transact and transact with delegated sign. This is more consistent and predictable. - Add new socketio endpoint `SubscribeDelegatedSign` for monitoring new blocks with delegated sign. - Use common error handling in getblock, transact and transact delgated endpoints. - Add functional tests for delegated signing feature. Depends on: hyperledger-cacti#2598 Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
7425946
to
b1718fe
Compare
…ocketio connector - Remove cactus-plugin-ledger-connector-fabric-socketio connector. - Refactor discounted cartrade sample to use openapi fabric connector instead of fabric-socketio. Sample app will use delegated signing, similar to offline signing in old connector. - Remove dead code from cmd-socketio-server - Update fabric SDK to 2.X in all cacti projects, refactor code that use it where necessary. Only exception is fabric persistence plugin which uses fabric SDK as dev dependency (for tests). It can be updated in separate PR later on. Depends on: hyperledger-cacti#2644 Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
…ocketio connector - Remove cactus-plugin-ledger-connector-fabric-socketio connector. - Refactor discounted cartrade sample to use openapi fabric connector instead of fabric-socketio. Sample app will use delegated signing, similar to offline signing in old connector. - Remove dead code from cmd-socketio-server - Update fabric SDK to 2.X in all cacti projects, refactor code that use it where necessary. Only exception is fabric persistence plugin which uses fabric SDK as dev dependency (for tests). It can be updated in separate PR later on. Depends on: #2644 Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
…ocketio connector - Remove cactus-plugin-ledger-connector-fabric-socketio connector. - Refactor discounted cartrade sample to use openapi fabric connector instead of fabric-socketio. Sample app will use delegated signing, similar to offline signing in old connector. - Remove dead code from cmd-socketio-server - Update fabric SDK to 2.X in all cacti projects, refactor code that use it where necessary. Only exception is fabric persistence plugin which uses fabric SDK as dev dependency (for tests). It can be updated in separate PR later on. Depends on: hyperledger-cacti#2644 Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
RunDelegatedSignTransactionEndpointV1
endpoint for delegated / offline signing.Takes
signerCertificate
andsignerMspID
, usessignCallback
on connector to sign messages.Sign must be implemented by a user, can contain any logic
(contacting 3'rd party services, reading from secure sources, etc…).
Interface is similar to transact. Supports private transactions.
endorsingPeers
and
endorsingParties
were selecting organizations in sligly different way under differentcircumstances. Now
endorsingPeers
selectes peers andendorsingOrgs
selects orgs for allcases (query, send, privatesend) in both transact and transact with delegated sign.
This is more consistent and predictable.
SubscribeDelegatedSign
for monitoring new blocks with delegated sign.Depends on #2598
Signed-off-by: Michal Bajer michal.bajer@fujitsu.com