Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. See the simple demo hosted here: https://github.com/brioux/fabric-client-signer. It simulates how a browser based wallet like Metamask would work
    1. Note: Metamask supports elleptic curve signatures using the secp256k1 algorithm, which, is not supported by Fabric. Fabric has a tutorial using offline private keys and CSR files provided by the client. While this was investigated as a quick solution to integrating Metamask with utility emissions channel, Fabric CA does not support secp256k1 keys used by Ethereum/Bitcoin. A
  2. This demo illustrates the process for offline signing and could be extended to implement a browser signer extension (something like Metamask) for a Fabric network.

    1. generate a csr using some client provided private key / encryption algorithm. (e.g. ECDSA prime256v1);
    2. include the self-signed csr generated from the private key when enrolling new user with the fabric CA client;
    3. build endorsement proposal with transaction payload and sign using the private keys encryption algorithm;
    4. send signed proposal to required peers and check responses;
    5. if valid build a new commit with the endorsement from (2), sign commit with the private key encryption and send to peers;
  3. A better approach to achieve off-line signing is to create a custom identity provider that extends (implements?) the fabric-network IdentityProvider class.
  4. This project is developing a web-socket based identity provider. A secure web-socket connection handles the sending of digests from a fabric network server/application to be signed by an external client. The components fo the web-socket identity provider can be found here. The include
    1. A ws-identity server that relays signature requests made to fabric network as digest to the external client
    2. A ws-wallet that signs digests using a key-file stored on the clients external device (e.g. encrypted keyfile or HSM). The wallet handles the generation and management of key files. The ws-wallet can also be configured to store certificates (i.e. CSR pem files) signed by the external client when enrolling with the Fabric application. 
    3. The fabric application that requests signatures from the external ws-wallet client. It requres API keys to access the session tickets opened on the ws-identity server iwth an external client
    4. A custom identity provider that setup the connection between the Fabric app, the ws-identity server and the external clients ws-wallet.
    5. A dedicated ws-identity-client is used to handle html requests between the identity provider of the Fabric app or the ws-wallet instance and the ws-identity server
  5. A web-socket based identity provider is being built with typescript as an extension of the IdentityProvider interface of the Fabric network nodes.js SDK
  6. The identity provider can be used to conect to any external client, suchas a browser, mobile app or IoT device . For example, something  like the fabric based chrome extension but with the singing actually handled an external key file, not keys stored on the fabric app. In this project the fabric middle-wear still handles the private key storage and singing, with the extension just telling the user what fabric network they are interacting with, and buttons to submit transactions.


Entity-control-boundary for ws-identity sessions

  • control WsClient : web-socket client of the external User
  • boundary WsWallet : crypto wallet of the User
  • actor User : External user of the Fabric App
  • boundary FabricApp : The Fabric app
  • control WsIdentityServer : web-socket identity server
  • control WsClientServer : User's web-socket client on the identity server

ws-identity sessionImage Added


Another effort in this project is to integrate a Hardware Security Module (HSM) using the HSMX509Provider class. A first attempt using the Utility Emissions Channel was started here https://github.com/brioux/blockchain-carbon-accounting. It uses softHSM2 as a virtual HSM. The HSM is accessed by the Fabric client app using a token label and pin to initialize the HSMprovider. However, in the original implementation the HSM lives on the same server as the fabric application, so this is does not support the singing of transactions by an external client application. Instead a secure , however at the time of writting this did not support asynchronous requests to an external client. A secure proxy server, similar to the ws-identity server described above, is needed to relay requests between the Fabric app and the external HSM. Infact, ws-wallet could be setup to use an HSM for local key storage and signing when handling requests from ws-identity. A pin should be provided to access the HSM singing algorithm.