Fabric CA Server DB in the Client

135 Views Asked by At

I am building a Hyperledger Fabric blockchain application (docker containers) where I have created also an application gateway (docker container) with node js to interact with it as a backend service.

For my surprise I have witnessed the following case: I have registered new users and enrolled them through the application gateway and the official Fabric SDK using the CAs of the network and stored them in the Fabric Wallet. And I realized that they are stored in a different fabric-ca-server.db than the one that lives under the /etc/hyperledger/fabric-ca-server/ directory of the fabric ca docker container.

What I mean is that when I tried to list the identities through the cli I got zero identities since they were registered through SDK. And when I tried to register the same identities from the SDK I got the usual message of user is already registered.

But I was not able to find where this fabric-ca-server.db is stored that reads for the application gateway (SDK)

2

There are 2 best solutions below

2
On BEST ANSWER

The DB file can be found in the CA container using the following path

/etc/hyperledger/fabric-ca-server 

You will find that this path is also mentioned in the docker compose file.

0
On

The correct path as is stated in the above answer is the directory inside the fabric CA container!

My mistake was that through the application SDK I was only enrolling some admins without registering them. And this was only issuing certificates without adding them to the actual db. After I registered some users and registered them I was able to view them all in the db that is in the docker container.