Merge branch 'master' of ssh://git-annex.branchable.com
This commit is contained in:
commit
bcf5bf44e8
4 changed files with 80 additions and 0 deletions
|
@ -0,0 +1,24 @@
|
|||
[[!comment format=mdwn
|
||||
username="andrew"
|
||||
avatar="http://cdn.libravatar.org/avatar/acc0ece1eedf07dd9631e7d7d343c435"
|
||||
subject="comment 1"
|
||||
date="2019-01-16T23:44:02Z"
|
||||
content="""
|
||||
I think you could probably achieve what you need to (depending on your specific needs).
|
||||
|
||||
There some general notes on encryption at: <http://git-annex.branchable.com/encryption/> and <http://git-annex.branchable.com/design/encryption/> and some insights into `git-annex` internals with respect to encryption here <https://git-annex.branchable.com/tips/Decrypting_files_in_special_remotes_without_git-annex/>.
|
||||
|
||||
I think you could setup s3 as a special remote with something like:
|
||||
|
||||
git annex initremote sensitive-s3 type=S3 chunk=1MiB encryption=hybrid embedcreds=no keyid=DEV1_KEYID
|
||||
|
||||
`DEV1_KEYID` is a name that the user's GPG keyring can recognize (sounds like you already have those). `hybrid` encryption means (I think?) that DEV1_KEYID GPG public key is used to encrypt a symmetric cipher that is stored in the repo. All the content on `sensitive-s3` will be encrypted using the symmetric cipher. By default DEV1_KEYID will also be used to encrypt `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` which are stored encrypted in the repo, `embedcreds=no` means don't store that info in the repo.
|
||||
|
||||
If you want to grant another developer access to `sensitive-s3`, then run something like:
|
||||
|
||||
git annex enableremote sensitive-s3 keyid+=DEV2_KEYID
|
||||
|
||||
I can't find any documentation of what happens next, but I assume `git-annex` re-encrypts the symmetric cipher using multi-key encryption so both DEV1_KEYID and DEV2_KEYID can decrypt the symmetric cipher using either of their private keys. Because `git-annex` doesn't actually encrypt your files using gpg keys when using `hybrid` encryption, you don't need to re-upload or re-encrypt any files. `git-annex` is only using the GPG keys to grant access to a small encrypted file containing a symmetric cipher that is used for the actual encryption of files.
|
||||
|
||||
The one main drawback with this design is that is difficult to revoke access. If you want, at a later date, to revoke DEV2's access to sensitive-s3, you can't do that using any built-in `git-annex` feature. You could give each dev their own AWS creds up-front, then at the very least you could revoke those on AWS. If you need to, you could also delete the old cipher regenerate a new one and re-upload all files with a new cipher that only remaining developers have access to.
|
||||
"""]]
|
|
@ -0,0 +1,20 @@
|
|||
[[!comment format=mdwn
|
||||
username="andrew"
|
||||
avatar="http://cdn.libravatar.org/avatar/acc0ece1eedf07dd9631e7d7d343c435"
|
||||
subject="comment 2"
|
||||
date="2019-01-16T23:51:21Z"
|
||||
content="""
|
||||
Another workflow is to use `encryption=pubkey`. Again init the repo on s3. And add the keys of all your devs.
|
||||
|
||||
git annex initremote sensitive-s3 type=S3 chunk=1MiB encryption=pubkey embedcreds=no keyid=DEV1_KEYID
|
||||
git annex enableremote sensitive-s3 keyid+=DEV2_KEYID
|
||||
git annex enableremote sensitive-s3 keyid+=DEV3_KEYID
|
||||
|
||||
Then files on sensitive-s3 will be encrypted using (I think) multi-key encryption that any of the devs can decrypt using their private key.
|
||||
|
||||
If you want to remove a dev later then you would have to, tell git-annex to remove their key, drop all files from sensitive-s3 (since they are readable by the revoked dev), then re-upload all files.
|
||||
|
||||
git annex enableremote sensitive-s3 keyid-=DEV2_KEYID
|
||||
git annex drop --from=sensitive-s3
|
||||
git annex copy --to=senitive-s3 /tmp/all-the-sensitive-files
|
||||
"""]]
|
|
@ -0,0 +1,9 @@
|
|||
[[!comment format=mdwn
|
||||
username="pthomasdelaney@9b04608ad7e837fde64ab60a285a7b7254b5bb26"
|
||||
nickname="pthomasdelaney"
|
||||
avatar="http://cdn.libravatar.org/avatar/2212a0d6c1fd93bc531c1fb461777a68"
|
||||
subject="comment 3"
|
||||
date="2019-01-18T03:31:35Z"
|
||||
content="""
|
||||
thanks for pointing me to these resources Andrew, these really help. I think that the pubkey method should work for us, especially since we have the capabilities to revoke access.
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue