I don’t think it will be a simple change. Consider that a MongoClient
can be configured to connect to a replica set, and if so it attempts to discover all of its members. The driver would need to be configured with a different gssapiHostname
for each discovered member.
If you’re not able to determine a path forward without a change to the driver, I suggest you contact MongoDB support via support.mongodb.com (I’m assuming you have a support contract since GSSAPI authentication is an Enterprise-only feature).
Regards,
Jeff Yemin