You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cactus-plugin-ledger-connector-fabric): support delegated (offline) 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: #2598
Signed-off-by: Michal Bajer <[email protected]>
@@ -329,6 +331,47 @@ Corresponds directly to `BlockType` from `fabric-common`:
329
331
-`WatchBlocksListenerTypeV1.Full`,
330
332
-`WatchBlocksListenerTypeV1.Private`,
331
333
334
+
### 1.6 Delegated Signature
335
+
- Custom signature callback can be used when increased security is needed or currently available options are not sufficient.
336
+
- Signature callback is used whenever fabric request must be signed.
337
+
- To use delegate signature instead of identity supplied directly / through keychain use `transactDelegatedSign` (for transact) or `watchBlocksDelegatedSignV1` for block monitoring.
338
+
-`uniqueTransactionData` can be passed to each delegate sign method on connector. This data is passed to signCallback to identify and verify the request. It can be used to pass signing tokens or any other data needed for performing the signing (e.g. user, scopes, etc...).
339
+
-`signProposal` method from this package can be used to sign the requests in offline location.
340
+
- For more complex examples see tests: `delegate-signing-methods.test` and `fabric-watch-blocks-delegated-sign-v1-endpoint.test`.
341
+
342
+
#### 1.6.1 Example
343
+
```typescript
344
+
// Setup - supply callback when instantiating the connector plugin
0 commit comments