fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject [1/2] incubator-fineract git commit: FINERACT-380 S3 permission issue -- add system property
Date Fri, 20 Jan 2017 08:17:19 GMT
Repository: incubator-fineract
Updated Branches:
  refs/heads/develop e397b807e -> 3c2128ffb


FINERACT-380 S3 permission issue -- add system property


Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/b4156ed1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/b4156ed1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/b4156ed1

Branch: refs/heads/develop
Commit: b4156ed1ef703b29777005fbec673ab7f1e9c5ad
Parents: 80fada2
Author: Nazeer Hussain Shaik <nazeer.shaik@confluxtechnologies.com>
Authored: Thu Jan 19 16:00:34 2017 +0530
Committer: Nazeer Hussain Shaik <nazeer.shaik@confluxtechnologies.com>
Committed: Thu Jan 19 16:00:34 2017 +0530

----------------------------------------------------------------------
 fineract-provider/dependencies.gradle                             | 2 +-
 fineract-provider/dev-dependencies.gradle                         | 2 +-
 .../documentmanagement/contentrepository/S3ContentRepository.java | 3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/b4156ed1/fineract-provider/dependencies.gradle
----------------------------------------------------------------------
diff --git a/fineract-provider/dependencies.gradle b/fineract-provider/dependencies.gradle
index 70660aa..f331016 100644
--- a/fineract-provider/dependencies.gradle
+++ b/fineract-provider/dependencies.gradle
@@ -81,7 +81,7 @@ dependencies {
                 [group: 'org.mnode.ical4j', name: 'ical4j', version: '1.0.4'],
                 [group: 'com.googlecode.flyway', name: 'flyway-core', version: '2.1.1'],
                 [group: 'org.quartz-scheduler', name: 'quartz', version: '2.1.7'],
-                [group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.2.1'],
+                [group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.80'],
                 [group: 'net.sf.ehcache', name: 'ehcache', version: '2.7.2'],
                 [group: 'com.github.spullara.mustache.java', name: 'compiler', version: '0.8.12'],
                 [group: 'com.jayway.jsonpath', name: 'json-path', version: '0.9.1'],

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/b4156ed1/fineract-provider/dev-dependencies.gradle
----------------------------------------------------------------------
diff --git a/fineract-provider/dev-dependencies.gradle b/fineract-provider/dev-dependencies.gradle
index 56fcb77..949b678 100644
--- a/fineract-provider/dev-dependencies.gradle
+++ b/fineract-provider/dev-dependencies.gradle
@@ -80,7 +80,7 @@ dependencies {
                 [group: 'org.mnode.ical4j', name: 'ical4j', version: '1.0.4'],
                 [group: 'com.googlecode.flyway', name: 'flyway-core', version: '2.1.1'],
                 [group: 'org.quartz-scheduler', name: 'quartz', version: '2.1.7'],
-                [group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.2.1'],
+                [group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.80'],
                 [group: 'net.sf.ehcache', name: 'ehcache', version: '2.7.2'],
                 [group: 'com.github.spullara.mustache.java', name: 'compiler', version: '0.8.12'],
                 [group: 'com.jayway.jsonpath', name: 'json-path', version: '0.9.1'],

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/b4156ed1/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/S3ContentRepository.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/S3ContentRepository.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/S3ContentRepository.java
index 28109fe..2ea700a 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/S3ContentRepository.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/S3ContentRepository.java
@@ -35,6 +35,7 @@ import org.slf4j.LoggerFactory;
 
 import com.amazonaws.AmazonClientException;
 import com.amazonaws.AmazonServiceException;
+import com.amazonaws.SDKGlobalConfiguration;
 import com.amazonaws.auth.BasicAWSCredentials;
 import com.amazonaws.services.s3.AmazonS3;
 import com.amazonaws.services.s3.AmazonS3Client;
@@ -55,6 +56,8 @@ public class S3ContentRepository implements ContentRepository {
 
     public S3ContentRepository(final String bucketName, final String secretKey, final String
accessKey) {
         this.s3BucketName = bucketName;
+        //On some AWS regions by default V4 signature is enabled. Setting this property.

+        System.setProperty(SDKGlobalConfiguration.ENABLE_S3_SIGV4_SYSTEM_PROPERTY, "true");
         this.s3Client = new AmazonS3Client(new BasicAWSCredentials(accessKey, secretKey));
     }
 


Mime
View raw message