Skip to content

Support for webAdminPassword property of H2 Console #21533

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

Conversation

RadekKoubsky
Copy link
Contributor

Hi,
I was trying to log in to the "Preferences" or "Tools" page in H2 console, but this operation requires H2 console password that cannot be set from Spring Boot, thus I am not able to log in to the H2 Console, providing an empty password string does not work.

Please read the whole scenario with solution bellow:

I have running Spring Boot application with embedded H2 database and H2 console.

When I want to go to the "Preferences" or "Tools" page in H2 console, I am asked for a password which is the webAdminPassword property of H2 console settings.

The problem is that application.properties does not support the webAdminPassword property, thus I am not able to log in to the "Preferences" or "Tools" page, providing an empty password string does not work.

I have added this property to the H2ConsoleAutoConfiguration class, the property can be configured in application.properties like this:

spring.h2.console.settings.web-admin-password=abcd

I have tested this implementation with my modified Spring Boot 2.2.6.RELEASE build and H2 h2-1.4.200. I was able to log in to the "Preferences" or "Tools" page with provided password in application.properties

This is a similar H2 configuration change to #5417

@pivotal-issuemaster
Copy link

@RadekKoubsky Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 21, 2020
@pivotal-issuemaster
Copy link

@RadekKoubsky Thank you for signing the Contributor License Agreement!

@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels May 27, 2020
@philwebb philwebb added this to the 2.3.x milestone May 27, 2020
@snicoll snicoll added the for: team-attention An issue we'd like other members of the team to review label Jun 5, 2020
@philwebb philwebb modified the milestones: 2.3.x, 2.4.x Jun 5, 2020
@philwebb philwebb removed the for: team-attention An issue we'd like other members of the team to review label Jun 5, 2020
@snicoll snicoll self-assigned this Jun 15, 2020
@snicoll snicoll modified the milestones: 2.4.x, 2.4.0-M1 Jun 15, 2020
@snicoll snicoll closed this in ac0f175 Jun 15, 2020
@snicoll
Copy link
Member

snicoll commented Jun 15, 2020

@RadekKoubsky thank you for making your first contribution to Spring Boot.

@RadekKoubsky
Copy link
Contributor Author

Thank you for accepting my pull request. I am always happy to contribute to the community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants