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

Suggestions towards the hardcoded password #5843

Open
Gax-c opened this issue Apr 30, 2024 · 2 comments
Open

Suggestions towards the hardcoded password #5843

Gax-c opened this issue Apr 30, 2024 · 2 comments
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.

Comments

@Gax-c
Copy link

Gax-c commented Apr 30, 2024

System information

no

What is the project operation method?

Source Code

What happened?

Why you need it?

We've identified that the password is hardcoded in the source code here.

            var keyStorePath = keysRoot.resolve("halo.keystore");
            var password = "changeit".toCharArray();
            var keyStore = KeyStore.getInstance(KeyStore.getDefaultType());

You can see the hardcoded key "changeit".

How could it be?

We understand that halo is a tool for building websites, but as long as the template allows for hardcoded password, this will also exist in downstream projects. That is, the developers who use halo for website building may still hardcode their passwords in the source code although these passwords may be change to something else rather than "changeit".

Suggestion

So, I suggest that the password should be stored in a more secure way, and I'm sure this will make halo better!

Relevant log output

No response

Additional information

No response

@ruibaby
Copy link
Member

ruibaby commented May 6, 2024

ping @halo-dev/sig-halo

@JohnNiang
Copy link
Member

Thank you for reaching out here!

I'm going to add configuration properties to allow users to change the default password, but default value will be still changeit. If someone want to change the password, they can use the default password changeit to change the password for the keystore file, and then configure the new password into application.yaml, command line argument or environment variable.

/kind improvement
/area core

@ruibaby ruibaby added area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.
Projects
None yet
Development

No branches or pull requests

3 participants