FINERACT-380 S3 permission issue -- add system property
This commit is contained in:
@@ -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'],
|
||||
|
||||
@@ -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'],
|
||||
|
||||
+3
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user