I have configured a mongo DB with replicaSet clustering 3 servers ( 1 primary and 2 secondary). This is working pretty much good and my only concern is after configure the replicaSet I am able to access / connect the mongo DB without replicaset. When pushing the data how can I restrict the access to the DB with mandatory replicaset name. If is not the exact same replicaSet name metioned, it should drop the connection. Currently without provide any replicaset also I am able to connect and push data.
I am a beginner in replicaSet configuration and really dont know actually is that a security problem or not.