You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from Spring Boot 3.0 to 3.1 today, MongoDB authentication via the autoconfiguration is broken.
If you configure both a database to use, and a separate database to authenticate against, the authentication database is ignored, and authentication is attempted against the to-be-used database.
In versions past, and the intended behavior is, that specifying the authentication database allows authenticating as the user to that DB and then switching over to the configured database for normal operations.
Perhaps the PropertiesMongoConnectionDetails should append the authSourceoption to the connection string if authenticationDatabse is present?
The text was updated successfully, but these errors were encountered:
MONGO_INITDB_ROOT_USERNAME, MONGO_INITDB_ROOT_PASSWORD
These variables, used in conjunction, create a new user and set that user's password. This user is created in the admin authentication database
We might need to set the authentication database to the value admin if the username and password environment variables are configured. Can you create a new issue so we can investigate further?
After upgrading from Spring Boot 3.0 to 3.1 today, MongoDB authentication via the autoconfiguration is broken.
If you configure both a database to use, and a separate database to authenticate against, the authentication database is ignored, and authentication is attempted against the to-be-used database.
In versions past, and the intended behavior is, that specifying the authentication database allows authenticating as the user to that DB and then switching over to the configured database for normal operations.
Perhaps the
PropertiesMongoConnectionDetails
should append theauthSource
option to the connection string ifauthenticationDatabse
is present?The text was updated successfully, but these errors were encountered: