this may be a really dumb question but I'm struggling to understand how this exactly works.
I'm working with MongoDB. I have 3 files: server.pem, client.pem and ca.pem. I need to use them to internally authenticate the members of a replica set.
All three of them are similar. The first question is: why do I need three of them? What is the purpose of each one?
I also have an assignment in which I have to say if each of these three must contain a certificate and a key in order to work. I don't want a direct answer to this, but I'd like to know if this is something related to the x.509 standard or to MongoDB itself and where to look for an answer.
I've been documenting here and on Google (mostly Wikipedia) but I didn't find this topic addressed anywhere.
Any help is appreciated.
Thank you
The MongoDB tutorial on Using x.509 Certificates for Membership Authentication is an excellent guide to the requirements, but here's a guide which explains in the context of the certificates you've been given.
The certificates you need are:
Note that in a normal replica set where the nodes are running on different servers, each node will need its own certificate. In your assignment, you have been issued a single server certificate, to be used by every node; that will only work if every node is running on the same server.
That specific set of components are required for the following reasons:
So in summary, each node needs to have:
Those map to the files you've been supplied with as follows: