diff --git a/IPython/nbformat/sign.py b/IPython/nbformat/sign.py index ba16c9a..90e578b 100644 --- a/IPython/nbformat/sign.py +++ b/IPython/nbformat/sign.py @@ -263,10 +263,17 @@ class TrustNotebookApp(BaseIPythonApplication): description="""Sign one or more IPython notebooks with your key, to trust their dynamic (HTML, Javascript) output. + Trusting a notebook only applies to the current IPython profile. + To trust a notebook for use with a profile other than default, + add `--profile [profile name]`. + Otherwise, you will have to re-execute the notebook to see output. """ - examples = """ipython trust mynotebook.ipynb and_this_one.ipynb""" + examples = """ + ipython trust mynotebook.ipynb and_this_one.ipynb + ipython trust --profile myprofile mynotebook.ipynb + """ flags = trust_flags diff --git a/docs/source/notebook/security.rst b/docs/source/notebook/security.rst index b5d22cd..8a3130f 100644 --- a/docs/source/notebook/security.rst +++ b/docs/source/notebook/security.rst @@ -49,6 +49,12 @@ the IPython profile's security directory. By default, this is:: ~/.ipython/profile_default/security/notebook_secret +.. note:: + + The notebook secret being stored in the profile means that + loading a notebook in another profile results in it being untrusted, + unless you copy or symlink the notebook secret to share it across profiles. + When a notebook is opened by a user, the server computes a signature with the user's key, and compares it with the signature stored in the notebook's metadata. If the signature matches, HTML and Javascript