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

Notebook require_login=False requires password #13318

Closed
vbraun opened this issue Aug 1, 2012 · 13 comments
Closed

Notebook require_login=False requires password #13318

vbraun opened this issue Aug 1, 2012 · 13 comments

Comments

@vbraun
Copy link
Member

vbraun commented Aug 1, 2012

Starting with sage-5.2, the require_login=False option doesn't work any more: It requires you to set an admin password, on the console, before starting the notebook. This is very inconvenient for any kind of "one-click start notebook" packaging. It should not ask for any password, thats the whole point of not requiring login.


[vbraun@laptop ~]$ sage -notebook require_login=False
----------------------------------------------------------------------
| Sage Version 5.2, Release Date: 2012-07-25                         |
| Type "notebook()" for the browser-based notebook interface.        |
| Type "help()" for help.                                            |
----------------------------------------------------------------------

Please wait while the Sage Notebook server starts...
...
notebook(require_login=False)
The notebook files are stored in: sage_notebook.sagenb



Please choose a new password for the Sage Notebook 'admin' user.
Do _not_ choose a stupid password, since anybody who could guess your password
and connect to your machine could access or delete your files.
NOTE: Only the hash of the password you type is stored by Sage.
You can change your password by typing notebook(reset=True).

Obviously you need to erase $DOT_SAGE/sage_notebook.sagenb/users.pickle to reproduce this.

CC: @fchapoton

Component: notebook

Issue created by migration from https://trac.sagemath.org/ticket/13318

@vbraun
Copy link
Member Author

vbraun commented Aug 1, 2012

comment:1

I had the following code in the sage virtual appliance build script:

    from sage.misc.misc import DOT_SAGE
    directory = DOT_SAGE+'sage_notebook'
    nb = sagenb.notebook.notebook.load_notebook(directory)
    nb.add_user('admin', 'sage', '', force=True)
    nb.save()
    quit

This doesn't work any more since add_user was removed in sage-5.2.

@vbraun
Copy link
Member Author

vbraun commented Aug 1, 2012

comment:2
    nb.user_manager().add_user('admin', 'sage', '', force=True)

seems to do the trick now.

@vbraun
Copy link
Member Author

vbraun commented Aug 1, 2012

comment:3

Ok now the VM doesn't ask for the admin password upon startup, but it still requires a login. With the new sagenb is there any way to directly start to the admin notebook list, skipping the login screen?

@vbraun
Copy link
Member Author

vbraun commented Aug 3, 2012

comment:4

I think this warrants a blocker, since its a big usability issue for novices.

@jasongrout
Copy link
Member

comment:5

I just tried sage -notebook require_login=False on a stock 5.2 and it seems to work just fine (pops up the user's worksheet listing, with no login or anything.

I also tried moving my .sage folder to start everything fresh. I copied your lines above to make an account, then started up with sage -notebook require_login=False and things worked perfectly---the worksheet listing page popped up with no intervention.

@vbraun
Copy link
Member Author

vbraun commented Aug 25, 2012

comment:6

Some more information: When you just run sage -notebook you are logged in with a token as password since Sage spawns the browser. So you actually do log in, its just automatically behind the scenes. This is not an option for the virtual machine, you can't start a host browser from within the VM. The following does not work:

sage -notebook interface=\'\' port=8002 open_viewer=False require_login=False

When you manually open http://localhost:8002 you are greeted with a login screen.

@jdemeyer
Copy link

comment:7

Any ideas for this ticket? I'm not opposed to having this truly a sage-5.3 blocker, but only if somebody has ideas on how to fix it.

@vbraun
Copy link
Member Author

vbraun commented Sep 10, 2012

comment:9

Still doesn't work in Sage-5.3

Sage-5.4.beta0 removes the require_login keyword without offering a replacement. The new automatic_login option only starts a web browser with a special URL so its useless inside the VM.

@jasongrout
Copy link
Member

comment:10

Yes, it does seem that I missed a use-case in combining the open_viewer and require_login keywords. I think it does make sense to put back the require_login keyword.

@ppurka
Copy link
Member

ppurka commented Feb 21, 2013

comment:11

Any update on this?

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin removed this from the sage-6.3 milestone Aug 10, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin added this to the sage-6.4 milestone Aug 10, 2014
@kcrisman
Copy link
Member

comment:16

Any update on this?

+1

Volker, what is the current workaround on the VM for this?

@vbraun
Copy link
Member Author

vbraun commented Sep 21, 2014

comment:17

There is no workaround. The browser inside the VM is started with a magic url that avoids the password. If you connect with the host browser, you need to login (username: admin, pass: sage)

@mkoeppe
Copy link
Member

mkoeppe commented Aug 18, 2020

comment:18

Proposing to close all sagenb tickets as outdated, so that all remaining open tickets in the notebook component are about the Jupyter notebook.

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants