Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MongoDB authentication to different DB than used no longer works in spring boot 3.1 #35567

@bpfoster

Description

@bpfoster

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 authSource option to the connection string if authenticationDatabse is present?

Metadata

Metadata

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions