Skip to content

Document cookie, PASSWORD and HASHED_PASSWORD environment variables #4691

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
jsjoeio opened this issue Jan 5, 2022 · 5 comments
Closed

Document cookie, PASSWORD and HASHED_PASSWORD environment variables #4691

jsjoeio opened this issue Jan 5, 2022 · 5 comments
Assignees
Labels
docs Documentation related

Comments

@jsjoeio
Copy link
Contributor

jsjoeio commented Jan 5, 2022

Steps to Reproduce

  1. echo -n "thisismypassword" | npx argon2-cli -e
  2. HASHED_PASSWORD="<hash>" code-server
  3. Try logging in

Expected

It should work

Actual

Incorrect password

Reported here #4684

@jsjoeio jsjoeio added the bug Something isn't working label Jan 5, 2022
@jsjoeio jsjoeio added this to the 4.1.0 - improve iPad UX milestone Jan 5, 2022
@ykazakov
Copy link

ykazakov commented Jan 9, 2022

Same problem here with the only difference that we use the key cookie to (automatically) authenticate the users as mentioned here.

B.t.w., I searched the docs and neither the environment variables PASSWORD or HASHED_PASSWORD, nor the authentication cookie key are mentioned anywhere. The environmental variables are mentioned in code-server --help but not the cookie. Should these things be documented or are they subject to changes?

@ykazakov
Copy link

ykazakov commented Jan 9, 2022

Oh, looks like the authentication cookie was renamed (again) in #4548 to code-server-session.
Setting the hashed password using the new cookie works as before. Tested for 4.0.0 and 4.0.1. I still wish this method had been documented.

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 10, 2022

Should these things be documented or are they subject to changes?

I checked as well and don't see them. Very strange. I thought we had docs on this but I guess not. Thanks for raising this!

Oh, looks like the authentication cookie was renamed (again) in #4548 to code-server-session.
Setting the hashed password using the new cookie works as before. Tested for 4.0.0 and 4.0.1. I still wish this method had been documented.

Ah, I forgot that happened. Yes, you shouldn't have to go digging to find this. Thank you for testing! Where would you expect to find this information in the docs?

@jsjoeio jsjoeio self-assigned this Jan 10, 2022
@jsjoeio jsjoeio added docs Documentation related and removed bug Something isn't working labels Jan 10, 2022
@jsjoeio jsjoeio changed the title HASHED_PASSWORD doesn't work Document cookie, PASSWORD and HASHED_PASSWORD environment variables Jan 10, 2022
@stale
Copy link

stale bot commented Jul 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Jul 9, 2022
@stale stale bot closed this as completed Jul 14, 2022
@gerardo-junior
Copy link

@jsjoeio jsjoeio reopened this Nov 7, 2022
@code-asher code-asher removed the stale label Jul 11, 2024
@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
docs Documentation related
Projects
None yet
Development

No branches or pull requests

4 participants