Skip to content

[Feat]: Add jupyter-style runtime generated token #5819

Closed as not planned
Closed as not planned

Description

@mlzxy

What is your suggestion?

  1. I propose to remove the --auth none option, which means all code-server instances will run with password/token protection
  2. Add jupyter-style runtime generated token as the default or additional authentication option, for example, the following log are printed from jupyter lab:
    0|jupyter  |     To access the server, open this file in a browser:
    0|jupyter  |         file:///path/to/a/local/file.html
    0|jupyter  |     Or copy and paste one of these URLs:
    0|jupyter  |         http://ip_address:8888/lab?token=4b0b5b4e9f0b113082e9410f71048994139195036bc224e2
    0|jupyter  |      or http://127.0.0.1:8888/lab?token=4b0b5b4e9f0b113082e9410f71048994139195036bc224e2 
    

Why do you want this feature?

Many people, including myself, enjoy the convenience of --auth none. But this create a serious potential security threat for the underlying system, considering code-server provides bash interface through web.

I personally experienced a hijack that turned one of my working GPU cluster machines into a crypto miner. The unattended code server turns out to be their starting point. It is difficult to diagnose since they won't even leave ssh login history, and I am surely not the only victim.

I agree that the --auth none enables a convenient option for people to try code-server quickly, but I would argue the same level of convenience could be achieved with the jupyter tokenized URL option, as in the example above.

Are there any workarounds to get this functionality today?

I would imagine a system administrator could preinstall code-server and wrap it in order to provide an auth-only interface to users.

Are you interested in submitting a PR for this?

Sadly I am not a web developer, but I would see what I can do if this feature request becomes well accepted.

Activity

  1. benz0li commented on Nov 29, 2022

    @benz0li
    Contributor
    1. I propose to remove the --auth none option, which means all code-server instances will run with password/token protection

    code-server is password protected by default. One has to explicitly set --auth none to remove it.

    I am running code server with --auth none in a JupyterLab image behind JupyterHub.

    I don't see why the --auth none option should be removed.

  2. shawnweeks commented on Dec 14, 2022

    @shawnweeks
    Contributor

    There also those of us using reverse proxies and other kinds of secure external authentication for code-server. Forcing a token would greatly limit deployment options.

  3. changed the title [-][Feat]: Remove `--auth none` option and add jupyter-style runtime generated token[/-] [+][Feat]: Add jupyter-style runtime generated token[/+] on Jul 12, 2024
  4. code-asher commented on Jul 13, 2024

    @code-asher
    Member

    Closing in favor of #3546

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSome improvement that isn't a feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions