mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2747] [Feature Request] Allow storing passwords hashed in config files #2194
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#2194
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nonnorm on GitHub (Jan 10, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2747
Describe the feature request
Currently, the passwords for the admin dashboard and basic authentication are stored in plaintext in the config files. This means that anyone with access to them could get the password. If they were hashed, then even if someone had the password, they wouldn't be able to log in.
Describe alternatives you've considered
Keeping passwords plaintext but only allowing root user to access them, though this could easily be undone.
Affected area
@fatedier commented on GitHub (Jan 10, 2022):
I have a few questions:
@nonnorm commented on GitHub (Jan 10, 2022):
$2y$or$2a$). It could, however, use SHA512 or a similar algorithm, though it would require a different setting to show that it's a hash.$2y$or$2a$, it treats it as a hash. This would, however, break any passwords that happen to begin with those. It would probably be better to have a dedicatedhashsetting to tell if it's a hash or not.@fatedier commented on GitHub (Jan 10, 2022):
Can users easily compute the hashed value using bcrypt? Are there any command line tools or other web tools?
I think it's tricky to use
$2y$prefix to detect the algorithm. Can we add new configure likepassword_hash_algorithmdefault to none andbcryptorsha512or others is optional.@nonnorm commented on GitHub (Jan 10, 2022):
To compute it you can use the
htpasswordcommand fromapache-utils, though it's not installed on most systems by default:I'll add a setting to the config file to tell if it's a hash or not.
@github-actions[bot] commented on GitHub (Apr 15, 2022):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
@nonnorm commented on GitHub (Apr 15, 2022):
bump
@fatedier commented on GitHub (Jun 30, 2023):
When we switch our configuration file to yaml or json, we can use more structured configuration to describe this functionality.
Example: