Package io.quarkus.mongodb.runtime
Class CredentialConfig
- java.lang.Object
-
- io.quarkus.mongodb.runtime.CredentialConfig
-
public class CredentialConfig extends Object
Configures the credentials and authentication mechanism to connect to the MongoDB server.
-
-
Field Summary
Fields Modifier and Type Field Description Optional<String>
authMechanism
Configures the authentication mechanism to use if a credential was supplied.Map<String,String>
authMechanismProperties
Allows passing authentication mechanism properties.Optional<String>
authSource
Configures the source of the authentication credentials.Optional<String>
credentialsProvider
The credentials provider nameOptional<String>
credentialsProviderName
The credentials provider bean name.Optional<String>
password
Configures the password.Optional<String>
username
Configures the username.
-
Constructor Summary
Constructors Constructor Description CredentialConfig()
-
-
-
Field Detail
-
username
@ConfigItem public Optional<String> username
Configures the username.
-
password
@ConfigItem public Optional<String> password
Configures the password.
-
authMechanism
@ConfigItem public Optional<String> 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
@ConfigItem public Optional<String> authSource
Configures the source of the authentication credentials. This is typically the database that 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
@ConfigItem public Map<String,String> authMechanismProperties
Allows passing authentication mechanism properties.
-
credentialsProvider
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<String> credentialsProvider
The credentials provider name
-
credentialsProviderName
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<String> credentialsProviderName
The credentials provider bean name.It is the
@Named
value of the credentials provider bean. It is used to discriminate if multiple CredentialsProvider beans are available.For Vault it is: vault-credentials-provider. Not necessary if there is only one credentials provider available.
-
-