Skip to content

Commit 6bd37ef

Browse files
committed
[CST-27589] Introduced support for S3ObjectStore
1 parent cb9793d commit 6bd37ef

3 files changed

Lines changed: 695 additions & 0 deletions

File tree

config/modules/replicate.cfg

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ plugin.single.org.dspace.ctask.replicate.ObjectStore = \
1717
#org.dspace.ctask.replicate.store.DuraCloudObjectStore - Replicate content to DuraCloud (requires 'duracloud.cfg' file to be setup)
1818
#org.dspace.ctask.replicate.store.LocalObjectStore - Replicate content to another location (folder) on local file system
1919
#org.dspace.ctask.replicate.store.MountableObjectStore - Replicate content to a mounted external file system (e.g. NFS mount)
20+
#org.dspace.ctask.replicate.store.S3ObjectStore - Replicate content to an S3 bucket
2021

2122
### AIP Object Storage Settings ###
2223

@@ -117,3 +118,25 @@ replicate.consumer.queue = replication
117118
# Template for Checkm manifest
118119
replicate.checkm.template = id|md5|csm|length
119120

121+
### S3 Replicate configuration ###
122+
# Used only when org.dspace.ctask.replicate.store.S3ObjectStore is configured
123+
### Replicate authentication
124+
# AWS S3 AssumeRole ARN for cross-account access
125+
replicate.s3.assume-role-arn =
126+
127+
# AWS S3 AssumeRole External ID for enhanced security (highly recommended)
128+
# This helps prevent "confused deputy" attacks in cross-account scenarios
129+
replicate.s3.assume-role-external-id =
130+
131+
# When using AWS IAM role please only configure the AWS region
132+
# AWS S3 Region name
133+
replicate.s3.region-name =
134+
135+
# AWS S3 Bucket name
136+
replicate.s3.bucket-name =
137+
138+
## Legacy support
139+
## Avoid using the following configuration
140+
## This has been introduced to provide support to legacy bucket
141+
#replicate.s3.access-key =
142+
#replicate.s3.secret-key =

pom.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
<bagit-support.version>1.1.0</bagit-support.version>
2424
<jaxb-api.version>4.0.5</jaxb-api.version>
2525
<jaxb-runtime.version>4.0.9</jaxb-runtime.version>
26+
<!-- AWS SDK v2 version: MUST match the version used by dspace-api ${dspace.version}
27+
(dspace-api declares software.amazon.awssdk:s3), otherwise the
28+
maven-enforcer-plugin DependencyConvergence rule will fail. -->
29+
<aws.sdk.version>2.43.2</aws.sdk.version>
2630
<!-- Replication Task Suite requires Java 17 because DSpace 9 requires it -->
2731
<java.version>17</java.version>
2832
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -414,6 +418,42 @@
414418
<scope>compile</scope>
415419
</dependency>
416420

421+
<!-- AWS SDK v2 artifacts needed by S3ObjectStore which are NOT declared by dspace-api
422+
(dspace-api only brings in "s3"). Scope is 'provided' because these JARs are expected
423+
to be present in the DSpace installation's lib/ at runtime. -->
424+
<dependency>
425+
<groupId>software.amazon.awssdk</groupId>
426+
<artifactId>sts</artifactId>
427+
<version>${aws.sdk.version}</version>
428+
<scope>provided</scope>
429+
<exclusions>
430+
<exclusion>
431+
<groupId>software.amazon.awssdk</groupId>
432+
<artifactId>netty-nio-client</artifactId>
433+
</exclusion>
434+
<exclusion>
435+
<groupId>software.amazon.awssdk</groupId>
436+
<artifactId>apache-client</artifactId>
437+
</exclusion>
438+
</exclusions>
439+
</dependency>
440+
<dependency>
441+
<groupId>software.amazon.awssdk</groupId>
442+
<artifactId>s3-transfer-manager</artifactId>
443+
<version>${aws.sdk.version}</version>
444+
<scope>provided</scope>
445+
<exclusions>
446+
<exclusion>
447+
<groupId>software.amazon.awssdk</groupId>
448+
<artifactId>netty-nio-client</artifactId>
449+
</exclusion>
450+
<exclusion>
451+
<groupId>software.amazon.awssdk</groupId>
452+
<artifactId>apache-client</artifactId>
453+
</exclusion>
454+
</exclusions>
455+
</dependency>
456+
417457
<!-- DuraCloud dependencies (used for replication to/from DuraCloud).
418458
We only need to specify a dependency on the 'storeclient', as it already
419459
declares dependencies on DuraCloud 'common' and 'storeprovider' APIs. -->

0 commit comments

Comments
 (0)