Mechanism property key for specifying whether to canonicalize the host name for GSSAPI authentication.
Mechanism property key for specifying whether to canonicalize the host name for GSSAPI authentication.
4.0
#withMechanismProperty(String, Object)
#createGSSAPICredential(String)
The GSSAPI mechanism.
Mechanism property key for overriding the SaslClient properties for GSSAPI authentication.
Mechanism property key for overriding the SaslClient properties for GSSAPI authentication.
The value of this property must be a Map[String, Object]
. In most cases there is no need to set this mechanism property.
But if an application does:
javax.security.sasl.Sasl#CREDENTIALS
property to an instance of org.ietf.jgss.GSSCredential
javax.security.sasl.Sasl#MAX_BUFFER
property to "0" to ensure compatibility with all
versions of MongoDB.
4.0
javax.security.sasl.Sasl#MAX_BUFFER
javax.security.sasl.Sasl#CREDENTIALS
javax.security.sasl.Sasl
#withMechanismProperty(String, Object)
#createGSSAPICredential(String)
Mechanism property key for overriding the javax.security.auth.Subject
under which GSSAPI authentication executes.
Mechanism property key for overriding the javax.security.auth.Subject
under which GSSAPI authentication executes.
4.0
#withMechanismProperty(String, Object)
#createGSSAPICredential(String)
The MongoDB X.509
The MongoDB X.509
4.0
The PLAIN mechanism.
The SCRAM-SHA-1 Mechanism.
The SCRAM-SHA-1 Mechanism.
4.0
Requires MongoDB 3.0 or greater
The SCRAM-SHA-256 Mechanism.
The SCRAM-SHA-256 Mechanism.
3.8
Requires MongoDB 4.0 or greater
Mechanism property key for overriding the service name for GSSAPI authentication.
Mechanism property key for overriding the service name for GSSAPI authentication.
4.0
#withMechanismProperty(String, Object)
#createGSSAPICredential(String)
Creates a MongoCredential instance with an unspecified mechanism.
Creates a MongoCredential instance with an unspecified mechanism. The client will negotiate the best mechanism based on the version of the server that the client is authenticating to. If the server version is 3.0 or higher, the driver will authenticate using the SCRAM-SHA-1 mechanism. Otherwise, the driver will authenticate using the MONGODB_CR mechanism.
the user name
the database where the user is defined
the user's password
the credential
Creates a MongoCredential instance for the GSSAPI SASL mechanism.
Creates a MongoCredential instance for the GSSAPI SASL mechanism. To override the default service name of mongodb
, add a
mechanism property with the name SERVICE_NAME
. To force canonicalization of the host name prior to authentication, add a
mechanism property with the name CANONICALIZE_HOST_NAME
with the value true
.
the non-null user name
the credential
Creates a MongoCredential instance for the MongoDB X.509 protocol where the distinguished subject name of the client certificate acts as the userName.
Creates a MongoCredential instance for the MongoDB X.509 protocol where the distinguished subject name of the client certificate acts as the userName.
the credential
1.2
Requires MongoDB 3.4 or greater
Creates a MongoCredential instance for the MongoDB X.509 protocol.
Creates a MongoCredential instance for the MongoDB X.509 protocol.
the user name
the credential
Creates a MongoCredential instance for the PLAIN SASL mechanism.
Creates a MongoCredential instance for the PLAIN SASL mechanism.
the non-null user name
the source where the user is defined. This can be either $external
or the name of a database.
the non-null user password
the credential
Creates a MongoCredential instance for the SCRAM-SHA-1 SASL mechanism.
Creates a MongoCredential instance for the SCRAM-SHA-1 SASL mechanism. Use this method only if you want to ensure that the driver uses the MONGODB_CR mechanism regardless of whether the server you are connecting to supports a more secure authentication mechanism. Otherwise use the createCredential method to allow the driver to negotiate the best mechanism based on the server version.
the non-null user name
the source where the user is defined.
the non-null user password
the credential
Creates a MongoCredential instance for the SCRAM-SHA-256 SASL mechanism.
Creates a MongoCredential instance for the SCRAM-SHA-256 SASL mechanism.
the non-null user name
the source where the user is defined.
the non-null user password
the credential
Requires MongoDB 4.0 or greater
(Since version ) see corresponding Javadoc for more information.
Represents credentials to authenticate to a MongoDB server, as well as the source of the credentials and the authentication mechanism to use.
1.0