Opened 10 years ago

Closed 2 years ago

#13318 closed defect (invalid)

Notebook require_login=False requires password

Reported by: Volker Braun Owned by: jason, mpatel, was
Priority: critical Milestone: sage-duplicate/invalid/wontfix
Component: notebook Keywords:
Cc: Frédéric Chapoton Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

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.

Change History (19)

comment:1 Changed 10 years ago by Volker Braun

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.

comment:2 Changed 10 years ago by Volker Braun

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

seems to do the trick now.

comment:3 Changed 10 years ago by Volker Braun

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?

comment:4 Changed 10 years ago by Volker Braun

Priority: majorblocker

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

comment:5 Changed 10 years ago by Jason Grout

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.

comment:6 Changed 10 years ago by Volker Braun

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.

comment:7 Changed 10 years ago by Jeroen Demeyer

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.

comment:8 Changed 10 years ago by Jeroen Demeyer

Milestone: sage-5.3sage-5.4
Priority: blockercritical

comment:9 Changed 10 years ago by Volker Braun

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.

comment:10 Changed 10 years ago by Jason Grout

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.

comment:11 Changed 10 years ago by Punarbasu Purkayastha

Any update on this?

comment:12 Changed 9 years ago by Jeroen Demeyer

Milestone: sage-5.11sage-5.12

comment:13 Changed 9 years ago by For batch modifications

Milestone: sage-6.1sage-6.2

comment:14 Changed 9 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:15 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4

comment:16 in reply to:  11 Changed 8 years ago by Karl-Dieter Crisman

Any update on this?

+1

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

comment:17 Changed 8 years ago by Volker Braun

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)

comment:18 Changed 2 years ago by Matthias Köppe

Cc: Frédéric Chapoton added
Milestone: sage-6.4sage-duplicate/invalid/wontfix
Status: newneeds_review

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

comment:19 Changed 2 years ago by Frédéric Chapoton

Resolution: invalid
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.