hyperledger / hyperledger/fabric
Fabric and AWS CloudHSM doc updates
- Dominant language
- Go
- Stars
- 16.7k
- Forks
- 9.1k
- Avg merge
- 5h 38m
- Merged PRs (30d)
- 26
Description
Hello,
Are there any detailed docs about how to configure fabric with AWS CloudHSM?
I've set up a CloudHSM instance and can connect to it with the cloudhsm_mgmt_util tool. I created a CU "fabric" user and I configured the fabric-ca-client tool like this:
```
bccsp:
default: PKCS11
pkcs11:
Library: /opt/cloudhsm/lib/libcloudhsm_pkcs11.so
Pin: 'fabric:password'
AltId: FABRIC
Label: cavium
hash: SHA2
security: 256
```
However when I try to enroll a user with fabric-ca-client I get this error:
`Error: Failed to get BCCSP with opts: Could not initialize BCCSP PKCS11: pkcs11: could not find token with label cavium`
Here is the libcloudhsm log:
```
root@ee2506438d16:/etc/hyperledger/fabric-ca-client# cat /opt/cloudhsm/run/cloudhsm-pkcs11.log.2021-10-06
2021-10-06T20:20:03.895+02:00 INFO [30] ThreadId(5) [cloudhsm_provider::hsm1::connection::connection_pool] Adding HSM connection to connection pool: HsmConnection { hsm_info: HSM { IP: "10.4.1.189", Port: 2223 } }
2021-10-06T20:20:03.899+02:00 INFO [30] ThreadId(5) [cloudhsm_provider::hsm1::hsm_connection::server_connection::common] Initializing new connection: HSM { IP: "10.4.1.189", Port: 2223 }
2021-10-06T20:20:03.944+02:00 INFO [30] ThreadId(5) [cloudhsm_provider::hsm1::hsm_connection::server_properties] Version handshake with server succeeded. Received version: ComponentVersion { major: 2, minor: 3 }
2021-10-06T20:20:03.945+02:00 INFO [30] ThreadId(5) [hsm1_marshaling::server_handshake] Reporting sdk version Pkcs11:5.2-1-bionic:CodeBuildBatchProject-uFu5sNXfquqK:ed9a3dbd-7172-439f-8ee3-79408d4e3f39
2021-10-06T20:20:03.992+02:00 WARN [30] ThreadId(2) [cloudhsm_provider::hsm1::hsm_connection::dispatcher_strategy] UX000: Discarding HSM response because it does not match a pending request.
2021-10-06T20:20:04.043+02:00 INFO [30] ThreadId(5) [cloudhsm_provider::hsm1::connection::device] Retrieving HSM information.
```
(I know I'm talking about fabric-ca-client and not fabric-peer or orderer but I guess it's the same code between the 2 projects)
In any case, a detailed setup guide with AWS CloudHSM would be very welcome in the Fabric docs.
Contributor guide
Assessment
This issue has not been assessed yet.