git-annex/Remote
Joey Hess b657242f5d
enforce retrievalSecurityPolicy
Leveraged the existing verification code by making it also check the
retrievalSecurityPolicy.

Also, prevented getViaTmp from running the download action at all when the
retrievalSecurityPolicy is going to prevent verifying and so storing it.

Added annex.security.allow-unverified-downloads. A per-remote version
would be nice to have too, but would need more plumbing, so KISS.
(Bill the Cat reference not too over the top I hope. The point is to
make this something the user reads the documentation for before using.)

A few calls to verifyKeyContent and getViaTmp, that don't
involve downloads from remotes, have RetrievalAllKeysSecure hard-coded.
It was also hard-coded for P2P.Annex and Command.RecvKey,
to match the values of the corresponding remotes.

A few things use retrieveKeyFile/retrieveKeyFileCheap without going
through getViaTmp.
* Command.Fsck when downloading content from a remote to verify it.
  That content does not get into the annex, so this is ok.
* Command.AddUrl when using a remote to download an url; this is new
  content being added, so this is ok.

This commit was sponsored by Fernando Jimenez on Patreon.
2018-06-21 13:37:01 -04:00
..
Directory remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
External add GETINFO to external protocol (for ronnypfa) 2018-06-08 11:56:24 -04:00
Helper add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
Rsync Support exporttree=yes for rsync special remotes. 2018-02-28 13:36:20 -04:00
WebDAV webdav: Avoid unncessisarily creating the collection at the top of the repo 2017-10-11 11:10:33 -04:00
Adb.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
BitTorrent.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
Bup.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
Ddar.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
Directory.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
External.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
GCrypt.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
Git.hs enforce retrievalSecurityPolicy 2018-06-21 13:37:01 -04:00
Glacier.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
Hook.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
List.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
P2P.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
Rsync.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
S3.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
Tahoe.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
Web.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00
WebDAV.hs add retrievalSecurityPolicy 2018-06-21 11:36:36 -04:00