[Robust Fabric Config] Refactor client configuration #593
Labels
component/fabric
Related to the HL Fabric adapter
enhancement
New feature or request
locked
Someone is already working on it
Milestone
Context
This issue is part of the Fabric network configuration schema refactoring task.
Currently, a client can be configured in multiple ways.
Using a wallet
In this case, only the org is needed, everything else is forbidden.
Loading existing credentials
The certs and keys are already generated, and their paths must be specified. Also, a credential store must be configured
Registering and enrolling a client dynamically
In this case, the client is registered and enrolled runtime through a CA (a credential store is also needed). It needs an affiliation string and optionally some attributes.
Only enrolling an already registered user
This is a rare case but could happen. In this case, an enrollment secret is needed (plus the credential store).
Actual Behavior
These modes are mutually exclusive. However, they're specified on the same hierarchical level in the configuration, which makes their validation and usage cumbersome.
Possible Fix
Since neither modes (apart from the wallet) are part of the CCP of the SDK, we can group them however we want.
Benefits
The functional behavior is unchanged, but it's much easier to check mutual exclusion among the different modes. And since the related properties are grouped under their respective mode property, accessing them becomes more natural and readable.
Your Environment
The text was updated successfully, but these errors were encountered: