Add method to set the auth provider in SessionBuilder

Description

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).

Environment

None

Pull Requests

None

Status

Assignee

Greg Bestland

Reporter

Jorge Bay Gondra

Labels

None

PM Priority

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Components

Priority

Major
Configure