2f3c3aa01f
encryptionSetup must be called before setRemoteCredPair. Otherwise,
the RemoteConfig doesn't have the cipher in it, and so no cipher is used to
encrypt the embedded creds.
This is a security fix for non-shared encryption methods!
For encryption=shared, there's no security problem, just an
inconsistentency in whether the embedded creds are encrypted.
This is very important to get right, so used some types to help ensure that
setRemoteCredPair is only run after encryptionSetup. Note that the external
special remote bypasses the type safety, since creds can be set after the
initial remote config, if the external special remote program requests it.
Also note that IA remotes never use encryption, so encryptionSetup is not
run for them at all, and again the type safety is bypassed.
This leaves two open questions:
1. What to do about S3 and glacier remotes that were set up
using encryption=pubkey/hybrid with embedcreds?
Such a git repo has a security hole embedded in it, and this needs to be
communicated to the user. Is the changelog enough?
2. enableremote won't work in such a repo, because git-annex will
try to decrypt the embedded creds, which are not encrypted, so fails.
This needs to be dealt with, especially for ecryption=shared repos,
which are not really broken, just inconsistently configured.
Noticing that problem for encryption=shared is what led to commit
fbdeeeed5f
, which tried to
fix the problem by not decrypting the embedded creds.
This commit was sponsored by Josh Taylor.
33 lines
1 KiB
Markdown
33 lines
1 KiB
Markdown
### Please describe the problem.
|
||
|
||
I´m trying to use an box.com acount as special remote repository for transfering data amoung my clients. Adding the box.com is possible. On the box.com website i see that git-annex has create an folder, but there is no syncing.
|
||
|
||
When i try to enable the box.com Repository on an another client i get an Internal Error Server: bad creds.
|
||
|
||
|
||
### What version of git-annex are you using? On what operating system?
|
||
|
||
Git-Annex Version: git-annex version 5.20140830-g3c96b79
|
||
|
||
Mac OS X 10.9.4
|
||
|
||
### Please provide any additional information below.
|
||
|
||
[[!format sh """
|
||
# If you can, paste a complete transcript of the problem occurring here.
|
||
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
|
||
|
||
03/Sep/2014:20:41:31 +0200 [Error#yesod-core] bad creds @(yesod-core-1.2.19:Yesod.Core.Class.Yesod ./Yesod/Core/Class/Yesod.hs:503:5)
|
||
|
||
[2014-09-03 20:41:47 CEST] main: Syncing with Box.com
|
||
|
||
bad creds
|
||
|
||
bad creds
|
||
|
||
bad creds
|
||
|
||
bad creds
|
||
|
||
# End of transcript or log.
|
||
"""]]
|