##// END OF EJS Templates
Merge pull request #3373 from minrk/cookiesecret...
Matthias Bussonnier -
r10864:f57d5c77 merge
parent child Browse files
Show More
@@ -83,7 +83,7 from IPython.utils.importstring import import_item
83 83 from IPython.utils.localinterfaces import LOCALHOST
84 84 from IPython.utils import submodule
85 85 from IPython.utils.traitlets import (
86 Dict, Unicode, Integer, List, Bool,
86 Dict, Unicode, Integer, List, Bool, Bytes,
87 87 DottedObjectName
88 88 )
89 89 from IPython.utils import py3compat
@@ -164,7 +164,7 class NotebookWebApplication(web.Application):
164 164 static_url_prefix = url_path_join(base_project_url,'/static/'),
165 165
166 166 # authentication
167 cookie_secret=os.urandom(1024),
167 cookie_secret=ipython_app.cookie_secret,
168 168 login_url=url_path_join(base_project_url,'/login'),
169 169 read_only=ipython_app.read_only,
170 170 password=ipython_app.password,
@@ -338,6 +338,18 class NotebookApp(BaseIPythonApplication):
338 338 keyfile = Unicode(u'', config=True,
339 339 help="""The full path to a private key file for usage with SSL/TLS."""
340 340 )
341
342 cookie_secret = Bytes(b'', config=True,
343 help="""The random bytes used to secure cookies.
344 By default this is a new random number every time you start the Notebook.
345 Set it to a value in a config file to enable logins to persist across server sessions.
346
347 Note: Cookie secrets should be kept private, do not share config files with
348 cookie_secret stored in plaintext (you can read the value from a file).
349 """
350 )
351 def _cookie_secret_default(self):
352 return os.urandom(1024)
341 353
342 354 password = Unicode(u'', config=True,
343 355 help="""Hashed password to use for web authentication.
General Comments 0
You need to be logged in to leave comments. Login now