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
Since the signingIdentity is undefined (because the method fabricCAClient.enroll set it) the Authorization header is not set,rejectUnauthorized is set to true because verify: true when I instantiated the class, therefore, I get the following error:
I'm asking because I coded a script to create Identities and it was working until today, the latest change in my repository was the upgrade of the SDK from 2.2.9 to 2.2.11 but TBH I cannot blame the upgrade, I reviewed the code and it seems that nothing has changed in that logic for a long time.
So the question I have is: In the fabricCAClient.request method when
signingIdentity is undefined
AND this._tlsOptions.verify is true
AND the property certificate_request exists in requestObj
How the Authorization is header is set? Or Why the certificate_request is not used if the signingIdentity is undefined?
I'm not an expert in SSL/TLS certificates and cannot not propose a fix (I tried a couple of stuff but none worked), I just want to understand if it is an edge case o something is missing in the logic. For the moment the quick fix for this is it to instantiate FabricCaServices w/o verify.
This discussion was converted from issue #542 on January 13, 2023 22:20.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I'm just writing to get some clarification about how
requestObj.certificate_request
is used here https://github.com/hyperledger/fabric-sdk-node/blob/v2.2.11/fabric-ca-client/lib/FabricCAClient.js#L236I'm using the class
FabricCAServices
and instantiating the class using the following piece of codeThen I use the method
fabricCAServices.enroll
passing an object that has the propertycsr
. So, the methodfabricCAServices.enroll
passes thecsr
tofabricCAClient.enroll
(here you can see it https://github.com/hyperledger/fabric-sdk-node/blob/v2.2.11/fabric-ca-client/lib/FabricCAServices.js#L219) then the method puts it in an objectAnd finally it sends
enrollRequest
object to therequest
method without asigningIdentity
(here you can see the method https://github.com/hyperledger/fabric-sdk-node/blob/v2.2.11/fabric-ca-client/lib/FabricCAClient.js#L236).Since the
signingIdentity
isundefined
(because the methodfabricCAClient.enroll
set it) the Authorization header is not set,rejectUnauthorized
is set totrue
becauseverify: true
when I instantiated the class, therefore, I get the following error:I'm asking because I coded a script to create Identities and it was working until today, the latest change in my repository was the upgrade of the SDK from
2.2.9
to2.2.11
but TBH I cannot blame the upgrade, I reviewed the code and it seems that nothing has changed in that logic for a long time.So the question I have is: In the
fabricCAClient.request
method whensigningIdentity
isundefined
this._tlsOptions.verify
istrue
certificate_request
exists inrequestObj
How the Authorization is header is set? Or Why the
certificate_request
is not used if thesigningIdentity
isundefined
?I'm not an expert in SSL/TLS certificates and cannot not propose a fix (I tried a couple of stuff but none worked), I just want to understand if it is an edge case o something is missing in the logic. For the moment the quick fix for this is it to instantiate
FabricCaServices
w/o verify.Thanks in advance,
Beta Was this translation helpful? Give feedback.
All reactions