Skip to content

Provide a default DataSource username if none has been provided #23747

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

Closed
snicoll opened this issue Oct 19, 2020 · 1 comment
Closed

Provide a default DataSource username if none has been provided #23747

snicoll opened this issue Oct 19, 2020 · 1 comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@snicoll
Copy link
Member

snicoll commented Oct 19, 2020

Fixing #23538 detects actual embedded use cases. The side effect is that we don't set a username anymore with, for instance, file-based H2 persistence, See #23721 (comment)

This leads to a regression as H2 will create the database with whatever credentials were provided initially. With a default setup Spring Boot will configure a sa user with no password. By upgrading, it would have no user and no password. We should revisit this to make this a bit more consistent while allowing users to specify an empty username if they want to.

@snicoll snicoll added the type: enhancement A general enhancement label Oct 19, 2020
@snicoll snicoll added this to the 2.4.0-RC1 milestone Oct 19, 2020
@snicoll snicoll added the for: team-attention An issue we'd like other members of the team to review label Oct 19, 2020
@snicoll snicoll changed the title Provide a default username if none has been provided Provide a default DataSource username if none has been provided Oct 19, 2020
@snicoll snicoll self-assigned this Oct 19, 2020
@snicoll
Copy link
Member Author

snicoll commented Oct 20, 2020

We've discussed and decided to keep things as they are. It is a breaking change but the previous behaviour of setting a sa username for a non embedded database was wrong.

I've added a noteworthy note in the related issue #23693 (comment).

@snicoll snicoll closed this as completed Oct 20, 2020
@snicoll snicoll removed this from the 2.4.0-RC1 milestone Oct 20, 2020
@snicoll snicoll removed their assignment Oct 20, 2020
@snicoll snicoll added status: declined A suggestion or change that we don't feel we should currently apply and removed for: team-attention An issue we'd like other members of the team to review type: enhancement A general enhancement labels Oct 20, 2020
humaolin pushed a commit to humaolin/spring-boot that referenced this issue May 7, 2022
humaolin pushed a commit to humaolin/spring-boot that referenced this issue May 7, 2022
humaolin pushed a commit to humaolin/spring-boot that referenced this issue May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

1 participant