Package io.quarkus.mongodb.runtime
Interface CredentialConfig
public interface CredentialConfig
Configures the credentials and authentication mechanism to connect to the MongoDB server.
-
Method Summary
Modifier and TypeMethodDescriptionConfigures the authentication mechanism to use if a credential was supplied.Allows passing authentication mechanism properties.Configures the source of the authentication credentials.Optional
<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String> The credentials provider nameOptional
<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String> The credentials provider bean name.password()
Configures the password.username()
Configures the username.
-
Method Details
-
username
Configures the username. -
password
Configures the password. -
authMechanism
Configures the authentication mechanism to use if a credential was supplied. The default is unspecified, in which case the client will pick the most secure mechanism available based on the sever version. For the GSSAPI and MONGODB-X509 mechanisms, no password is accepted, only the username. Supported values: null orGSSAPI|PLAIN|MONGODB-X509|SCRAM_SHA_1|SCRAM_SHA_256|MONGODB_AWS
-
authSource
Configures the source of the authentication credentials. This is typically the database where the credentials have been created. The value defaults to the database specified in the path portion of the connection string or in the 'database' configuration property. If the database is specified in neither place, the default value isadmin
. This option is only respected when using the MONGO-CR mechanism (the default). -
authMechanismProperties
Allows passing authentication mechanism properties. -
credentialsProvider
Optional<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String> credentialsProvider()The credentials provider name -
credentialsProviderName
Optional<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String> credentialsProviderName()The credentials provider bean name.This is a bean name (as in
@Named
) of a bean that implementsCredentialsProvider
. It is used to select the credentials provider bean when multiple exist. This is unnecessary when there is only one credentials provider available.For Vault, the credentials provider bean name is
vault-credentials-provider
.
-