Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New fabric connector crashes if you try to use the init flow without mutual TLS #1160

Closed
davidkel opened this issue Sep 14, 2021 · 0 comments · Fixed by #1183
Closed

New fabric connector crashes if you try to use the init flow without mutual TLS #1160

davidkel opened this issue Sep 14, 2021 · 0 comments · Fixed by #1183
Assignees
Labels
bug Something isn't working component/fabric Related to the HL Fabric adapter
Milestone

Comments

@davidkel
Copy link
Contributor

The init flow in the new fabric 1.4 connector can configure a fabric network but should not be used outside of the caliper build environment. As it uses Mutual TLS it works. The fabric 2.2 init flow doesn't do anything except log. The problem is both of the init flows make the following call

        const tlsInfo = this.connectorConfiguration.isMutualTLS() ? 'mutual'
            : (this.connectorConfiguration.getConnectionProfileDefinitionForOrganization(defaultOrganization).isTLSEnabled() ? 'server' : 'none');

The issue here is that getConnectionProfileDefinitionForOrganization returns a promise, so it is missing an await.

We should fix this for 1.4, but for 2.2 given that init does nothing and there is no point using an init flow, we should no-op this in the 2.2 connector.

@davidkel davidkel added the bug Something isn't working label Sep 14, 2021
@davidkel davidkel added the component/fabric Related to the HL Fabric adapter label Sep 26, 2021
@davidkel davidkel self-assigned this Dec 7, 2021
davidkel added a commit to davidkel/caliper that referenced this issue Dec 7, 2021
You get the error isTLSEnabled is not a defined function

closes hyperledger#1160
Signed-off-by: D <d_kelsey@uk.ibm.com>
davidkel added a commit to davidkel/caliper that referenced this issue Dec 7, 2021
fixes the issue where on the init flow you get

TypeError:
this.connectorConfiguration.getConnectionProfileDefinitionForOrganization(...).isTLSEnabled
is not a function

closes hyperledger#1160
Signed-off-by: D <d_kelsey@uk.ibm.com>
davidkel added a commit that referenced this issue Dec 9, 2021
fixes the issue where on the init flow you get

TypeError:
this.connectorConfiguration.getConnectionProfileDefinitionForOrganization(...).isTLSEnabled
is not a function

closes #1160
Signed-off-by: D <d_kelsey@uk.ibm.com>

Co-authored-by: D <d_kelsey@uk.ibm.com>
@davidkel davidkel added this to the v0.5.0 milestone Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component/fabric Related to the HL Fabric adapter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant