Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose connection details for MongoDB is missing the authSource option when authentication is configured #35777

Closed
ps-tunnelsoft opened this issue Jun 7, 2023 · 0 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@ps-tunnelsoft
Copy link

ps-tunnelsoft commented Jun 7, 2023

While testing spring-boot-docker-compose (Spring Boot 3.1) I encountered an issue regarding MongoDB autoconfiguration. My Spring Boot application got an authentication error during start up. Spring Boot was using the initDB database as authentication target.

According to the official MongoDB image documentation MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD are used to create a root user in admin database and not MONGO_INITDB_DATABASE. This would require to use admin as authentication database during autoconfiguration.

The StringBuilder in class MongoDockerComposeConnectionDetailsFactory is missing the authSource option.

[scottfrederick](#35567 (comment))

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 7, 2023
@scottfrederick scottfrederick added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 8, 2023
@scottfrederick scottfrederick added this to the 3.1.x milestone Jun 8, 2023
@scottfrederick scottfrederick self-assigned this Jun 8, 2023
@scottfrederick scottfrederick changed the title Autoconfiguration for spring-boot-docker-compose is missing the authSource option for the ConnectionString Docker Compose connection details for MongoDB is missing the authSource option when authentication is configured Jun 8, 2023
@scottfrederick scottfrederick modified the milestones: 3.1.x, 3.1.1 Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants