Note: I am using the Go SDK, but this should apply to Node, Java, etc. SDKs.
I am using a fabric-ca
instance as my Certificate Authority, and for a realistic production environment I need to use a secure connection.
Based on the config-e2e.yaml
example configuration file [1], we should be able to use https
in the CA url. Example:
certificateAuthorities:
org1-ca:
url: https://localhost:7054
However, once https
is required, the SDK requires that the TLS cert/key filepath is added in the client
section [1]:
tlsCACerts:
# Comma-Separated list of paths
path: {filepath}
# Client key and cert for SSL handshake with Fabric CA
client:
key:
path: {filepath}
cert:
path: {filepath}
However, other docs [2] indicate that the tlsCACerts
section is for mutual TLS connections, and based on my limited understanding of TLS [3], mutual TLS should not be needed for an https
connection (most browsers don't use mutual TLS to secure the connection).
Can someone explain:
1) The most simplistic way to secure (https) a connection between the SDK (client) and the CA / peer / orderer?
2) Why we are hard-coding TLS cert/key filepaths into the config file when these should be refreshed very often when use in production?
NOTE: This question/answer seems to indicate that you don't need mutual TLS for a secure connection, but if I add https:
to my CA url, I get errors until I fill in the tlsCACerts
section.
[1] https://github.com/hyperledger/fabric-sdk-go/blob/master/test/fixtures/config/config_e2e.yaml
[2] (see "client authentication" vs. server-side TLS settings) https://hyperledger-fabric.readthedocs.io/en/release-1.2/enable_tls.html
[3] http://www.cafesoft.com/products/cams/ps/docs32/admin/SSLTLSPrimer.html