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
{{ message }}
This repository was archived by the owner on Apr 22, 2025. It is now read-only.
Allow a set of connection options to be common
and associated with the client. The client will apply
the common set to each new peer and orderer it builds
including peers and orderers that it builds for discovery.
The user will be allowed to override during create any
of the settings. The option set will originate in the
system configuration (default.json). Users will be
able to override or add new ones at anytime to the
client instance. The options may also be kept in the
common connection profile client section.
Change-Id: I06e27db8835b8453e6289bc1201f8e0d21802912
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
Copy file name to clipboardExpand all lines: docs/tutorials/network-config.md
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -144,7 +144,15 @@ certificateAuthorities:
144
144
caName: caorg2
145
145
```
146
146
147
-
The following example will have an existing fabric client load a connection profile configuration. The definition will only contain client side definitions and no fabric network definitions. Calling for a load on an existing fabric client does an overlay of the top level sections in the file being loaded replacing the sections on those previously loaded. In this case the file being loaded only has a client section, therefore the loaded definition will now have the previously loaded channels, organizations, peers, orderers, and certificateAuthorities section definitions and the newly loaded client section definition. This allows for an existing fabric client to be able to work within different organization. Note: The the SDK's `grpc-max-send-message-length` default is -1 (unlimited).
147
+
The following example will have an existing fabric client load a connection profile configuration. The definition will only contain client side definitions and no fabric network definitions. The client may load a new profile at anytime, it will overlay the top level sections it contains of those previously loaded. In this case the file being loaded only has a client section, therefore the loaded definition will now have the previously loaded channels, organizations, peers, orderers, and certificateAuthorities section definitions and the newly loaded client section definition. This allows for an existing fabric client to be able to work within different organization.
148
+
Notice this client definition contains a `connection` section with an `options` attribute in the
149
+
client section. Settings defined here will be applied to new peer and orderer
150
+
instances the client creates.
151
+
This will include peers and orderers that will be created automatically when
152
+
using the discovery service.
153
+
Peers and Orderers may override these connection settings in their `grpcOptions` settings.
154
+
155
+
Note: The fabric-client `grpc-max-send-message-length` and `grpc-max-receive-message-length` defaults are -1 (unlimited).
When your network configuration includes mutual TLS, the client certificate and private key must be available to the client instance before the endpoints are automatically built. The client instance will be able to pass the required material to the endpoint instance that is needed to establish the connection. The example shown will also retrieve the material. These steps must be performed before any actions on the fabric network.
206
+
When your network is using mutual TLS, the client certificate and private key must be available to the client instance before the endpoints are automatically built. The client instance will be able to pass the required material to the endpoint instance that is needed to establish the connection. The example shown will also retrieve the material. These steps must be performed before any actions on the fabric network.
196
207
```
197
208
// get the CA associated with this client's organization
198
209
let fabric_ca_client = client.getCertificateAuthority();
@@ -221,7 +232,7 @@ Notice in the organizations section of the connection profile configuration that
Assume that connection profile configurations have been loaded, setting up both an organization with an admin and indicating that the client is in that organization. Then when the call is made to get a transaction id object, the fabric client will check to see if an admin has been assigned to the fabric client and use that to generate the transaction id. The transaction id returned will be tagged that it was generated with the assigned administrative identity. Notice how the request object being built is using just a name for the orderer rather than a`Orderer` object. The fabric client will look up this name in the loaded connection profile configuration. When the `createChannel` call is made, the fabric client will know that this action should be signed by the administrative identity because the transaction id was marked as an admin based transaction. Note that the administrative signing identity is not required if the logged in user is an administrative user and has been assigned to the fabric client.
235
+
Assume that a common connection profile has been loaded, setting up both an organization with an admin and indicating that the client is in that organization. Then when the call is made to get a transaction id object, the fabric client will check to see if an admin has been assigned to the fabric client and use that to generate the transaction id. The transaction id returned will be tagged that it was generated with the assigned administrative identity. Notice how the request object being built is using just a name for the orderer rather than an`Orderer` object. The fabric client will look up this name in the loaded connection profile configuration. When the `createChannel` call is made, the fabric client will know that this action should be signed by the administrative identity because the transaction id was marked as an admin based transaction. Note that the administrative signing identity is not required if the logged in user is an administrative user and has been assigned to the fabric client.
0 commit comments