Skip to content

Document cookie, PASSWORD and HASHED_PASSWORD environment variables #4691

Closed as not planned

Description

@jsjoeio

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

Activity

  1. ykazakov commented on Jan 9, 2022

    @ykazakov

    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?

  2. ykazakov commented on Jan 9, 2022

    @ykazakov

    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.

  3. jsjoeio commented on Jan 10, 2022

    @jsjoeio
    ContributorAuthor

    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?

  4. self-assigned this
    on Jan 10, 2022
  5. added
    docsDocumentation related
    and removed
    bugSomething isn't working
    on Jan 10, 2022
  6. changed the title [-]HASHED_PASSWORD doesn't work[/-] [+]Document cookie, PASSWORD and HASHED_PASSWORD environment variables[/+] on Jan 10, 2022
  7. stale commented on Jul 9, 2022

    @stale

    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.

  8. gerardo-junior commented on Nov 5, 2022

    @gerardo-junior
  9. reopened this on Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docsDocumentation related

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions