Package io.quarkus.mongodb.runtime
Class CredentialConfig
java.lang.Object
io.quarkus.mongodb.runtime.CredentialConfig
Configures the credentials and authentication mechanism to connect to the MongoDB server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionConfigures the authentication mechanism to use if a credential was supplied.Allows passing authentication mechanism properties.Configures the source of the authentication credentials.The credentials provider nameThe credentials provider bean name.Configures the password.Configures the username. -
Constructor Summary
Constructors -
Method Summary
-
Field 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
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<String> credentialsProviderThe credentials provider name -
credentialsProviderName
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<String> credentialsProviderNameThe 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
.
-
-
Constructor Details
-
CredentialConfig
public CredentialConfig()
-