Skip to content

Commit

Permalink
Add MSP ID to certificate authority information (resolves #60) (#61)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Stone <[email protected]>
  • Loading branch information
Simon Stone authored Sep 25, 2020
1 parent 66c34cc commit 812fa60
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion internal/pkg/console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ type jsonOrderer struct {
Identity string `json:"identity"`
}

type jsonCA struct {
ID string `json:"id"`
DisplayName string `json:"display_name"`
Type string `json:"type"`
APIURL string `json:"api_url"`
APIOptions *jsonOptions `json:"api_options"`
OperationsURL string `json:"operations_url"`
OperationsOptions *jsonOptions `json:"operations_options"`
MSPID string `json:"msp_id"`
Wallet string `json:"wallet"`
Identity string `json:"identity"`
}

type jsonIdentity struct {
ID string `json:"id"`
DisplayName string `json:"display_name"`
Expand Down Expand Up @@ -301,7 +314,7 @@ func (c *Console) getDynamicComponents(req *http.Request) components {
orgName := ca.Organization().Name()
lowerOrgName := strings.ToLower(orgName)
id := fmt.Sprintf("%sca", lowerOrgName)
dynamicComponents[id] = &jsonPeer{
dynamicComponents[id] = &jsonCA{
ID: id,
DisplayName: fmt.Sprintf("%s CA", orgName),
Type: "fabric-ca",
Expand All @@ -317,6 +330,7 @@ func (c *Console) getDynamicComponents(req *http.Request) components {
SSLTargetNameOverride: ca.OperationsHost(false),
RequestTimeout: 300 * 1000,
},
MSPID: ca.Organization().MSPID(),
Identity: ca.Organization().CAAdmin().Name(),
Wallet: ca.Organization().Name(),
}
Expand Down

0 comments on commit 812fa60

Please sign in to comment.