Q:

Hyperledger Composer Identity Issue error after network restart (code:20, authorization failure)

I am using Docker Swarm and docker-compose to setup my Fabric (v1.1) and Composer (v0.19.18) networks.
I wanted to test how my Swarm/Fabric networks would respond to a host/ec2 failure, so I manually reboot the host which is running the fabric-ca, orderer, and peer0 containers. 
Before the reboot, everything runs perfectly with respect to issuing identities.  After the reboot, though all of the Fabric containers are restarted and appear to be functioning properly, I am unable to issue identities with the main admin@network card.
After reboot, composer network ping -c admin@network returns successfully, but composer identity issue (via CLI or javascript) both return code 20 errors as described here:

"fabric-ca request register failed with errors [[{\"code\":20,\"message\":\"Authorization failure\"}]]"

I am guessing the issue is stemming from the host reboot and some difference in how it is restarting the Fabric containers.  I can post my docker-compose files if necessary.

A:

If your fabric-ca-server has restarted and it's registration database hasn't been persisted (for example the database is stored on the file system of the container and loss of that container means loss of the contents of that file system) then the ca-server will create a completely new bootstrap identity called admin for issuing identities and it won't be the one you have already have and therefore isn't a valid identity anymore for the fabric-ca-server. Note that it will be a valid identity for the fabric network still. So this is why you now get authorisation failure from the fabric-ca-server. The identity called admin that you currently have is not known to your fabric-ca-server anymore.

