@samarsimha You can use configure MongoDBControllerService > SSL Context Service and provide certificate details.So NiFi can use these details to communicate with MongoDB database.
[Note: Make sure that the certificate details like keystore and truststore path should be same on all NiFI nodes]
SSL Context Service you can use StandardSSLContextService which will allow you to communicate with both legacy and modern systems
Thanks,
Akash