]> source.dussan.org Git - jgit.git/commit
Support Amazon S3 based storage for LFS 25/64625/11
authorMatthias Sohn <matthias.sohn@sap.com>
Wed, 3 Feb 2016 10:34:51 +0000 (11:34 +0100)
committerSasa Zivkov <zivkov@gmail.com>
Wed, 17 Feb 2016 16:36:58 +0000 (11:36 -0500)
commitf496177a378705600c65bb297527952a420b25fe
tree423ec6342dc7eee27c4ad86bb800bd5e81ebd664
parentff5c756c79d1c10575b927cf3bb2eb1e1fcc391b
Support Amazon S3 based storage for LFS

Add a storage implementation storing large objects in Amazon S3.
The AmazonS3Repository pre-signs download and upload requests.

AWS access and secret key are expected to be in the
$HOME/.aws/credentials file in the following format:

[default]
  accessKey = ...
  secretKey = ...

Use AWS version 4 request signing [1] because it is more secure and
supported by all regions. The version 3 signing is not supported in
newer regions.

In follow up changes we should:

- implement getVerifyAction() and do actual verification. Subclasses of
S3Repository can implement caching for object meta data (size) in order
to avoid extra roundtrips to S3. Verification should ensure that meta
data store and content of S3 storage are in sync

- HEAD request used in S3Repository.getSize() seems to always return
Content-length 0 in contrast to the documentation [2]. So getSize() does
detect if the object exists in S3 or not but in case the object exists
it always returns size 0

[1] http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
[2] https://forums.aws.amazon.com/thread.jspa?threadID=223616

Change-Id: Ic47f094928a259e5264c92b3aacf6d90210907a8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
org.eclipse.jgit.lfs.server/pom.xml
org.eclipse.jgit.lfs.server/resources/org/eclipse/jgit/lfs/server/internal/LfsServerText.properties
org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsServerText.java
org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java [new file with mode: 0644]
org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java [new file with mode: 0644]
org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/SignerV4.java [new file with mode: 0644]
org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java