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

Hash password with bcrypt and store in config.yaml #3432

Closed
3 tasks
jsjoeio opened this issue May 20, 2021 · 4 comments
Closed
3 tasks

Hash password with bcrypt and store in config.yaml #3432

jsjoeio opened this issue May 20, 2021 · 4 comments
Assignees
Labels
feature New user visible feature security Security related
Milestone

Comments

@jsjoeio
Copy link
Contributor

jsjoeio commented May 20, 2021

Problem

As a user, I would like to be able to hash my password using the same bcrypt algorithm used by code-server.

However, the bcrypt and bcrypt.js algorithms are different so you can't in the same way you can with sha256.

Solution

Add a CLI option to set password (which we hash for User using bcrypt)

code-server --config password=<password> -> hashes and stores in config.yaml

(open to other ideas for this though^)

Todos

  • update docs
  • add backwards-compatiblity for those still hashing with sha256
  • let user provide password via stdin to avoid having the plaintext password in their shell history
@jsjoeio jsjoeio added security Security related feature New user visible feature labels May 20, 2021
@jsjoeio jsjoeio added this to the On Deck milestone May 20, 2021
@jsjoeio jsjoeio self-assigned this May 20, 2021
@rabidpug
Copy link

would be good if the user could provide password via stdin to avoid having the plaintext password in their shell history.

@jsjoeio
Copy link
Contributor Author

jsjoeio commented May 21, 2021

Didn't even think to consider that - great point @rabidpug 👍

@quentincaffeino
Copy link

would be good if the user could provide password via stdin to avoid having the plaintext password in their shell history.

Put a space before your command, this way it won't be stored in history.

@code-asher
Copy link
Member

code-asher commented Jul 13, 2024

Merging with #3546

@code-asher code-asher closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New user visible feature security Security related
Projects
None yet
Development

No branches or pull requests

4 participants