-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Run notebook without requesting for stupid token #2254
Comments
Set up a password: http://jupyter-notebook.readthedocs.io/en/latest/public_server.html
It's not stupid, it's to prevent random website you visit from executing code on your machine. |
Oh, and :
So that's already in the middle of the explanations. |
What if you cannot get the token, say, if it running as a service? |
Depending on how it's set up, you may be able to get the token by running |
I'm running jupyter using ssh tunneling. I feel too that the token request by default is stupid. When I run browserless jupyter on the server as background and connect from a remote, it's impossible to see the token from the remote. |
Sorry, we know it's a pain, but the potential security issues that were highlighted were bad enough that we couldn't leave authentication off by default. We have tried to:
|
Neither "jupyter notebook password" nor "from notebook.auth import passwd" nor copying the token from "jupyter notebook list" work for me. This is very stupid. |
(with docker for tensor flow) |
Calling stuff 'stupid' does not make us more keen to help you work these problems out. |
@takluyver Thanks, setting a password satisfied my need. |
One thing that could be helpful (if one of you want to contribute), is to help having a UI element to set a password. We have most of the tools in |
If you do not care about the security of the server, you can first create a jupyer config file with: |
I had the same issue. The three minor actions that worked for me:
From these actions, I think checking the caching by the browser was the most crucial. Good luck |
To get rid of the password or token programmatically, you can also provide a
This is bad practice, as aptly reminded above by the owners, but can be useful in specific cases. |
You can also do The next version of the notebook should allow you to setup a password directly on the login page. So at first launch it will ask you for your token and optionally a new password. Then you're set. |
That's interesting -- does anybody know if there is a thread about what the security issues are? 90% of the time I run jupyter as a persistent REPL / scratch pad that is not accessible outside of the one machine. Most security issues I can think of involve some kind of network access. I guess there is still potentially a privilege escalation on the current machine (a process running as a low-privilege user is able to curl to localhost:8888 and execute arbitrary code as your user). However, that seems a bit attenuated? (I am fine with the current state of things, just curious to understand the security side of things here.) |
You can see one of our blog post You are spot on on the actual security issues, and while there is no definite public case of that kind of things having happen, we've heard of cases where security features were disabled because of other security layers were deemed enough. It may even be possible to get access to a localhost-only listening notebook by visiting websites and using localhost DNS rebinding attacks. I'm not going to pretend I understand that, but better safe than sorry. |
There's the issue about one user running code as another, as you pointed out. But the notebook is also accessible from the browser, which runs code from many untrusted websites. The browser should stop |
i gave up using linux windows subsystem because of this token issue. cant even use spyder-notebook or pycharm-notebook. not sure why yet to type yes after pressing Ctrl+c shutting down kernel, just close it without additional confirmation as the case is with windows |
only that setting password just not works. This is bizzare. I just wanted to demonstrate how nice and convenient jupyter is... and well it is stupid... another potential users scared away. Good work! |
Could you be more specific? It's hard to debug 'just not works'. |
I understand your frustration when things don't work as expected, but please pay attention to your language. We spend lots of time and work to make things as easy as possible while still secure, and it personally hurt when I spent a week implementing the new screen to simplify setting password without having to reach for the command line. We unfortunately don't have access to infinite resources, and sometime we miss edge cases. We would be happy to work with you to figure out why it did not work for you, and how to make sure it does not affect other people. I would suggest and read about DNS rebinding: https://bugs.chromium.org/p/project-zero/issues/detail?id=1447 Without token or password, you would be vulnerable to local code execution on your machine by just visiting a website. If you want even more convenience, I would suggest also trying https://nteract.io/, which is a native electron app that can open and run Jupyter notebooks. It is making some good progress these days and seem to be better suited to some people. |
We have started using the @Carreau, @takluyver, thank you for all the hard work! |
Thanks !
Oh, I had missed that one. Good point. |
Yes this is the a fckn ridiculous setup when starting to use any application. I'm in a class full of people with the exact same problem, everyone frustrated, need to do better and stop making excuses. |
I've locked this conversation now, because it's generating angry responses, not useful input. We understand that the security token makes using the notebook less convenient in some situations. As described above, we've done a variety of things to try to mitigate this. We're happy to have constructive discussions about what more we might be able to do. But we're not here to be yelled at when you don't like something. The DNS rebinding attack is not easy to understand, but it is real, and in the context of Jupyter it could mean that a random website you visit while Jupyter is running could take over your computer. We're obviously not about to take chances with that, so the token mechanism is staying unless someone can find a way to make it clearly unnecessary. |
jupyter notebook --help
does not show me such option and I dont want to copy paste tokens between devices on my local network.How can I disable token requirement?
The text was updated successfully, but these errors were encountered: