Server authentication is enabled in most production deployments, we should provide a comfortable way to programmatically set the Authenticator class and settings.
Currently, the way to set is:
We could expose a method to be used like this:
Given that credentials are usually stored using secret managers, env vars or any other vault that is accessible only at runtime, it's unlikely that file-based configuration will help in this case.
Ideally we could also provide a withCredentials(username, password), that is a simple concept for users to understand:
Internally, it can be mapped to a PlainTextAuthenticator (C*) and a DsePlainTextAuthenticator (DSE Driver).