<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 16, 2014 at 4:14 PM, Ondřej Čertík <span dir="ltr"><<a href="mailto:ondrej.certik@gmail.com" target="_blank">ondrej.certik@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What is the point of the signature in the first place? Is it just to<br>
verify that the .ipynb file is consistent, i.e. no accidental changes?<br>
I just use git for that.<br></blockquote><div><br></div><div>The question we want to answer is "Has the user explicitly trusted this notebook?" We don't want to execute untrusted code in html/js outputs when the notebook is opened. There are two mechanisms to trust a notebook:</div><div><br></div><div>1. manually mark that the notebook is trusted</div><div>2. execute the entire notebook yourself</div><div><br></div><div>The question is all in how IPython stores and checks whether that notebook is trusted. Currently, IPython hashes the contents of the notebook plus a secret stored in the user's IPython profile, and stores this value in the notebook metadata. We don't care about the signature per se, we just want to know whether the notebook is identical to one that the user trusted before. Putting it in the metadata was the easiest way to ensure that the signature followed the notebook around for the user, but it doesn't really make sense for the signature to follow the notebook into VCS, or onto other users' machines. One alternative under discussion here is to just hash trusted notebooks (no secret key) and store the hashes in a user-only-readable location.</div><div><br></div><div>-MinRK</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Ondrej<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Dec 16, 2014 at 12:21 AM, MinRK <<a href="mailto:benjaminrk@gmail.com">benjaminrk@gmail.com</a>> wrote:<br>
> I've implemented a version of the db option in #7244. Each approach has<br>
> advantages and disadvantages, but I don't relish having to chase notebook<br>
> files around with more things associated by filename. We do already do that<br>
> with checkpoints, though, so this could easily be done in the same way.<br>
><br>
> I do think we should do this for 3.0, if we decide we want to do it at all,<br>
> since we are doing an nbformat revision already.<br>
><br>
> -MinRK<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> IPython-dev mailing list<br>
> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
><br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</div></div></blockquote></div></div></div>