diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b14043c94b89..5ca99bfe89ee 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -4,7 +4,23 @@
name: Build
# Run this Build for all pushes / PRs to current branch
-on: [push, pull_request]
+on:
+ push:
+ # Don't run if PR is only updating static documentation
+ paths-ignore:
+ - '.gitignore'
+ - 'LICENSE'
+ - 'LICENSES_THIRD_PARTY'
+ - 'NOTICE'
+ - '**/*.md'
+ pull_request:
+ # Don't run if PR is only updating static documentation
+ paths-ignore:
+ - '.gitignore'
+ - 'LICENSE'
+ - 'LICENSES_THIRD_PARTY'
+ - 'NOTICE'
+ - '**/*.md'
permissions:
contents: read # to fetch code (actions/checkout)
@@ -45,11 +61,11 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
- uses: actions/checkout@v6
+ uses: actions/checkout@v7
# https://github.com/actions/setup-java
- name: Install JDK ${{ matrix.java }}
- uses: actions/setup-java@v5
+ uses: actions/setup-java@v6
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
@@ -84,10 +100,13 @@ jobs:
codecov:
# Must run after 'tests' job above
needs: tests
+ # Only run on the upstream repository: forks do not have the CODECOV_TOKEN secret,
+ # and Codecov refuses to create a commit on a protected branch without a token.
+ if: github.repository == 'dspace/dspace'
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v6
+ uses: actions/checkout@v7
# Download artifacts from previous 'tests' job
- name: Download coverage artifacts
diff --git a/.github/workflows/codescan.yml b/.github/workflows/codescan.yml
index 90d79f9bfd60..5db501b72d77 100644
--- a/.github/workflows/codescan.yml
+++ b/.github/workflows/codescan.yml
@@ -17,8 +17,11 @@ on:
- 'dspace-**'
# Don't run if PR is only updating static documentation
paths-ignore:
+ - '.gitignore'
+ - 'LICENSE'
+ - 'LICENSES_THIRD_PARTY'
+ - 'NOTICE'
- '**/*.md'
- - '**/*.txt'
schedule:
- cron: "37 0 * * 1"
@@ -35,11 +38,11 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout repository
- uses: actions/checkout@v6
+ uses: actions/checkout@v7
# https://github.com/actions/setup-java
- name: Install JDK
- uses: actions/setup-java@v5
+ uses: actions/setup-java@v6
with:
java-version: 17
distribution: 'temurin'
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 5732a22d8277..7e3722e2a352 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -11,7 +11,21 @@ on:
- 'dspace-**'
tags:
- 'dspace-**'
+ # Don't run if PR is only updating static documentation
+ paths-ignore:
+ - '.gitignore'
+ - 'LICENSE'
+ - 'LICENSES_THIRD_PARTY'
+ - 'NOTICE'
+ - '**/*.md'
pull_request:
+ # Don't run if PR is only updating static documentation
+ paths-ignore:
+ - '.gitignore'
+ - 'LICENSE'
+ - 'LICENSES_THIRD_PARTY'
+ - 'NOTICE'
+ - '**/*.md'
permissions:
contents: read # to fetch code (actions/checkout)
@@ -183,7 +197,7 @@ jobs:
steps:
# Checkout our codebase (to get access to Docker Compose scripts)
- name: Checkout codebase
- uses: actions/checkout@v6
+ uses: actions/checkout@v7
# Download Docker image artifacts (which were just built by reusable-docker-build.yml)
- name: Download Docker image artifacts
uses: actions/download-artifact@v8
diff --git a/.github/workflows/issue_opened.yml b/.github/workflows/issue_opened.yml
index c8c421d98f47..99dd91c74e31 100644
--- a/.github/workflows/issue_opened.yml
+++ b/.github/workflows/issue_opened.yml
@@ -16,7 +16,7 @@ jobs:
# Only add to project board if issue is flagged as "needs triage" or has no labels
# NOTE: By default we flag new issues as "needs triage" in our issue template
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
- uses: actions/add-to-project@v1.0.2
+ uses: actions/add-to-project@v2
# Note, the authentication token below is an ORG level Secret.
# It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token
diff --git a/.github/workflows/port_merged_pull_request.yml b/.github/workflows/port_merged_pull_request.yml
index 676ad45ba263..1eb4e52b762c 100644
--- a/.github/workflows/port_merged_pull_request.yml
+++ b/.github/workflows/port_merged_pull_request.yml
@@ -18,16 +18,26 @@ permissions:
jobs:
port_pr:
- runs-on: ubuntu-latest
- # Don't run on closed *unmerged* pull requests
- if: github.event.pull_request.merged
+ runs-on: ubuntu-slim
+ # Only run on MERGED pull requests,
+ # and only run if the merged PR has a label that starts with "port to"
+ if: >
+ github.event.pull_request.merged &&
+ contains(toJSON(github.event.pull_request.labels.*.name), '"port to ')
steps:
# Checkout code
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v7
+ with:
+ # When using 'pull_request_target' (see above), this 'checkout' step will always fail because it
+ # may make the codebase vulnerable to "pwn requests" via the user-created PR.
+ # See https://docs.github.com/en/actions/reference/security/securely-using-pull_request_target
+ # However, we are allowing this unsafe checkout because (1) it's required to backport the PR, and
+ # (2) this job only runs when a PR is MERGED, and merger only happens after a thorough review of the PR.
+ allow-unsafe-pr-checkout: true
# Port PR to other branch (ONLY if labeled with "port to")
# See https://github.com/korthout/backport-action
- name: Create backport pull requests
- uses: korthout/backport-action@v4
+ uses: korthout/backport-action@v4.6.0
with:
# Trigger based on a "port to [branch]" label on PR
# (This label must specify the branch name to port to)
diff --git a/.github/workflows/pull_request_opened.yml b/.github/workflows/pull_request_opened.yml
index e2b6e8ba9c2c..1e17cedcd179 100644
--- a/.github/workflows/pull_request_opened.yml
+++ b/.github/workflows/pull_request_opened.yml
@@ -21,4 +21,4 @@ jobs:
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
# See https://github.com/toshimaru/auto-author-assign
- name: Assign PR to creator
- uses: toshimaru/auto-author-assign@v3.0.1
+ uses: toshimaru/auto-author-assign@v3.1.0
diff --git a/.github/workflows/reusable-docker-build.yml b/.github/workflows/reusable-docker-build.yml
index 768adb8f1602..8099760edcd6 100644
--- a/.github/workflows/reusable-docker-build.yml
+++ b/.github/workflows/reusable-docker-build.yml
@@ -109,7 +109,7 @@ jobs:
# https://github.com/actions/checkout
- name: Checkout codebase
- uses: actions/checkout@v6
+ uses: actions/checkout@v7
# https://github.com/docker/login-action
# NOTE: This login occurs for BOTH non-PRs or PRs. PRs *must* also login to access private images from GHCR
diff --git a/LICENSES_THIRD_PARTY b/LICENSES_THIRD_PARTY
index c65827035560..d023c05487d6 100644
--- a/LICENSES_THIRD_PARTY
+++ b/LICENSES_THIRD_PARTY
@@ -18,28 +18,32 @@ dependencies that are solely released under GPL terms. For more info see:
https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
---------------------------------------------------
+ Apache License version 2.0:
+
+ * XML Resolver (org.xmlresolver:xmlresolver:5.3.3 - https://github.com/xmlresolver/xmlresolver)
+
Apache Software License, Version 2.0:
* Ant-Contrib Tasks (ant-contrib:ant-contrib:1.0b3 - http://ant-contrib.sourceforge.net)
* S3Mock - Testsupport - Testcontainers (com.adobe.testing:s3mock-testcontainers:4.12.4 - https://www.github.com/adobe/S3Mock/s3mock-testsupport-reactor/s3mock-testcontainers)
* Titanium JSON-LD 1.1 (JRE11) (com.apicatalog:titanium-json-ld:1.3.2 - https://github.com/filip26/titanium-json-ld)
* HPPC Collections (com.carrotsearch:hppc:0.8.1 - http://labs.carrotsearch.com/hppc.html/hppc)
- * com.drewnoakes:metadata-extractor (com.drewnoakes:metadata-extractor:2.19.0 - https://drewnoakes.com/code/exif/)
+ * com.drewnoakes:metadata-extractor (com.drewnoakes:metadata-extractor:2.20.0 - https://drewnoakes.com/code/exif/)
* parso (com.epam:parso:2.0.14 - https://github.com/epam/parso)
* Internet Time Utility (com.ethlo.time:itu:1.7.0 - https://github.com/ethlo/itu)
* ClassMate (com.fasterxml:classmate:1.7.3 - https://github.com/FasterXML/java-classmate)
- * Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
- * Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.3 - https://github.com/FasterXML/jackson-core)
- * jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.3 - https://github.com/FasterXML/jackson)
+ * Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
+ * Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.2 - https://github.com/FasterXML/jackson-core)
+ * jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.2 - https://github.com/FasterXML/jackson)
* Jackson dataformat: Smile (com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.15.2 - https://github.com/FasterXML/jackson-dataformats-binary)
* Jackson-dataformat-TOML (com.fasterxml.jackson.dataformat:jackson-dataformat-toml:2.15.2 - https://github.com/FasterXML/jackson-dataformats-text)
* Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.16.2 - https://github.com/FasterXML/jackson-dataformats-text)
- * Jackson datatype: jdk8 (com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.21.2 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jdk8)
- * Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.3 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
+ * Jackson datatype: jdk8 (com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.21.4 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jdk8)
+ * Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.2 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
* Jackson Jakarta-RS: base (com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base:2.16.2 - https://github.com/FasterXML/jackson-jakarta-rs-providers/jackson-jakarta-rs-base)
* Jackson Jakarta-RS: JSON (com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:2.16.2 - https://github.com/FasterXML/jackson-jakarta-rs-providers/jackson-jakarta-rs-json-provider)
* Jackson module: Jakarta XML Bind Annotations (jakarta.xml.bind) (com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:2.16.2 - https://github.com/FasterXML/jackson-modules-base)
- * Jackson-module-parameter-names (com.fasterxml.jackson.module:jackson-module-parameter-names:2.21.2 - https://github.com/FasterXML/jackson-modules-java8/jackson-module-parameter-names)
+ * Jackson-module-parameter-names (com.fasterxml.jackson.module:jackson-module-parameter-names:2.21.4 - https://github.com/FasterXML/jackson-modules-java8/jackson-module-parameter-names)
* Java UUID Generator (com.fasterxml.uuid:java-uuid-generator:4.1.0 - https://github.com/cowtowncoder/java-uuid-generator)
* Woodstox (com.fasterxml.woodstox:woodstox-core:6.5.1 - https://github.com/FasterXML/woodstox)
* zjsonpatch (com.flipkart.zjsonpatch:zjsonpatch:0.4.16 - https://github.com/flipkart-incubator/zjsonpatch/)
@@ -68,7 +72,7 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* J2ObjC Annotations (com.google.j2objc:j2objc-annotations:1.3 - https://github.com/google/j2objc/)
* J2ObjC Annotations (com.google.j2objc:j2objc-annotations:3.1 - https://github.com/google/j2objc/)
* libphonenumber (com.googlecode.libphonenumber:libphonenumber:8.11.1 - https://github.com/google/libphonenumber/)
- * Jackcess (com.healthmarketscience.jackcess:jackcess:4.0.10 - https://jackcess.sourceforge.io)
+ * Jackcess (com.healthmarketscience.jackcess:jackcess:4.0.11 - https://jackcess.sourceforge.io)
* Jackcess Encrypt (com.healthmarketscience.jackcess:jackcess-encrypt:4.0.3 - http://jackcessencrypt.sf.net)
* json-path (com.jayway.jsonpath:json-path:2.10.0 - https://github.com/jayway/JsonPath)
* json-path-assert (com.jayway.jsonpath:json-path-assert:2.10.0 - https://github.com/jayway/JsonPath)
@@ -92,13 +96,13 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* SparseBitSet (com.zaxxer:SparseBitSet:1.3 - https://github.com/brettwooldridge/SparseBitSet)
* Apache Commons BeanUtils (commons-beanutils:commons-beanutils:1.11.0 - https://commons.apache.org/proper/commons-beanutils)
* Apache Commons CLI (commons-cli:commons-cli:1.11.0 - https://commons.apache.org/proper/commons-cli/)
- * Apache Commons Codec (commons-codec:commons-codec:1.22.0 - https://commons.apache.org/proper/commons-codec/)
+ * Apache Commons Codec (commons-codec:commons-codec:1.22.1 - https://commons.apache.org/proper/commons-codec/)
* Apache Commons Collections (commons-collections:commons-collections:3.2.2 - http://commons.apache.org/collections/)
* Commons Digester (commons-digester:commons-digester:2.1 - http://commons.apache.org/digester/)
* Apache Commons IO (commons-io:commons-io:2.22.0 - https://commons.apache.org/proper/commons-io/)
* Commons Lang (commons-lang:commons-lang:2.6 - http://commons.apache.org/lang/)
- * Apache Commons Logging (commons-logging:commons-logging:1.3.6 - https://commons.apache.org/proper/commons-logging/)
- * Apache Commons Validator (commons-validator:commons-validator:1.10.1 - https://commons.apache.org/proper/commons-validator/)
+ * Apache Commons Logging (commons-logging:commons-logging:1.4.0 - https://commons.apache.org/proper/commons-logging/)
+ * Apache Commons Validator (commons-validator:commons-validator:1.11.0 - https://commons.apache.org/proper/commons-validator/)
* GeoJson POJOs for Jackson (de.grundid.opendatalab:geojson-jackson:1.14 - https://github.com/opendatalab-de/geojson-jackson)
* broker-client (eu.openaire:broker-client:1.1.2 - http://api.openaire.eu/broker/broker-client)
* OpenAIRE Funders Model (eu.openaire:funders-model:2.0.0 - https://api.openaire.eu)
@@ -108,10 +112,10 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* Metrics Integration with JMX (io.dropwizard.metrics:metrics-jmx:4.1.5 - https://metrics.dropwizard.io/metrics-jmx)
* JVM Integration for Metrics (io.dropwizard.metrics:metrics-jvm:4.1.5 - https://metrics.dropwizard.io/metrics-jvm)
* SWORD v2 Common Server Library (forked) (io.gdcc:sword2-server:2.0.0 - https://github.com/gdcc/sword2-server)
- * micrometer-commons (io.micrometer:micrometer-commons:1.15.11 - https://github.com/micrometer-metrics/micrometer)
- * micrometer-core (io.micrometer:micrometer-core:1.15.11 - https://github.com/micrometer-metrics/micrometer)
- * micrometer-jakarta9 (io.micrometer:micrometer-jakarta9:1.15.11 - https://github.com/micrometer-metrics/micrometer)
- * micrometer-observation (io.micrometer:micrometer-observation:1.15.11 - https://github.com/micrometer-metrics/micrometer)
+ * micrometer-commons (io.micrometer:micrometer-commons:1.15.12 - https://github.com/micrometer-metrics/micrometer)
+ * micrometer-core (io.micrometer:micrometer-core:1.15.12 - https://github.com/micrometer-metrics/micrometer)
+ * micrometer-jakarta9 (io.micrometer:micrometer-jakarta9:1.15.12 - https://github.com/micrometer-metrics/micrometer)
+ * micrometer-observation (io.micrometer:micrometer-observation:1.15.12 - https://github.com/micrometer-metrics/micrometer)
* Netty/Buffer (io.netty:netty-buffer:4.1.99.Final - https://netty.io/netty-buffer/)
* Netty/Codec (io.netty:netty-codec:4.1.99.Final - https://netty.io/netty-codec/)
* Netty/Codec/HTTP (io.netty:netty-codec-http:4.1.86.Final - https://netty.io/netty-codec-http/)
@@ -166,7 +170,6 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* eigenbase-properties (net.hydromatic:eigenbase-properties:1.1.5 - http://github.com/julianhyde/eigenbase-properties)
* Java Native Access (net.java.dev.jna:jna:5.18.1 - https://github.com/java-native-access/jna)
* json-unit-core (net.javacrumbs.json-unit:json-unit-core:2.36.0 - https://github.com/lukas-krecan/JsonUnit/json-unit-core)
- * "Java Concurrency in Practice" book annotations (net.jcip:jcip-annotations:1.0 - http://jcip.net/)
* ASM based accessors helper used by json-smart (net.minidev:accessors-smart:2.6.0 - https://urielch.github.io/)
* JSON Small and Fast Parser (net.minidev:json-smart:2.6.0 - https://urielch.github.io/)
* Abdera Core (org.apache.abdera:abdera-core:1.1.3 - http://abdera.apache.org/abdera-core)
@@ -179,9 +182,9 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* Calcite Linq4j (org.apache.calcite:calcite-linq4j:1.35.0 - https://calcite.apache.org)
* Apache Calcite Avatica (org.apache.calcite.avatica:avatica-core:1.23.0 - https://calcite.apache.org/avatica)
* Apache Calcite Avatica Metrics (org.apache.calcite.avatica:avatica-metrics:1.23.0 - https://calcite.apache.org/avatica)
- * Apache Commons Collections (org.apache.commons:commons-collections4:4.5.0 - https://commons.apache.org/proper/commons-collections/)
+ * Apache Commons Collections (org.apache.commons:commons-collections4:4.6.0 - https://commons.apache.org/proper/commons-collections/)
* Apache Commons Compress (org.apache.commons:commons-compress:1.28.0 - https://commons.apache.org/proper/commons-compress/)
- * Apache Commons Configuration (org.apache.commons:commons-configuration2:2.15.0 - https://commons.apache.org/proper/commons-configuration/)
+ * Apache Commons Configuration (org.apache.commons:commons-configuration2:2.15.1 - https://commons.apache.org/proper/commons-configuration/)
* Apache Commons CSV (org.apache.commons:commons-csv:1.14.1 - https://commons.apache.org/proper/commons-csv/)
* Apache Commons DBCP (org.apache.commons:commons-dbcp2:2.14.0 - https://commons.apache.org/proper/commons-dbcp/)
* Apache Commons Digester (org.apache.commons:commons-digester3:3.2 - http://commons.apache.org/digester/)
@@ -204,13 +207,13 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* Apache HttpCore (org.apache.httpcomponents:httpcore:4.4.16 - http://hc.apache.org/httpcomponents-core-ga)
* Apache HttpClient Mime (org.apache.httpcomponents:httpmime:4.5.14 - http://hc.apache.org/httpcomponents-client-ga)
* Apache HttpClient (org.apache.httpcomponents.client5:httpclient5:5.1.3 - https://hc.apache.org/httpcomponents-client-5.0.x/5.1.3/httpclient5/)
- * Apache HttpClient (org.apache.httpcomponents.client5:httpclient5:5.6.1 - https://hc.apache.org/httpcomponents-client-5.5.x/5.6.1/httpclient5/)
+ * Apache HttpClient (org.apache.httpcomponents.client5:httpclient5:5.6.4 - https://hc.apache.org/httpcomponents-client-5.6.x/5.6.4/httpclient5/)
* Apache HttpComponents Core HTTP/1.1 (org.apache.httpcomponents.core5:httpcore5:5.1.3 - https://hc.apache.org/httpcomponents-core-5.1.x/5.1.3/httpcore5/)
- * Apache HttpComponents Core HTTP/1.1 (org.apache.httpcomponents.core5:httpcore5:5.4 - https://hc.apache.org/httpcomponents-core-5.4.x/5.4/httpcore5/)
+ * Apache HttpComponents Core HTTP/1.1 (org.apache.httpcomponents.core5:httpcore5:5.4.3 - https://hc.apache.org/httpcomponents-core-5.4.x/5.4.3/httpcore5/)
* Apache HttpComponents Core HTTP/2 (org.apache.httpcomponents.core5:httpcore5-h2:5.1.3 - https://hc.apache.org/httpcomponents-core-5.1.x/5.1.3/httpcore5-h2/)
- * Apache HttpComponents Core HTTP/2 (org.apache.httpcomponents.core5:httpcore5-h2:5.4 - https://hc.apache.org/httpcomponents-core-5.4.x/5.4/httpcore5-h2/)
+ * Apache HttpComponents Core HTTP/2 (org.apache.httpcomponents.core5:httpcore5-h2:5.4.3 - https://hc.apache.org/httpcomponents-core-5.4.x/5.4.3/httpcore5-h2/)
* Apache James :: Mime4j :: Core (org.apache.james:apache-mime4j-core:0.8.14 - http://james.apache.org/mime4j/apache-mime4j-core)
- * Apache James :: Mime4j :: DOM (org.apache.james:apache-mime4j-dom:0.8.13 - http://james.apache.org/mime4j/apache-mime4j-dom)
+ * Apache James :: Mime4j :: DOM (org.apache.james:apache-mime4j-dom:0.8.14 - http://james.apache.org/mime4j/apache-mime4j-dom)
* Apache Jena - Libraries POM (org.apache.jena:apache-jena-libs:4.10.0 - https://jena.apache.org/apache-jena-libs/)
* Apache Jena - ARQ (org.apache.jena:jena-arq:4.10.0 - https://jena.apache.org/jena-arq/)
* Apache Jena - Base (org.apache.jena:jena-base:4.10.0 - https://jena.apache.org/jena-base/)
@@ -232,12 +235,12 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* Kerby ASN1 Project (org.apache.kerby:kerby-asn1:1.0.1 - http://directory.apache.org/kerby/kerby-common/kerby-asn1)
* Kerby PKIX Project (org.apache.kerby:kerby-pkix:1.0.1 - http://directory.apache.org/kerby/kerby-pkix)
* Apache Log4j 1.x Compatibility API (org.apache.logging.log4j:log4j-1.2-api:2.17.2 - https://logging.apache.org/log4j/2.x/log4j-1.2-api/)
- * Apache Log4j API (org.apache.logging.log4j:log4j-api:2.25.4 - https://logging.apache.org/log4j/2.x/)
- * Apache Log4j Core (org.apache.logging.log4j:log4j-core:2.25.4 - https://logging.apache.org/log4j/2.x/)
+ * Apache Log4j API (org.apache.logging.log4j:log4j-api:2.26.1 - https://logging.apache.org/log4j/2.x/)
+ * Apache Log4j Core (org.apache.logging.log4j:log4j-core:2.26.1 - https://logging.apache.org/log4j/2.x/)
* Apache Log4j JUL Adapter (org.apache.logging.log4j:log4j-jul:2.24.3 - https://logging.apache.org/log4j/2.x/log4j/log4j-jul/)
* Apache Log4j Layout for JSON template (org.apache.logging.log4j:log4j-layout-template-json:2.17.2 - https://logging.apache.org/log4j/2.x/log4j-layout-template-json/)
* Apache Log4j SLF4J Binding (org.apache.logging.log4j:log4j-slf4j-impl:2.17.2 - https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/)
- * SLF4J 2 Provider for Log4j API (org.apache.logging.log4j:log4j-slf4j2-impl:2.25.4 - https://logging.apache.org/log4j/2.x/)
+ * SLF4J 2 Provider for Log4j API (org.apache.logging.log4j:log4j-slf4j2-impl:2.26.1 - https://logging.apache.org/log4j/2.x/)
* Apache Log4j Web (org.apache.logging.log4j:log4j-web:2.17.2 - https://logging.apache.org/log4j/2.x/log4j-web/)
* Lucene Common Analyzers (org.apache.lucene:lucene-analyzers-common:8.11.4 - https://lucene.apache.org/lucene-parent/lucene-analyzers-common)
* Lucene ICU Analysis Components (org.apache.lucene:lucene-analyzers-icu:8.11.4 - https://lucene.apache.org/lucene-parent/lucene-analyzers-icu)
@@ -262,13 +265,13 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* Lucene Spatial Extras (org.apache.lucene:lucene-spatial-extras:8.11.4 - https://lucene.apache.org/lucene-parent/lucene-spatial-extras)
* Lucene Spatial 3D (org.apache.lucene:lucene-spatial3d:8.11.4 - https://lucene.apache.org/lucene-parent/lucene-spatial3d)
* Lucene Suggest (org.apache.lucene:lucene-suggest:8.11.4 - https://lucene.apache.org/lucene-parent/lucene-suggest)
- * Apache FontBox (org.apache.pdfbox:fontbox:3.0.7 - http://pdfbox.apache.org/)
- * PDFBox JBIG2 ImageIO plugin (org.apache.pdfbox:jbig2-imageio:3.0.4 - https://www.apache.org/jbig2-imageio/)
+ * Apache FontBox (org.apache.pdfbox:fontbox:3.0.8 - http://pdfbox.apache.org/)
+ * PDFBox JBIG2 ImageIO plugin (org.apache.pdfbox:jbig2-imageio:3.0.5 - https://www.apache.org/jbig2-imageio/)
* Apache JempBox (org.apache.pdfbox:jempbox:1.8.17 - http://www.apache.org/pdfbox-parent/jempbox/)
- * Apache PDFBox (org.apache.pdfbox:pdfbox:3.0.7 - https://www.apache.org/pdfbox-parent/pdfbox/)
- * Apache PDFBox io (org.apache.pdfbox:pdfbox-io:3.0.7 - https://www.apache.org/pdfbox-parent/pdfbox-io/)
- * Apache PDFBox tools (org.apache.pdfbox:pdfbox-tools:3.0.7 - https://www.apache.org/pdfbox-parent/pdfbox-tools/)
- * Apache XmpBox (org.apache.pdfbox:xmpbox:3.0.7 - https://www.apache.org/pdfbox-parent/xmpbox/)
+ * Apache PDFBox (org.apache.pdfbox:pdfbox:3.0.8 - https://www.apache.org/pdfbox-parent/pdfbox/)
+ * Apache PDFBox io (org.apache.pdfbox:pdfbox-io:3.0.8 - https://www.apache.org/pdfbox-parent/pdfbox-io/)
+ * Apache PDFBox tools (org.apache.pdfbox:pdfbox-tools:3.0.8 - https://www.apache.org/pdfbox-parent/pdfbox-tools/)
+ * Apache XmpBox (org.apache.pdfbox:xmpbox:3.0.8 - https://www.apache.org/pdfbox-parent/xmpbox/)
* Apache POI - Common (org.apache.poi:poi:5.5.1 - https://poi.apache.org/)
* Apache POI - API based on OPC and OOXML schemas (org.apache.poi:poi-ooxml:5.5.1 - https://poi.apache.org/)
* Apache POI - OOXML schemas (full) (org.apache.poi:poi-ooxml-full:5.5.1 - https://poi.apache.org/)
@@ -278,33 +281,33 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* Apache Standard Taglib Implementation (org.apache.taglibs:taglibs-standard-impl:1.2.5 - http://tomcat.apache.org/taglibs/standard-1.2.5/taglibs-standard-impl)
* Apache Standard Taglib Specification API (org.apache.taglibs:taglibs-standard-spec:1.2.5 - http://tomcat.apache.org/taglibs/standard-1.2.5/taglibs-standard-spec)
* Apache Thrift (org.apache.thrift:libthrift:0.19.0 - http://thrift.apache.org)
- * Apache Tika core (org.apache.tika:tika-core:3.3.0 - https://tika.apache.org/)
- * Apache Tika Apple parser module (org.apache.tika:tika-parser-apple-module:3.3.0 - https://tika.apache.org/tika-parser-apple-module/)
- * Apache Tika audiovideo parser module (org.apache.tika:tika-parser-audiovideo-module:3.3.0 - https://tika.apache.org/tika-parser-audiovideo-module/)
- * Apache Tika cad parser module (org.apache.tika:tika-parser-cad-module:3.3.0 - https://tika.apache.org/tika-parser-cad-module/)
- * Apache Tika code parser module (org.apache.tika:tika-parser-code-module:3.3.0 - https://tika.apache.org/tika-parser-code-module/)
- * Apache Tika crypto parser module (org.apache.tika:tika-parser-crypto-module:3.3.0 - https://tika.apache.org/tika-parser-crypto-module/)
- * Apache Tika digest commons (org.apache.tika:tika-parser-digest-commons:3.3.0 - https://tika.apache.org/tika-parser-digest-commons/)
- * Apache Tika font parser module (org.apache.tika:tika-parser-font-module:3.3.0 - https://tika.apache.org/tika-parser-font-module/)
- * Apache Tika html parser module (org.apache.tika:tika-parser-html-module:3.3.0 - https://tika.apache.org/tika-parser-html-module/)
- * Apache Tika image parser module (org.apache.tika:tika-parser-image-module:3.3.0 - https://tika.apache.org/tika-parser-image-module/)
- * Apache Tika mail commons (org.apache.tika:tika-parser-mail-commons:3.3.0 - https://tika.apache.org/tika-parser-mail-commons/)
- * Apache Tika mail parser module (org.apache.tika:tika-parser-mail-module:3.3.0 - https://tika.apache.org/tika-parser-mail-module/)
- * Apache Tika Microsoft parser module (org.apache.tika:tika-parser-microsoft-module:3.3.0 - https://tika.apache.org/tika-parser-microsoft-module/)
- * Apache Tika miscellaneous office format parser module (org.apache.tika:tika-parser-miscoffice-module:3.3.0 - https://tika.apache.org/tika-parser-miscoffice-module/)
- * Apache Tika news parser module (org.apache.tika:tika-parser-news-module:3.3.0 - https://tika.apache.org/tika-parser-news-module/)
- * Apache Tika OCR parser module (org.apache.tika:tika-parser-ocr-module:3.3.0 - https://tika.apache.org/tika-parser-ocr-module/)
- * Apache Tika PDF parser module (org.apache.tika:tika-parser-pdf-module:3.3.0 - https://tika.apache.org/tika-parser-pdf-module/)
- * Apache Tika package parser module (org.apache.tika:tika-parser-pkg-module:3.3.0 - https://tika.apache.org/tika-parser-pkg-module/)
- * Apache Tika text parser module (org.apache.tika:tika-parser-text-module:3.3.0 - https://tika.apache.org/tika-parser-text-module/)
- * Apache Tika WARC parser module (org.apache.tika:tika-parser-webarchive-module:3.3.0 - https://tika.apache.org/tika-parser-webarchive-module/)
- * Apache Tika XML parser module (org.apache.tika:tika-parser-xml-module:3.3.0 - https://tika.apache.org/tika-parser-xml-module/)
- * Apache Tika XMP commons (org.apache.tika:tika-parser-xmp-commons:3.3.0 - https://tika.apache.org/tika-parser-xmp-commons/)
- * Apache Tika ZIP commons (org.apache.tika:tika-parser-zip-commons:3.3.0 - https://tika.apache.org/tika-parser-zip-commons/)
- * Apache Tika standard parser package (org.apache.tika:tika-parsers-standard-package:3.3.0 - https://tika.apache.org/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/)
- * tomcat-embed-core (org.apache.tomcat.embed:tomcat-embed-core:10.1.54 - https://tomcat.apache.org/)
- * tomcat-embed-el (org.apache.tomcat.embed:tomcat-embed-el:10.1.54 - https://tomcat.apache.org/)
- * tomcat-embed-websocket (org.apache.tomcat.embed:tomcat-embed-websocket:10.1.54 - https://tomcat.apache.org/)
+ * Apache Tika core (org.apache.tika:tika-core:3.3.2 - https://tika.apache.org/)
+ * Apache Tika Apple parser module (org.apache.tika:tika-parser-apple-module:3.3.2 - https://tika.apache.org/tika-parser-apple-module/)
+ * Apache Tika audiovideo parser module (org.apache.tika:tika-parser-audiovideo-module:3.3.2 - https://tika.apache.org/tika-parser-audiovideo-module/)
+ * Apache Tika cad parser module (org.apache.tika:tika-parser-cad-module:3.3.2 - https://tika.apache.org/tika-parser-cad-module/)
+ * Apache Tika code parser module (org.apache.tika:tika-parser-code-module:3.3.2 - https://tika.apache.org/tika-parser-code-module/)
+ * Apache Tika crypto parser module (org.apache.tika:tika-parser-crypto-module:3.3.2 - https://tika.apache.org/tika-parser-crypto-module/)
+ * Apache Tika digest commons (org.apache.tika:tika-parser-digest-commons:3.3.2 - https://tika.apache.org/tika-parser-digest-commons/)
+ * Apache Tika font parser module (org.apache.tika:tika-parser-font-module:3.3.2 - https://tika.apache.org/tika-parser-font-module/)
+ * Apache Tika html parser module (org.apache.tika:tika-parser-html-module:3.3.2 - https://tika.apache.org/tika-parser-html-module/)
+ * Apache Tika image parser module (org.apache.tika:tika-parser-image-module:3.3.2 - https://tika.apache.org/tika-parser-image-module/)
+ * Apache Tika mail commons (org.apache.tika:tika-parser-mail-commons:3.3.2 - https://tika.apache.org/tika-parser-mail-commons/)
+ * Apache Tika mail parser module (org.apache.tika:tika-parser-mail-module:3.3.2 - https://tika.apache.org/tika-parser-mail-module/)
+ * Apache Tika Microsoft parser module (org.apache.tika:tika-parser-microsoft-module:3.3.2 - https://tika.apache.org/tika-parser-microsoft-module/)
+ * Apache Tika miscellaneous office format parser module (org.apache.tika:tika-parser-miscoffice-module:3.3.2 - https://tika.apache.org/tika-parser-miscoffice-module/)
+ * Apache Tika news parser module (org.apache.tika:tika-parser-news-module:3.3.2 - https://tika.apache.org/tika-parser-news-module/)
+ * Apache Tika OCR parser module (org.apache.tika:tika-parser-ocr-module:3.3.2 - https://tika.apache.org/tika-parser-ocr-module/)
+ * Apache Tika PDF parser module (org.apache.tika:tika-parser-pdf-module:3.3.2 - https://tika.apache.org/tika-parser-pdf-module/)
+ * Apache Tika package parser module (org.apache.tika:tika-parser-pkg-module:3.3.2 - https://tika.apache.org/tika-parser-pkg-module/)
+ * Apache Tika text parser module (org.apache.tika:tika-parser-text-module:3.3.2 - https://tika.apache.org/tika-parser-text-module/)
+ * Apache Tika WARC parser module (org.apache.tika:tika-parser-webarchive-module:3.3.2 - https://tika.apache.org/tika-parser-webarchive-module/)
+ * Apache Tika XML parser module (org.apache.tika:tika-parser-xml-module:3.3.2 - https://tika.apache.org/tika-parser-xml-module/)
+ * Apache Tika XMP commons (org.apache.tika:tika-parser-xmp-commons:3.3.2 - https://tika.apache.org/tika-parser-xmp-commons/)
+ * Apache Tika ZIP commons (org.apache.tika:tika-parser-zip-commons:3.3.2 - https://tika.apache.org/tika-parser-zip-commons/)
+ * Apache Tika standard parser package (org.apache.tika:tika-parsers-standard-package:3.3.2 - https://tika.apache.org/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/)
+ * tomcat-embed-core (org.apache.tomcat.embed:tomcat-embed-core:10.1.55 - https://tomcat.apache.org/)
+ * tomcat-embed-el (org.apache.tomcat.embed:tomcat-embed-el:10.1.55 - https://tomcat.apache.org/)
+ * tomcat-embed-websocket (org.apache.tomcat.embed:tomcat-embed-websocket:10.1.55 - https://tomcat.apache.org/)
* Apache Velocity - Engine (org.apache.velocity:velocity-engine-core:2.4.1 - http://velocity.apache.org/engine/devel/velocity-engine-core/)
* Apache Velocity - JSR 223 Scripting (org.apache.velocity:velocity-engine-scripting:2.3 - http://velocity.apache.org/engine/devel/velocity-engine-scripting/)
* Apache Velocity Tools - Generic tools (org.apache.velocity.tools:velocity-tools-generic:3.1 - https://velocity.apache.org/tools/devel/velocity-tools-generic/)
@@ -365,12 +368,12 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* flyway-database-postgresql (org.flywaydb:flyway-database-postgresql:10.22.0 - https://flywaydb.org/flyway-database-postgresql)
* Ogg and Vorbis for Java, Core (org.gagravarr:vorbis-java-core:0.8 - https://github.com/Gagravarr/VorbisJava)
* Apache Tika plugin for Ogg, Vorbis and FLAC (org.gagravarr:vorbis-java-tika:0.8 - https://github.com/Gagravarr/VorbisJava)
- * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
- * jersey-core-common (org.glassfish.jersey.core:jersey-common:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-common)
- * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
+ * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
+ * jersey-core-common (org.glassfish.jersey.core:jersey-common:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-common)
+ * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
* jersey-media-multipart (org.glassfish.jersey.media:jersey-media-multipart:3.1.3 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-media-multipart)
- * Hibernate Validator Engine (org.hibernate.validator:hibernate-validator:8.0.3.Final - https://hibernate.org/validator)
- * Hibernate Validator Portable Extension (org.hibernate.validator:hibernate-validator-cdi:8.0.3.Final - https://hibernate.org/validator)
+ * Hibernate Validator Engine (org.hibernate.validator:hibernate-validator:8.0.5.Final - https://hibernate.org/validator)
+ * Hibernate Validator Portable Extension (org.hibernate.validator:hibernate-validator-cdi:8.0.5.Final - https://hibernate.org/validator)
* org.immutables.value-annotations (org.immutables:value-annotations:2.9.2 - http://immutables.org/value-annotations)
* Javassist (org.javassist:javassist:3.30.2-GA - https://www.javassist.org/)
* JBoss Logging 3 (org.jboss.logging:jboss-logging:3.5.0.Final - http://www.jboss.org)
@@ -387,97 +390,92 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* MockServer Core (org.mock-server:mockserver-core:5.15.0 - https://www.mock-server.com)
* MockServer JUnit 4 Integration (org.mock-server:mockserver-junit-rule:5.15.0 - https://www.mock-server.com)
* MockServer & Proxy Netty (org.mock-server:mockserver-netty:5.15.0 - https://www.mock-server.com)
- * jwarc (org.netpreserve:jwarc:0.35.0 - https://github.com/iipc/jwarc)
+ * jwarc (org.netpreserve:jwarc:0.36.0 - https://github.com/iipc/jwarc)
* Objenesis (org.objenesis:objenesis:3.2 - http://objenesis.org/objenesis)
* org.roaringbitmap:RoaringBitmap (org.roaringbitmap:RoaringBitmap:1.0.0 - https://github.com/RoaringBitmap/RoaringBitmap)
* RRD4J (org.rrd4j:rrd4j:3.5 - https://github.com/rrd4j/rrd4j/)
* JSONassert (org.skyscreamer:jsonassert:1.5.3 - https://github.com/skyscreamer/JSONassert)
- * JCL 1.2 implemented over SLF4J (org.slf4j:jcl-over-slf4j:2.0.17 - http://www.slf4j.org)
- * Spring AOP (org.springframework:spring-aop:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring Beans (org.springframework:spring-beans:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring Context (org.springframework:spring-context:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring Context Support (org.springframework:spring-context-support:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring Core (org.springframework:spring-core:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring Expression Language (SpEL) (org.springframework:spring-expression:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring JDBC (org.springframework:spring-jdbc:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring Object/Relational Mapping (org.springframework:spring-orm:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring TestContext Framework (org.springframework:spring-test:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring Transaction (org.springframework:spring-tx:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring Web (org.springframework:spring-web:6.2.18 - https://github.com/spring-projects/spring-framework)
- * Spring Web MVC (org.springframework:spring-webmvc:6.2.18 - https://github.com/spring-projects/spring-framework)
- * spring-boot (org.springframework.boot:spring-boot:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-actuator (org.springframework.boot:spring-boot-actuator:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-actuator-autoconfigure (org.springframework.boot:spring-boot-actuator-autoconfigure:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-autoconfigure (org.springframework.boot:spring-boot-autoconfigure:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter (org.springframework.boot:spring-boot-starter:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-actuator (org.springframework.boot:spring-boot-starter-actuator:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-aop (org.springframework.boot:spring-boot-starter-aop:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-cache (org.springframework.boot:spring-boot-starter-cache:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-data-rest (org.springframework.boot:spring-boot-starter-data-rest:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-json (org.springframework.boot:spring-boot-starter-json:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-log4j2 (org.springframework.boot:spring-boot-starter-log4j2:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-security (org.springframework.boot:spring-boot-starter-security:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-test (org.springframework.boot:spring-boot-starter-test:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-thymeleaf (org.springframework.boot:spring-boot-starter-thymeleaf:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-tomcat (org.springframework.boot:spring-boot-starter-tomcat:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-starter-web (org.springframework.boot:spring-boot-starter-web:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-test (org.springframework.boot:spring-boot-test:3.5.14 - https://spring.io/projects/spring-boot)
- * spring-boot-test-autoconfigure (org.springframework.boot:spring-boot-test-autoconfigure:3.5.14 - https://spring.io/projects/spring-boot)
- * Spring Data Core (org.springframework.data:spring-data-commons:3.5.11 - https://spring.io/projects/spring-data)
- * Spring Data REST - Core (org.springframework.data:spring-data-rest-core:4.5.11 - https://www.spring.io/spring-data/spring-data-rest-parent/spring-data-rest-core)
- * Spring Data REST - WebMVC (org.springframework.data:spring-data-rest-webmvc:4.5.11 - https://www.spring.io/spring-data/spring-data-rest-parent/spring-data-rest-webmvc)
- * Spring HATEOAS (org.springframework.hateoas:spring-hateoas:2.5.2 - https://github.com/spring-projects/spring-hateoas)
- * spring-ldap-core (org.springframework.ldap:spring-ldap-core:3.3.7 - https://spring.io/projects/spring-ldap)
+ * JCL 1.2 implemented over SLF4J (org.slf4j:jcl-over-slf4j:2.0.18 - http://www.slf4j.org)
+ * Spring AOP (org.springframework:spring-aop:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring Beans (org.springframework:spring-beans:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring Context (org.springframework:spring-context:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring Context Support (org.springframework:spring-context-support:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring Core (org.springframework:spring-core:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring Expression Language (SpEL) (org.springframework:spring-expression:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring JDBC (org.springframework:spring-jdbc:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring Object/Relational Mapping (org.springframework:spring-orm:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring TestContext Framework (org.springframework:spring-test:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring Transaction (org.springframework:spring-tx:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring Web (org.springframework:spring-web:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * Spring Web MVC (org.springframework:spring-webmvc:6.2.19 - https://github.com/spring-projects/spring-framework)
+ * spring-boot (org.springframework.boot:spring-boot:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-actuator (org.springframework.boot:spring-boot-actuator:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-actuator-autoconfigure (org.springframework.boot:spring-boot-actuator-autoconfigure:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-autoconfigure (org.springframework.boot:spring-boot-autoconfigure:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter (org.springframework.boot:spring-boot-starter:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-actuator (org.springframework.boot:spring-boot-starter-actuator:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-aop (org.springframework.boot:spring-boot-starter-aop:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-cache (org.springframework.boot:spring-boot-starter-cache:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-data-rest (org.springframework.boot:spring-boot-starter-data-rest:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-json (org.springframework.boot:spring-boot-starter-json:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-log4j2 (org.springframework.boot:spring-boot-starter-log4j2:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-security (org.springframework.boot:spring-boot-starter-security:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-test (org.springframework.boot:spring-boot-starter-test:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-thymeleaf (org.springframework.boot:spring-boot-starter-thymeleaf:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-tomcat (org.springframework.boot:spring-boot-starter-tomcat:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-starter-web (org.springframework.boot:spring-boot-starter-web:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-test (org.springframework.boot:spring-boot-test:3.5.16 - https://spring.io/projects/spring-boot)
+ * spring-boot-test-autoconfigure (org.springframework.boot:spring-boot-test-autoconfigure:3.5.16 - https://spring.io/projects/spring-boot)
+ * Spring Data Core (org.springframework.data:spring-data-commons:3.5.13 - https://spring.io/projects/spring-data)
+ * Spring Data REST - Core (org.springframework.data:spring-data-rest-core:4.5.13 - https://www.spring.io/spring-data/spring-data-rest-parent/spring-data-rest-core)
+ * Spring Data REST - WebMVC (org.springframework.data:spring-data-rest-webmvc:4.5.13 - https://www.spring.io/spring-data/spring-data-rest-parent/spring-data-rest-webmvc)
+ * Spring HATEOAS (org.springframework.hateoas:spring-hateoas:2.5.3 - https://github.com/spring-projects/spring-hateoas)
+ * spring-ldap-core (org.springframework.ldap:spring-ldap-core:3.3.8 - https://spring.io/projects/spring-ldap)
* Spring Plugin - Core (org.springframework.plugin:spring-plugin-core:3.0.0 - https://github.com/spring-projects/spring-plugin/spring-plugin-core)
- * spring-security-config (org.springframework.security:spring-security-config:6.5.10 - https://spring.io/projects/spring-security)
- * spring-security-core (org.springframework.security:spring-security-core:6.5.10 - https://spring.io/projects/spring-security)
- * spring-security-crypto (org.springframework.security:spring-security-crypto:6.5.10 - https://spring.io/projects/spring-security)
- * spring-security-test (org.springframework.security:spring-security-test:6.5.10 - https://spring.io/projects/spring-security)
- * spring-security-web (org.springframework.security:spring-security-web:6.5.10 - https://spring.io/projects/spring-security)
+ * spring-security-config (org.springframework.security:spring-security-config:6.5.11 - https://spring.io/projects/spring-security)
+ * spring-security-core (org.springframework.security:spring-security-core:6.5.11 - https://spring.io/projects/spring-security)
+ * spring-security-crypto (org.springframework.security:spring-security-crypto:6.5.11 - https://spring.io/projects/spring-security)
+ * spring-security-test (org.springframework.security:spring-security-test:6.5.11 - https://spring.io/projects/spring-security)
+ * spring-security-web (org.springframework.security:spring-security-web:6.5.11 - https://spring.io/projects/spring-security)
* thymeleaf (org.thymeleaf:thymeleaf:3.1.5.RELEASE - http://www.thymeleaf.org/thymeleaf-lib/thymeleaf)
* thymeleaf-spring6 (org.thymeleaf:thymeleaf-spring6:3.1.5.RELEASE - http://www.thymeleaf.org/thymeleaf-lib/thymeleaf-spring6)
* unbescape (org.unbescape:unbescape:1.1.6.RELEASE - http://www.unbescape.org)
* snappy-java (org.xerial.snappy:snappy-java:1.1.10.1 - https://github.com/xerial/snappy-java)
* xml-matchers (org.xmlmatchers:xml-matchers:0.10 - http://code.google.com/p/xml-matchers/)
* org.xmlunit:xmlunit-core (org.xmlunit:xmlunit-core:2.10.4 - https://www.xmlunit.org/)
- * org.xmlunit:xmlunit-core (org.xmlunit:xmlunit-core:2.11.0 - https://www.xmlunit.org/)
+ * org.xmlunit:xmlunit-core (org.xmlunit:xmlunit-core:2.13.0 - https://www.xmlunit.org/)
* org.xmlunit:xmlunit-placeholders (org.xmlunit:xmlunit-placeholders:2.9.1 - https://www.xmlunit.org/xmlunit-placeholders/)
* SnakeYAML (org.yaml:snakeyaml:2.4 - https://bitbucket.org/snakeyaml/snakeyaml)
- * AWS Java SDK :: Annotations (software.amazon.awssdk:annotations:2.43.2 - https://aws.amazon.com/sdkforjava/core/annotations)
- * AWS Java SDK :: Arns (software.amazon.awssdk:arns:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Auth (software.amazon.awssdk:auth:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: AWS Core (software.amazon.awssdk:aws-core:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Core :: Protocols :: AWS Query Protocol (software.amazon.awssdk:aws-query-protocol:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Core :: Protocols :: AWS Xml Protocol (software.amazon.awssdk:aws-xml-protocol:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Checksums (software.amazon.awssdk:checksums:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Checksums SPI (software.amazon.awssdk:checksums-spi:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: AWS CRT Core (software.amazon.awssdk:crt-core:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Endpoints SPI (software.amazon.awssdk:endpoints-spi:2.43.2 - https://aws.amazon.com/sdkforjava/core/endpoints-spi)
- * AWS Java SDK :: HTTP Auth (software.amazon.awssdk:http-auth:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: HTTP Auth AWS (software.amazon.awssdk:http-auth-aws:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: HTTP Auth Event Stream (software.amazon.awssdk:http-auth-aws-eventstream:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: HTTP Auth SPI (software.amazon.awssdk:http-auth-spi:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: HTTP Client Interface (software.amazon.awssdk:http-client-spi:2.43.2 - https://aws.amazon.com/sdkforjava/http-client-spi)
- * AWS Java SDK :: Identity SPI (software.amazon.awssdk:identity-spi:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Core :: Protocols :: Json Utils (software.amazon.awssdk:json-utils:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Metrics SPI (software.amazon.awssdk:metrics-spi:2.43.2 - https://aws.amazon.com/sdkforjava/core/metrics-spi)
- * AWS Java SDK :: Profiles (software.amazon.awssdk:profiles:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Core :: Protocols :: Protocol Core (software.amazon.awssdk:protocol-core:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Regions (software.amazon.awssdk:regions:2.43.2 - https://aws.amazon.com/sdkforjava/core/regions)
- * AWS Java SDK :: Retries (software.amazon.awssdk:retries:2.43.2 - https://aws.amazon.com/sdkforjava/core/retries)
- * AWS Java SDK :: Retries API (software.amazon.awssdk:retries-spi:2.43.2 - https://aws.amazon.com/sdkforjava/core/retries-spi)
- * AWS Java SDK :: Services :: Amazon S3 (software.amazon.awssdk:s3:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: SDK Core (software.amazon.awssdk:sdk-core:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Third Party :: Jackson-core (software.amazon.awssdk:third-party-jackson-core:2.43.2 - https://aws.amazon.com/sdkforjava)
- * AWS Java SDK :: Utilities (software.amazon.awssdk:utils:2.43.2 - https://aws.amazon.com/sdkforjava/utils)
- * AWS Java SDK :: Utils Lite (software.amazon.awssdk:utils-lite:2.43.2 - https://aws.amazon.com/sdkforjava)
- * software.amazon.awssdk.crt:aws-crt (software.amazon.awssdk.crt:aws-crt:0.45.2 - https://github.com/awslabs/aws-crt-java)
+ * AWS Java SDK :: Annotations (software.amazon.awssdk:annotations:2.49.4 - https://aws.amazon.com/sdkforjava/core/annotations)
+ * AWS Java SDK :: Arns (software.amazon.awssdk:arns:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Auth (software.amazon.awssdk:auth:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: AWS Core (software.amazon.awssdk:aws-core:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Core :: Protocols :: AWS Query Protocol (software.amazon.awssdk:aws-query-protocol:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Core :: Protocols :: AWS Xml Protocol (software.amazon.awssdk:aws-xml-protocol:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Checksums (software.amazon.awssdk:checksums:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Checksums SPI (software.amazon.awssdk:checksums-spi:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: AWS CRT Core (software.amazon.awssdk:crt-core:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Endpoints SPI (software.amazon.awssdk:endpoints-spi:2.49.4 - https://aws.amazon.com/sdkforjava/core/endpoints-spi)
+ * AWS Java SDK :: HTTP Auth (software.amazon.awssdk:http-auth:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: HTTP Auth AWS (software.amazon.awssdk:http-auth-aws:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: HTTP Auth Event Stream (software.amazon.awssdk:http-auth-aws-eventstream:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: HTTP Auth SPI (software.amazon.awssdk:http-auth-spi:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: HTTP Client Interface (software.amazon.awssdk:http-client-spi:2.49.4 - https://aws.amazon.com/sdkforjava/http-client-spi)
+ * AWS Java SDK :: Identity SPI (software.amazon.awssdk:identity-spi:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Core :: Protocols :: Json Utils (software.amazon.awssdk:json-utils:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Metrics SPI (software.amazon.awssdk:metrics-spi:2.49.4 - https://aws.amazon.com/sdkforjava/core/metrics-spi)
+ * AWS Java SDK :: Profiles (software.amazon.awssdk:profiles:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Core :: Protocols :: Protocol Core (software.amazon.awssdk:protocol-core:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Regions (software.amazon.awssdk:regions:2.49.4 - https://aws.amazon.com/sdkforjava/core/regions)
+ * AWS Java SDK :: Retries (software.amazon.awssdk:retries:2.49.4 - https://aws.amazon.com/sdkforjava/core/retries)
+ * AWS Java SDK :: Retries API (software.amazon.awssdk:retries-spi:2.49.4 - https://aws.amazon.com/sdkforjava/core/retries-spi)
+ * AWS Java SDK :: Services :: Amazon S3 (software.amazon.awssdk:s3:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: SDK Core (software.amazon.awssdk:sdk-core:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Third Party :: Jackson-core (software.amazon.awssdk:third-party-jackson-core:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * AWS Java SDK :: Utilities (software.amazon.awssdk:utils:2.49.4 - https://aws.amazon.com/sdkforjava/utils)
+ * AWS Java SDK :: Utils Lite (software.amazon.awssdk:utils-lite:2.49.4 - https://aws.amazon.com/sdkforjava)
+ * software.amazon.awssdk.crt:aws-crt (software.amazon.awssdk.crt:aws-crt:0.48.1 - https://github.com/awslabs/aws-crt-java)
* AWS Event Stream (software.amazon.eventstream:eventstream:1.0.1 - https://github.com/awslabs/aws-eventstream-java)
- * Xerces2-j (xerces:xercesImpl:2.12.2 - https://xerces.apache.org/xerces2-j/)
-
- BSD 2-Clause License:
-
- * zstd-jni (com.github.luben:zstd-jni:1.5.7-4 - https://github.com/luben/zstd-jni)
BSD License:
@@ -490,15 +488,15 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* Protocol Buffers [Core] (com.google.protobuf:protobuf-java:3.24.3 - https://developers.google.com/protocol-buffers/protobuf-java/)
* JZlib (com.jcraft:jzlib:1.1.3 - http://www.jcraft.com/jzlib/)
* jmustache (com.samskivert:jmustache:1.15 - http://github.com/samskivert/jmustache)
- * dnsjava (dnsjava:dnsjava:3.6.4 - https://github.com/dnsjava/dnsjava)
- * jaxen (jaxen:jaxen:2.0.1 - https://jaxen-xpath.github.io/jaxen/jaxen/)
+ * dnsjava (dnsjava:dnsjava:3.6.5 - https://github.com/dnsjava/dnsjava)
+ * jaxen (jaxen:jaxen:2.0.6 - https://jaxen-xpath.github.io/jaxen/jaxen/)
* ANTLR 4 Runtime (org.antlr:antlr4-runtime:4.13.2 - https://www.antlr.org/antlr4-runtime/)
* commons-compiler (org.codehaus.janino:commons-compiler:3.1.8 - http://janino-compiler.github.io/commons-compiler/)
* janino (org.codehaus.janino:janino:3.1.8 - http://janino-compiler.github.io/janino/)
* Stax2 API (org.codehaus.woodstox:stax2-api:4.2.1 - http://github.com/FasterXML/stax2-api)
* Hamcrest Date (org.exparity:hamcrest-date:2.0.8 - https://github.com/exparity/hamcrest-date)
- * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
- * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
+ * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
+ * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
* jersey-media-multipart (org.glassfish.jersey.media:jersey-media-multipart:3.1.3 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-media-multipart)
* Hamcrest (org.hamcrest:hamcrest:2.2 - http://hamcrest.org/JavaHamcrest/)
* Hamcrest Core (org.hamcrest:hamcrest-core:2.2 - http://hamcrest.org/JavaHamcrest/)
@@ -508,7 +506,7 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* asm-analysis (org.ow2.asm:asm-analysis:8.0.1 - http://asm.ow2.io/)
* asm-commons (org.ow2.asm:asm-commons:8.0.1 - http://asm.ow2.io/)
* asm-tree (org.ow2.asm:asm-tree:8.0.1 - http://asm.ow2.io/)
- * PostgreSQL JDBC Driver (org.postgresql:postgresql:42.7.11 - https://jdbc.postgresql.org)
+ * PostgreSQL JDBC Driver (org.postgresql:postgresql:42.7.13 - https://jdbc.postgresql.org)
* Reflections (org.reflections:reflections:0.9.12 - http://github.com/ronmamo/reflections)
* JMatIO (org.tallison:jmatio:1.5 - https://github.com/tballison/jmatio)
* XZ for Java (org.tukaani:xz:1.12 - https://tukaani.org/xz/java.html)
@@ -534,8 +532,8 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* HK2 Implementation Utilities (org.glassfish.hk2:hk2-utils:3.0.6 - https://github.com/eclipse-ee4j/glassfish-hk2/hk2-utils)
* OSGi resource locator (org.glassfish.hk2:osgi-resource-locator:1.0.3 - https://projects.eclipse.org/projects/ee4j/osgi-resource-locator)
* aopalliance version 1.0 repackaged as a module (org.glassfish.hk2.external:aopalliance-repackaged:3.0.6 - https://github.com/eclipse-ee4j/glassfish-hk2/external/aopalliance-repackaged)
- * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
- * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
+ * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
+ * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
* jersey-media-multipart (org.glassfish.jersey.media:jersey-media-multipart:3.1.3 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-media-multipart)
Cordra (Version 2) License Agreement:
@@ -556,11 +554,11 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* Jakarta XML Binding API (jakarta.xml.bind:jakarta.xml.bind-api:4.0.5 - https://github.com/jakartaee/jaxb-api/jakarta.xml.bind-api)
* Angus Activation Registries (org.eclipse.angus:angus-activation:2.0.3 - https://github.com/eclipse-ee4j/angus-activation/angus-activation)
* Angus Mail default provider (org.eclipse.angus:jakarta.mail:2.0.5 - http://eclipse-ee4j.github.io/angus-mail/jakarta.mail)
- * JAXB Core (org.glassfish.jaxb:jaxb-core:4.0.8 - https://eclipse-ee4j.github.io/jaxb-ri/)
- * JAXB Runtime (org.glassfish.jaxb:jaxb-runtime:4.0.8 - https://eclipse-ee4j.github.io/jaxb-ri/)
- * TXW2 Runtime (org.glassfish.jaxb:txw2:4.0.8 - https://eclipse-ee4j.github.io/jaxb-ri/)
- * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
- * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
+ * JAXB Core (org.glassfish.jaxb:jaxb-core:4.0.9 - https://eclipse-ee4j.github.io/jaxb-ri/)
+ * JAXB Runtime (org.glassfish.jaxb:jaxb-runtime:4.0.9 - https://eclipse-ee4j.github.io/jaxb-ri/)
+ * TXW2 Runtime (org.glassfish.jaxb:txw2:4.0.9 - https://eclipse-ee4j.github.io/jaxb-ri/)
+ * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
+ * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
* jersey-media-multipart (org.glassfish.jersey.media:jersey-media-multipart:3.1.3 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-media-multipart)
* MIME streaming extension (org.jvnet.mimepull:mimepull:1.9.15 - https://github.com/eclipse-ee4j/metro-mimepull)
* org.locationtech.jts:jts-core (org.locationtech.jts:jts-core:1.19.0 - https://www.locationtech.org/projects/technology.jts/jts-modules/jts-core)
@@ -623,9 +621,9 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* HK2 Implementation Utilities (org.glassfish.hk2:hk2-utils:3.0.6 - https://github.com/eclipse-ee4j/glassfish-hk2/hk2-utils)
* OSGi resource locator (org.glassfish.hk2:osgi-resource-locator:1.0.3 - https://projects.eclipse.org/projects/ee4j/osgi-resource-locator)
* aopalliance version 1.0 repackaged as a module (org.glassfish.hk2.external:aopalliance-repackaged:3.0.6 - https://github.com/eclipse-ee4j/glassfish-hk2/external/aopalliance-repackaged)
- * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
- * jersey-core-common (org.glassfish.jersey.core:jersey-common:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-common)
- * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
+ * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
+ * jersey-core-common (org.glassfish.jersey.core:jersey-common:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-common)
+ * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
* jersey-media-multipart (org.glassfish.jersey.media:jersey-media-multipart:3.1.3 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-media-multipart)
* org.locationtech.jts:jts-core (org.locationtech.jts:jts-core:1.19.0 - https://www.locationtech.org/projects/technology.jts/jts-modules/jts-core)
* org.locationtech.jts.io:jts-io-common (org.locationtech.jts.io:jts-io-common:1.19.0 - https://www.locationtech.org/projects/technology.jts/jts-modules/jts-io/jts-io-common)
@@ -648,7 +646,6 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
* msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
* uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
- * FindBugs-Annotations (com.google.code.findbugs:annotations:3.0.1u2 - http://findbugs.sourceforge.net/)
* JHighlight (org.codelibs:jhighlight:1.1.1 - https://github.com/codelibs/jhighlight)
* Hibernate Commons Annotations (org.hibernate.common:hibernate-commons-annotations:6.0.6.Final - http://hibernate.org)
* Hibernate ORM - hibernate-core (org.hibernate.orm:hibernate-core:6.4.10.Final - https://hibernate.org/orm)
@@ -656,7 +653,7 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* Hibernate ORM - hibernate-jpamodelgen (org.hibernate.orm:hibernate-jpamodelgen:6.4.10.Final - https://hibernate.org/orm)
* im4java (org.im4java:im4java:1.4.0 - http://sourceforge.net/projects/im4java/)
* Javassist (org.javassist:javassist:3.30.2-GA - https://www.javassist.org/)
- * XOM (xom:xom:1.4.1 - https://xom.nu)
+ * XOM (xom:xom:1.4.6 - https://xom.nu)
Go License:
@@ -682,21 +679,21 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* DigitalCollections: IIIF API Library (de.digitalcollections.iiif:iiif-apis:0.3.11 - https://github.com/dbmdz/iiif-apis)
* ClassGraph (io.github.classgraph:classgraph:4.8.165 - https://github.com/classgraph/classgraph)
* JOpt Simple (net.sf.jopt-simple:jopt-simple:5.0.4 - http://jopt-simple.github.io/jopt-simple)
- * Bouncy Castle JavaMail Jakarta S/MIME APIs (org.bouncycastle:bcjmail-jdk18on:1.83 - https://www.bouncycastle.org/download/bouncy-castle-java/)
+ * Bouncy Castle JavaMail Jakarta S/MIME APIs (org.bouncycastle:bcjmail-jdk18on:1.85 - https://www.bouncycastle.org/download/bouncy-castle-java/)
* Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs (org.bouncycastle:bcpkix-jdk18on:1.81 - https://www.bouncycastle.org/download/bouncy-castle-java/)
* Bouncy Castle Provider (org.bouncycastle:bcprov-jdk18on:1.81 - https://www.bouncycastle.org/download/bouncy-castle-java/)
* Bouncy Castle ASN.1 Extension and Utility APIs (org.bouncycastle:bcutil-jdk18on:1.81 - https://www.bouncycastle.org/download/bouncy-castle-java/)
* org.brotli:dec (org.brotli:dec:0.1.2 - http://brotli.org/dec)
* Checker Qual (org.checkerframework:checker-qual:3.23.0 - https://checkerframework.org)
- * Checker Qual (org.checkerframework:checker-qual:3.37.0 - https://checkerframework.org/)
- * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
- * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
+ * Checker Qual (org.checkerframework:checker-qual:3.55.1 - https://checkerframework.org/)
+ * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
+ * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
* jersey-media-multipart (org.glassfish.jersey.media:jersey-media-multipart:3.1.3 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-media-multipart)
- * jsoup Java HTML Parser (org.jsoup:jsoup:1.22.1 - https://jsoup.org/)
+ * jsoup Java HTML Parser (org.jsoup:jsoup:1.22.2 - https://jsoup.org/)
* mockito-core (org.mockito:mockito-core:3.12.4 - https://github.com/mockito/mockito)
* mockito-inline (org.mockito:mockito-inline:3.12.4 - https://github.com/mockito/mockito)
* Duct Tape (org.rnorth.duct-tape:duct-tape:1.0.8 - https://github.com/rnorth/duct-tape)
- * SLF4J API Module (org.slf4j:slf4j-api:2.0.17 - http://www.slf4j.org)
+ * SLF4J API Module (org.slf4j:slf4j-api:2.0.18 - http://www.slf4j.org)
* Testcontainers Core (org.testcontainers:testcontainers:2.0.5 - https://java.testcontainers.org)
* HAL Browser (org.webjars:hal-browser:ad9b865 - http://webjars.org)
* toastr (org.webjars.bowergithub.codeseven:toastr:2.1.4 - http://webjars.org)
@@ -716,15 +713,15 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
* juniversalchardet (com.github.albfernandez:juniversalchardet:2.5.0 - https://github.com/albfernandez/juniversalchardet)
* H2 Database Engine (com.h2database:h2:2.4.240 - https://h2database.com)
- * Saxon-HE (net.sf.saxon:Saxon-HE:9.9.1-8 - http://www.saxonica.com/)
+ * Saxon-HE (net.sf.saxon:Saxon-HE:12.9 - http://www.saxonica.com/)
* Javassist (org.javassist:javassist:3.30.2-GA - https://www.javassist.org/)
* Mozilla Rhino (org.mozilla:rhino:1.7.7.2 - https://developer.mozilla.org/en/Rhino)
Public Domain:
- * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
- * jersey-core-common (org.glassfish.jersey.core:jersey-common:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-common)
- * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
+ * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
+ * jersey-core-common (org.glassfish.jersey.core:jersey-common:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-common)
+ * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
* jersey-media-multipart (org.glassfish.jersey.media:jersey-media-multipart:3.1.3 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-media-multipart)
* HdrHistogram (org.hdrhistogram:HdrHistogram:2.2.2 - http://hdrhistogram.github.io/HdrHistogram/)
* JSON in Java (org.json:json:20231013 - https://github.com/douglascrockford/JSON-java)
@@ -737,7 +734,7 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
UnRar License:
- * Java Unrar (com.github.junrar:junrar:7.5.8 - https://github.com/junrar/junrar)
+ * Java Unrar (com.github.junrar:junrar:7.6.0 - https://github.com/junrar/junrar)
Unicode/ICU License:
@@ -745,12 +742,12 @@ https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines
W3C license:
- * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
- * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
+ * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
+ * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
* jersey-media-multipart (org.glassfish.jersey.media:jersey-media-multipart:3.1.3 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-media-multipart)
jQuery license:
- * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
- * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.11 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
+ * jersey-core-client (org.glassfish.jersey.core:jersey-client:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/jersey-client)
+ * jersey-inject-hk2 (org.glassfish.jersey.inject:jersey-hk2:3.1.12 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-hk2)
* jersey-media-multipart (org.glassfish.jersey.media:jersey-media-multipart:3.1.3 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-media-multipart)
diff --git a/checkstyle.xml b/checkstyle.xml
index 36d2b15bd89e..8cf9605662d8 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -152,6 +152,41 @@ For more information on CheckStyle configurations below, see: http://checkstyle.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dspace-api/pom.xml b/dspace-api/pom.xml
index 261926c0e76c..b6d3254ed72d 100644
--- a/dspace-api/pom.xml
+++ b/dspace-api/pom.xml
@@ -12,7 +12,7 @@
org.dspace
dspace-parent
- 8.4
+ 8.5
..
@@ -353,7 +353,7 @@
${ehcache.version}
+ Caching dependencies for Open Policy Finder service. -->
org.springframework.boot
spring-boot-starter-cache
@@ -436,6 +436,13 @@
org.apache.jena
apache-jena-libs
pom
+
+
+
+ org.checkerframework
+ checker-qual
+
+
commons-cli
@@ -632,7 +639,7 @@
dnsjava
dnsjava
- 3.6.4
+ 3.6.5
@@ -677,16 +684,6 @@
${flyway.version}
-
-
- com.google.code.findbugs
- jsr305
-
-
- com.google.code.findbugs
- annotations
-
-
jakarta.inject
jakarta.inject-api
@@ -720,7 +717,7 @@
software.amazon.awssdk
s3
- 2.43.2
+ 2.49.4
software.amazon.awssdk
@@ -730,13 +727,21 @@
software.amazon.awssdk
apache-client
+
+
+ software.amazon.awssdk
+ apache5-client
+
software.amazon.awssdk.crt
aws-crt
- 0.45.2
+ 0.48.1
-
+
+
-
-
-
+
+
+
-
+
-
-
-
-
-
+
+
+
+
Journal
-
-
-
+
+
+
Journal
-
-
-
+
+
+
OrgUnit
diff --git a/dspace-api/src/test/data/dspaceFolder/config/spring/api/sherpa.xml b/dspace-api/src/test/data/dspaceFolder/config/spring/api/openpolicyfinder.xml
similarity index 50%
rename from dspace-api/src/test/data/dspaceFolder/config/spring/api/sherpa.xml
rename to dspace-api/src/test/data/dspaceFolder/config/spring/api/openpolicyfinder.xml
index 206326f3db70..f44cee6fb769 100644
--- a/dspace-api/src/test/data/dspaceFolder/config/spring/api/sherpa.xml
+++ b/dspace-api/src/test/data/dspaceFolder/config/spring/api/openpolicyfinder.xml
@@ -10,19 +10,19 @@
-
+
-
diff --git a/dspace-oai/src/test/java/org/dspace/xoai/tests/integration/xoai/PipelineTest.java b/dspace-oai/src/test/java/org/dspace/xoai/tests/integration/xoai/PipelineTest.java
index 0f7ffde0bd00..4707334fab03 100644
--- a/dspace-oai/src/test/java/org/dspace/xoai/tests/integration/xoai/PipelineTest.java
+++ b/dspace-oai/src/test/java/org/dspace/xoai/tests/integration/xoai/PipelineTest.java
@@ -19,16 +19,16 @@
import com.lyncode.xoai.util.XSLPipeline;
import org.apache.commons.io.IOUtils;
+import org.dspace.app.util.XMLUtils;
import org.dspace.xoai.tests.support.XmlMatcherBuilder;
import org.junit.Test;
public class PipelineTest {
- private static TransformerFactory factory = TransformerFactory.newInstance();
-
@Test
public void pipelineTest() throws Exception {
InputStream input = PipelineTest.class.getClassLoader().getResourceAsStream("item.xml");
InputStream xslt = PipelineTest.class.getClassLoader().getResourceAsStream("oai_dc.xsl");
+ TransformerFactory factory = XMLUtils.getTransformerFactory();
String output = IOUtils.toString(new XSLPipeline(input, true)
.apply(factory.newTemplates(new StreamSource(xslt)))
.getTransformed(), Charset.defaultCharset());
diff --git a/dspace-oai/src/test/java/org/dspace/xoai/tests/stylesheets/AbstractXSLTest.java b/dspace-oai/src/test/java/org/dspace/xoai/tests/stylesheets/AbstractXSLTest.java
index 42dbed04b63b..75b725e108aa 100644
--- a/dspace-oai/src/test/java/org/dspace/xoai/tests/stylesheets/AbstractXSLTest.java
+++ b/dspace-oai/src/test/java/org/dspace/xoai/tests/stylesheets/AbstractXSLTest.java
@@ -17,12 +17,9 @@
import javax.xml.transform.stream.StreamSource;
import org.apache.commons.io.IOUtils;
+import org.dspace.app.util.XMLUtils;
public abstract class AbstractXSLTest {
- // Requires usage of Saxon as OAI-PMH uses some XSLT 2 functions
- private static final TransformerFactory factory = TransformerFactory
- .newInstance("net.sf.saxon.TransformerFactoryImpl", null);
-
protected TransformBuilder apply(String xslLocation) throws Exception {
return new TransformBuilder(xslLocation);
}
@@ -44,8 +41,16 @@ public static class TransformBuilder {
private final Transformer transformer;
public TransformBuilder(String xslLocation) throws Exception {
+ File inputFile = new File("../dspace/config/crosswalks/oai/metadataFormats", xslLocation);
+ String inputFileDir = inputFile.toPath().normalize().getParent().toString();
+
+ // Requires usage of Saxon as OAI-PMH uses some XSLT 2 functions. Only trust stylesheets stored under
+ // the same directory as the given XSL.
+ TransformerFactory factory = XMLUtils.getTrustedTransformerFactory("net.sf.saxon.TransformerFactoryImpl",
+ new String[] {inputFileDir});
+
this.transformer = factory.newTransformer(
- new StreamSource(new File("../dspace/config/crosswalks/oai/metadataFormats", xslLocation)));
+ new StreamSource(inputFile));
}
public String to(InputStream input) throws Exception {
diff --git a/dspace-rdf/pom.xml b/dspace-rdf/pom.xml
index db24b3995688..4b5675d65623 100644
--- a/dspace-rdf/pom.xml
+++ b/dspace-rdf/pom.xml
@@ -9,7 +9,7 @@
org.dspace
dspace-parent
- 8.4
+ 8.5
..
@@ -24,25 +24,10 @@
org.apache.jena
apache-jena-libs
+
- jackson-core
- com.fasterxml.jackson.core
-
-
- jackson-databind
- com.fasterxml.jackson.core
-
-
- org.slf4j
- slf4j-api
-
-
- org.slf4j
- slf4j-log4j12
-
-
- log4j
- log4j
+ org.checkerframework
+ checker-qual
pom
diff --git a/dspace-server-webapp/pom.xml b/dspace-server-webapp/pom.xml
index 3f226327fb94..e6d251abe9c5 100644
--- a/dspace-server-webapp/pom.xml
+++ b/dspace-server-webapp/pom.xml
@@ -14,7 +14,7 @@
org.dspace
dspace-parent
- 8.4
+ 8.5
..
@@ -588,7 +588,7 @@
org.apache.httpcomponents.client5
httpclient5
- 5.6.1
+ 5.6.4
test
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/CollectionItemTemplateController.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/CollectionItemTemplateController.java
index 66a3965d869e..c7dc746eafe8 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/CollectionItemTemplateController.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/CollectionItemTemplateController.java
@@ -16,8 +16,8 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.servlet.http.HttpServletRequest;
-import jakarta.ws.rs.BadRequestException;
import org.dspace.app.rest.converter.ConverterService;
+import org.dspace.app.rest.exception.DSpaceBadRequestException;
import org.dspace.app.rest.exception.UnprocessableEntityException;
import org.dspace.app.rest.model.CollectionRest;
import org.dspace.app.rest.model.TemplateItemRest;
@@ -106,7 +106,8 @@ public ResponseEntity> createTemplateItem(HttpServletRequ
throws SQLException, AuthorizeException {
if (itemBody == null) {
- throw new BadRequestException("The new item should be included as json in the body of this request");
+ throw new DSpaceBadRequestException(
+ "The new item should be included as json in the body of this request");
}
Context context = ContextUtil.obtainContext(request);
@@ -143,7 +144,7 @@ public ResponseEntity> createTemplateItem(HttpServletRequ
* @return The template item from the Collection in the request
* @throws SQLException
*/
- @PreAuthorize("hasPermission(#uuid, 'COLLECTION', 'READ')")
+ @PreAuthorize("hasPermission(#uuid, 'COLLECTION', 'ADD')")
@RequestMapping(method = RequestMethod.GET)
public TemplateItemResource getTemplateItem(HttpServletRequest request, @PathVariable UUID uuid)
throws SQLException {
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/ExternalSourcesRestController.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/ExternalSourcesRestController.java
index 357ea409c0f6..0c8862527ea7 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/ExternalSourcesRestController.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/ExternalSourcesRestController.java
@@ -17,6 +17,7 @@
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PagedResourcesAssembler;
import org.springframework.hateoas.PagedModel;
+import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -54,6 +55,7 @@ public class ExternalSourcesRestController {
* @return A paginated list of ExternalSourceEntryResource objects that comply with the params
*/
@RequestMapping(method = RequestMethod.GET, value = "/entries")
+ @PreAuthorize("hasAuthority('AUTHENTICATED')")
public PagedModel getExternalSourceEntries(
@PathVariable("externalSourceName") String externalSourceName,
@RequestParam(name = "query") String query,
@@ -81,6 +83,7 @@ public PagedModel getExternalSourceEntries(
* @return An ExternalSourceEntryResource that complies with the above params
*/
@RequestMapping(method = RequestMethod.GET, value = "/entryValues/{entryId}")
+ @PreAuthorize("hasAuthority('AUTHENTICATED')")
public ExternalSourceEntryResource getExternalSourceEntryValue(@PathVariable("externalSourceName") String
externalSourceName,
@PathVariable("entryId") String entryId) {
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/OpenSearchController.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/OpenSearchController.java
index 85ec441e20c1..760bf7946082 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/OpenSearchController.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/OpenSearchController.java
@@ -14,7 +14,6 @@
import java.util.Map;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
@@ -26,6 +25,7 @@
import org.dspace.app.rest.utils.ContextUtil;
import org.dspace.app.rest.utils.ScopeResolver;
import org.dspace.app.util.SyndicationFeed;
+import org.dspace.app.util.XMLUtils;
import org.dspace.app.util.factory.UtilServiceFactory;
import org.dspace.app.util.service.OpenSearchService;
import org.dspace.core.Context;
@@ -205,7 +205,7 @@ public void search(HttpServletRequest request,
(int) qResults.getTotalSearchResults(), qResults.getStart(),
qResults.getMaxResults(), container, dsoResults, labelMap);
try {
- Transformer xf = TransformerFactory.newInstance().newTransformer();
+ Transformer xf = XMLUtils.getTransformerFactory().newTransformer();
response.setContentType(openSearchService.getContentType(format));
xf.transform(new DOMSource(resultsDoc),
new StreamResult(response.getWriter()));
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/health/SEOHealthIndicator.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/health/SEOHealthIndicator.java
index 5b57f2d537fc..cf5634a2c2db 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/health/SEOHealthIndicator.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/health/SEOHealthIndicator.java
@@ -7,9 +7,11 @@
*/
package org.dspace.app.rest.health;
+import static org.dspace.app.rest.configuration.ActuatorConfiguration.UP_WITH_ISSUES_STATUS;
+
import org.apache.commons.lang3.StringUtils;
import org.dspace.services.ConfigurationService;
-import org.dspace.services.factory.DSpaceServicesFactory;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health;
import org.springframework.web.client.RestTemplate;
@@ -22,9 +24,26 @@
*/
public class SEOHealthIndicator extends AbstractHealthIndicator {
- ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService();
+ public static final String SITEMAP = "sitemap";
+ public static final String ROBOTS_TXT = "robots.txt";
+ public static final String SSR = "ssr";
+ public static final String OK = "OK";
+ public static final String SITEMAP_MISSING = "Sitemaps are missing or inaccessible. Please see the " +
+ "DSpace Documentation on Search Engine Optimization for how to enable " +
+ "Sitemaps.";
+ public static final String ROBOTS_MISSING = "Missing or inaccessible. Please see the DSpace Documentation on " +
+ "Search Engine Optimization for how to create a robots.txt.";
+ public static final String ROBOTS_INVALID = "Invalid because it contains localhost URLs. This is often a sign " +
+ "that a proxy is failing to pass X-Forwarded headers to DSpace. Please see the DSpace " +
+ "Documentation on Search Engine Optimization for how to pass X-Forwarded headers.";
+ public static final String SSR_DISABLED = "Server-side rendering (SSR) appears to be disabled. Most " +
+ "search engines require enabling SSR for proper indexing. Please see the DSpace Documentation on" +
+ " Search Engine Optimization for more details.";
+
+ @Autowired
+ private ConfigurationService configurationService;
- private final RestTemplate restTemplate = new RestTemplate();
+ private RestTemplate restTemplate = new RestTemplate();
@Override
protected void doHealthCheck(Health.Builder builder) {
@@ -36,27 +55,21 @@ protected void doHealthCheck(Health.Builder builder) {
if (sitemapOk && robotsTxtStatus == RobotsTxtStatus.VALID && ssrOk) {
builder.up()
- .withDetail("sitemap", "OK")
- .withDetail("robots.txt", "OK")
- .withDetail("ssr", "OK");
+ .withDetail(SITEMAP, OK)
+ .withDetail(ROBOTS_TXT, OK)
+ .withDetail(SSR, OK);
} else {
- builder.down();
- builder.withDetail("sitemap", sitemapOk ? "OK" : "Sitemaps are missing or inaccessible. Please see the " +
- "DSpace Documentation on Search Engine Optimization for how to enable Sitemaps.");
+ builder.status(UP_WITH_ISSUES_STATUS)
+ .withDetail(SITEMAP, sitemapOk ? OK : SITEMAP_MISSING);
if (robotsTxtStatus == RobotsTxtStatus.MISSING) {
- builder.withDetail("robots.txt", "Missing or inaccessible. Please see the DSpace Documentation on " +
- "Search Engine Optimization for how to create a robots.txt.");
+ builder.withDetail(ROBOTS_TXT, ROBOTS_MISSING);
} else if (robotsTxtStatus == RobotsTxtStatus.INVALID) {
- builder.withDetail("robots.txt", "Invalid because it contains localhost URLs. This is often a sign " +
- "that a proxy is failing to pass X-Forwarded headers to DSpace. Please see the DSpace " +
- "Documentation on Search Engine Optimization for how to pass X-Forwarded headers.");
+ builder.withDetail(ROBOTS_TXT, ROBOTS_INVALID);
} else {
- builder.withDetail("robots.txt", "OK");
+ builder.withDetail(ROBOTS_TXT, OK);
}
- builder.withDetail("ssr", ssrOk ? "OK" : "Server-side rendering (SSR) appears to be disabled. Most " +
- "search engines require enabling SSR for proper indexing. Please see the DSpace Documentation on" +
- " Search Engine Optimization for more details.");
+ builder.withDetail(SSR, ssrOk ? OK : SSR_DISABLED);
}
}
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/login/impl/ResearcherProfileAutomaticClaim.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/login/impl/ResearcherProfileAutomaticClaim.java
index 8521da970b27..2244e706ea69 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/login/impl/ResearcherProfileAutomaticClaim.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/login/impl/ResearcherProfileAutomaticClaim.java
@@ -10,6 +10,7 @@
import static org.apache.commons.collections4.IteratorUtils.toList;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.dspace.content.authority.Choices.CF_ACCEPTED;
+import static org.dspace.core.Constants.WRITE;
import java.sql.SQLException;
import java.util.List;
@@ -22,6 +23,7 @@
import org.apache.logging.log4j.Logger;
import org.dspace.app.rest.login.PostLoggedInAction;
import org.dspace.authorize.AuthorizeException;
+import org.dspace.authorize.service.AuthorizeService;
import org.dspace.content.Item;
import org.dspace.content.MetadataFieldName;
import org.dspace.content.service.ItemService;
@@ -54,6 +56,9 @@ public class ResearcherProfileAutomaticClaim implements PostLoggedInAction {
@Autowired
private EPersonService ePersonService;
+ @Autowired
+ private AuthorizeService authorizeService;
+
/**
* The field of the eperson to search for.
*/
@@ -104,6 +109,7 @@ private void claimProfile(Context context, EPerson currentUser) throws SQLExcept
if (item != null) {
itemService.addMetadata(context, item, "dspace", "object", "owner",
null, fullName, id.toString(), CF_ACCEPTED);
+ authorizeService.addPolicy(context, item, WRITE, currentUser);
}
}
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/RegistrationRest.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/RegistrationRest.java
index eb7c58a18cba..9eef047f11dd 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/RegistrationRest.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/RegistrationRest.java
@@ -10,9 +10,10 @@
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.validation.constraints.Email;
+import jakarta.validation.constraints.NotEmpty;
import org.dspace.app.rest.RestResourceController;
-
/**
* This class acts as the REST representation of the RegistrationData model class.
* This class acts as a data holder for the RegistrationResource
@@ -24,7 +25,10 @@ public class RegistrationRest extends RestAddressableModel {
public static final String PLURAL_NAME = "registrations";
public static final String CATEGORY = EPERSON;
+ @Email
+ @NotEmpty
private String email;
+
private UUID user;
/**
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/step/SherpaPolicy.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/step/OpenPolicyFinderPolicy.java
similarity index 55%
rename from dspace-server-webapp/src/main/java/org/dspace/app/rest/model/step/SherpaPolicy.java
rename to dspace-server-webapp/src/main/java/org/dspace/app/rest/model/step/OpenPolicyFinderPolicy.java
index 1f6bd07c2af1..08e0e9441498 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/step/SherpaPolicy.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/step/OpenPolicyFinderPolicy.java
@@ -9,20 +9,20 @@
import java.util.Date;
-import org.dspace.app.sherpa.v2.SHERPAResponse;
+import org.dspace.app.openpolicyfinder.v2.OpenPolicyFinderResponse;
/**
- * Java Bean to expose Sherpa policies during in progress submission.
+ * Java Bean to expose Open Policy Finder policies during in progress submission.
*
* @author Mykhaylo Boychuk (mykhaylo.boychuk at 4science.com)
*/
-public class SherpaPolicy implements SectionData {
+public class OpenPolicyFinderPolicy implements SectionData {
private static final long serialVersionUID = 2440249335255683173L;
private Date retrievalTime;
- private SHERPAResponse sherpaResponse;
+ private OpenPolicyFinderResponse opfResponse;
public Date getRetrievalTime() {
return retrievalTime;
@@ -32,17 +32,17 @@ public void setRetrievalTime(Date retrievalTime) {
this.retrievalTime = retrievalTime;
}
- public SHERPAResponse getSherpaResponse() {
- return sherpaResponse;
+ public OpenPolicyFinderResponse getOpfResponse() {
+ return opfResponse;
}
/**
- * Setting a sherpaResponse will automatically set the retrievealTime
+ * Setting a opfResponse will automatically set the retrievealTime
* of the section copying the value from the response if not null
*/
- public void setSherpaResponse(SHERPAResponse sherpaResponse) {
- this.sherpaResponse = sherpaResponse;
- this.retrievalTime = sherpaResponse.getRetrievalTime();
+ public void setOpfResponse(OpenPolicyFinderResponse opfResponse) {
+ this.opfResponse = opfResponse;
+ this.retrievalTime = opfResponse.getRetrievalTime();
}
}
\ No newline at end of file
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/EPersonRestRepository.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/EPersonRestRepository.java
index ce1edc1eed92..9f9b5d1d5052 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/EPersonRestRepository.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/EPersonRestRepository.java
@@ -253,6 +253,7 @@ public Page findAll(Context context, Pageable pageable) {
* is the *required* email address
* @return a Page of EPersonRest instances matching the user query
*/
+ @PreAuthorize("hasAuthority('ADMIN') || hasAuthority('MANAGE_ACCESS_GROUP')")
@SearchRestMethod(name = "byEmail")
public EPersonRest findByEmail(@Parameter(value = "email", required = true) String email) {
EPerson eperson = null;
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ExternalSourceRestRepository.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ExternalSourceRestRepository.java
index 736261cd263b..a19630579c00 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ExternalSourceRestRepository.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ExternalSourceRestRepository.java
@@ -82,7 +82,7 @@ public Page getExternalSourceEntries(String externalSou
}
@Override
- @PreAuthorize("permitAll()")
+ @PreAuthorize("hasAuthority('AUTHENTICATED')")
public ExternalSourceRest findOne(Context context, String externalSourceName) {
ExternalDataProvider externalDataProvider = externalDataService.getExternalDataProvider(externalSourceName);
if (externalDataProvider == null) {
@@ -93,7 +93,7 @@ public ExternalSourceRest findOne(Context context, String externalSourceName) {
}
@Override
- @PreAuthorize("permitAll()")
+ @PreAuthorize("hasAuthority('AUTHENTICATED')")
public Page findAll(Context context, Pageable pageable) {
List externalSources = externalDataService.getExternalDataProviders();
return converter.toRestPage(externalSources, pageable, utils.obtainProjection());
@@ -107,7 +107,7 @@ public Page findAll(Context context, Pageable pageable) {
* @param entityType Entity type label
* @return
*/
- @PreAuthorize("permitAll()")
+ @PreAuthorize("hasAuthority('AUTHENTICATED')")
@SearchRestMethod(name = "findByEntityType")
public Page findByEntityType(Context context, Pageable pageable,
@Parameter(required = true, value = "entityType") String entityType) {
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ProcessRestRepository.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ProcessRestRepository.java
index 9942f55b82a5..107a0bdb6b48 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ProcessRestRepository.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ProcessRestRepository.java
@@ -168,12 +168,13 @@ public BitstreamRest getProcessBitstreamByType(Integer processId, String type)
}
@Override
- protected void delete(Context context, Integer integer)
+ @PreAuthorize("hasPermission(#processId, 'PROCESS', 'DELETE')")
+ protected void delete(Context context, Integer processId)
throws AuthorizeException, RepositoryMethodNotImplementedException {
try {
- processService.delete(context, processService.find(context, integer));
+ processService.delete(context, processService.find(context, processId));
} catch (SQLException | IOException e) {
- log.error("Something went wrong trying to find Process with id: " + integer, e);
+ log.error("Something went wrong trying to find Process with id: " + processId, e);
throw new RuntimeException(e.getMessage(), e);
}
}
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/RegistrationRestRepository.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/RegistrationRestRepository.java
index 9c1c3b393bbb..c68a39e5d1b0 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/RegistrationRestRepository.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/RegistrationRestRepository.java
@@ -11,11 +11,14 @@
import java.io.IOException;
import java.sql.SQLException;
+import java.util.Set;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.mail.MessagingException;
import jakarta.servlet.ServletInputStream;
import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.ConstraintViolation;
+import jakarta.validation.Validator;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -79,6 +82,12 @@ public class RegistrationRestRepository extends DSpaceRestRepository findAll(Context context, Pageable pageable) {
@Override
public RegistrationRest createAndReturn(Context context) {
HttpServletRequest request = requestService.getCurrentRequest().getHttpServletRequest();
- ObjectMapper mapper = new ObjectMapper();
- RegistrationRest registrationRest;
String accountType = request.getParameter(TYPE_QUERY_PARAM);
if (StringUtils.isBlank(accountType) ||
(!accountType.equalsIgnoreCase(TYPE_FORGOT) && !accountType.equalsIgnoreCase(TYPE_REGISTER))) {
@@ -112,61 +119,42 @@ public RegistrationRest createAndReturn(Context context) {
}
}
+ RegistrationRest registrationRest;
try {
ServletInputStream input = request.getInputStream();
registrationRest = mapper.readValue(input, RegistrationRest.class);
} catch (IOException e1) {
throw new UnprocessableEntityException("Error parsing request body.", e1);
}
- if (StringUtils.isBlank(registrationRest.getEmail())) {
- throw new UnprocessableEntityException("The email cannot be omitted from the Registration endpoint");
+
+ // Validation of deserialized object
+ Set> violations = validator.validate(registrationRest);
+ if (violations != null && !violations.isEmpty()) {
+ StringBuilder sb = new StringBuilder();
+ for (ConstraintViolation v : violations) {
+ sb.append(v.getPropertyPath())
+ .append(": ")
+ .append(v.getMessage())
+ .append("; ");
+ }
+ throw new UnprocessableEntityException("Validation error: " + sb.toString());
}
+
EPerson eperson = null;
try {
eperson = ePersonService.findByEmail(context, registrationRest.getEmail());
} catch (SQLException e) {
log.error("Something went wrong retrieving EPerson for email: " + registrationRest.getEmail(), e);
}
+
if (eperson != null && accountType.equalsIgnoreCase(TYPE_FORGOT)) {
- try {
- if (!AuthorizeUtil.authorizeForgotPassword()) {
- throw new AccessDeniedException("Password reset is not allowed!");
- }
- if (!AuthorizeUtil.authorizeUpdatePassword(context, eperson.getEmail())) {
- throw new DSpaceBadRequestException("Password cannot be updated for the given EPerson with email: "
- + eperson.getEmail());
- }
- accountService.sendForgotPasswordInfo(context, registrationRest.getEmail());
- } catch (SQLException | IOException | MessagingException | AuthorizeException e) {
- log.error("Something went wrong with sending forgot password info email: "
- + registrationRest.getEmail(), e);
- }
+ resetPassword(context, registrationRest, eperson);
} else if (accountType.equalsIgnoreCase(TYPE_REGISTER)) {
if (eperson == null) {
- try {
- String email = registrationRest.getEmail();
- if (!AuthorizeUtil.authorizeNewAccountRegistration(context, request)) {
- throw new AccessDeniedException(
- "Registration is disabled, you are not authorized to create a new Authorization");
- }
- if (!authenticationService.canSelfRegister(context, request, email)) {
- throw new UnprocessableEntityException(
- String.format("Registration is not allowed with email address" +
- " %s", email));
- }
- accountService.sendRegistrationInfo(context, email);
- } catch (SQLException | IOException | MessagingException | AuthorizeException e) {
- log.error("Something went wrong with sending registration info email: "
- + registrationRest.getEmail(), e);
- }
+ registerEperson(context, request, registrationRest);
} else {
// if an eperson with this email already exists then send "forgot password" email instead
- try {
- accountService.sendForgotPasswordInfo(context, registrationRest.getEmail());
- } catch (SQLException | IOException | MessagingException | AuthorizeException e) {
- log.error("Something went wrong with sending forgot password info email: "
- + registrationRest.getEmail(), e);
- }
+ resetPassword(context, registrationRest, eperson);
}
}
return null;
@@ -177,6 +165,63 @@ public Class getDomainClass() {
return RegistrationRest.class;
}
+ /**
+ * This method will register a new eperson with the email given in the registrationRest object, and send an
+ * registration email to that email address.
+ * @param context
+ * @param request
+ * @param registrationRest
+ * @throws UnprocessableEntityException If self registration is not allowed.
+ * @throws AccessDeniedException If the user is not authorized to register a new eperson
+ */
+ private void registerEperson(Context context, HttpServletRequest request, RegistrationRest registrationRest)
+ throws UnprocessableEntityException, AccessDeniedException {
+ try {
+ if (!AuthorizeUtil.authorizeNewAccountRegistration(context, request)) {
+ throw new AccessDeniedException(
+ "Registration is disabled, you are not authorized to create a new Authorization");
+ }
+
+ if (!authenticationService.canSelfRegister(context, request, registrationRest.getEmail())) {
+ throw new UnprocessableEntityException(
+ String.format("Registration is not allowed with email address" +
+ " %s", registrationRest.getEmail()));
+ }
+
+ accountService.sendRegistrationInfo(context, registrationRest.getEmail());
+ } catch (SQLException | IOException | MessagingException | AuthorizeException e) {
+ log.error("Something went wrong with sending registration info email: "
+ + registrationRest.getEmail(), e);
+ }
+ }
+
+ /**
+ * This method will send a forgot password email to the email address given in the registrationRest object, if the
+ * email address belongs to an existing eperson. If the email address doesn't belong to any existing eperson,
+ * nothing will happen.
+ * @param context
+ * @param registrationRest
+ * @param eperson
+ * @throws AccessDeniedException If the user is not authorized to reset the password for the given eperson
+ * @throws DSpaceBadRequestException If the password cannot be updated for the given eperson
+ */
+ private void resetPassword(Context context, RegistrationRest registrationRest, EPerson eperson)
+ throws AccessDeniedException, DSpaceBadRequestException {
+ try {
+ if (!AuthorizeUtil.authorizeForgotPassword()) {
+ throw new AccessDeniedException("Password reset is not allowed!");
+ }
+ if (!AuthorizeUtil.authorizeUpdatePassword(context, eperson.getEmail())) {
+ throw new DSpaceBadRequestException("Password cannot be updated for the given EPerson with email: "
+ + eperson.getEmail());
+ }
+ accountService.sendForgotPasswordInfo(context, registrationRest.getEmail());
+ } catch (SQLException | IOException | MessagingException | AuthorizeException e) {
+ log.error("Something went wrong with sending forgot password info email: "
+ + registrationRest.getEmail(), e);
+ }
+ }
+
/**
* This method will find the RegistrationRest object that is associated with the token given
* @param token The token to be found and for which a RegistrationRest object will be found
@@ -186,7 +231,14 @@ public Class getDomainClass() {
*/
@SearchRestMethod(name = "findByToken")
public RegistrationRest findByToken(@Parameter(value = "token", required = true) String token)
- throws SQLException, AuthorizeException {
+ throws SQLException, AuthorizeException, DSpaceBadRequestException {
+ if (StringUtils.isBlank(token)) {
+ throw new DSpaceBadRequestException("Missing or empty token query parameter");
+ }
+ if (StringUtils.length(token) > 48) {
+ throw new DSpaceBadRequestException("Token length cannot be longer than 48 characters");
+ }
+
Context context = obtainContext();
RegistrationData registrationData = registrationDataService.findByToken(context, token);
if (registrationData == null) {
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ScriptRestRepository.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ScriptRestRepository.java
index e26f91c88981..87b03dc11715 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ScriptRestRepository.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ScriptRestRepository.java
@@ -191,6 +191,11 @@ private void checkFileNames(DSpaceRunnable dSpaceRunnable, List f
String fileName = file.getOriginalFilename();
if (fileNames.contains(fileName)) {
throw new UnprocessableEntityException("There are two files with the same name: " + fileName);
+ } else if (StringUtils.containsAny(fileName, "..", "/", "\\")) {
+ // NOTE: This is just a "fail-fast", basic protection against a potential path traversal attack.
+ // Individual scripts MUST also contain their own path traversal protections.
+ throw new UnprocessableEntityException(
+ "Filenames cannot contain path characters such as '..', '/', or '\\' : " + fileName);
} else {
fileNames.add(fileName);
}
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/VersionItemLinkRepository.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/VersionItemLinkRepository.java
index d171492e9fa1..265649a5fcc5 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/VersionItemLinkRepository.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/VersionItemLinkRepository.java
@@ -21,6 +21,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.data.rest.webmvc.ResourceNotFoundException;
+import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Component;
/**
@@ -44,6 +45,7 @@ public class VersionItemLinkRepository extends AbstractDSpaceRestRepository
* @return The ItemRest object that is relevant for the Version
* @throws SQLException If something goes wrong
*/
+ @PreAuthorize("@versioningSecurity.isEnableVersioning() && hasPermission(#versionId, 'VERSION', 'READ')")
public ItemRest getVersionItem(@Nullable HttpServletRequest request,
Integer versionId,
@Nullable Pageable optionalPageable,
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/scripts/handler/impl/RestDSpaceRunnableHandler.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/scripts/handler/impl/RestDSpaceRunnableHandler.java
index ee67baa8ab38..ccaaecc59017 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/scripts/handler/impl/RestDSpaceRunnableHandler.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/scripts/handler/impl/RestDSpaceRunnableHandler.java
@@ -50,8 +50,8 @@ public class RestDSpaceRunnableHandler implements DSpaceRunnableHandler {
.getLogger(RestDSpaceRunnableHandler.class);
private BitstreamService bitstreamService = ContentServiceFactory.getInstance().getBitstreamService();
- private ProcessService processService = ScriptServiceFactory.getInstance().getProcessService();
private EPersonService ePersonService = EPersonServiceFactory.getInstance().getEPersonService();
+ private ProcessService processService = ScriptServiceFactory.getInstance().getProcessService();
private Integer processId;
private String scriptName;
@@ -70,6 +70,7 @@ public RestDSpaceRunnableHandler(EPerson ePerson, String scriptName, List getSpecialGroups() {
Context context = new Context();
+ setCurrentUser(context);
List specialGroups = new ArrayList<>();
try {
Process process = processService.find(context, processId);
@@ -329,4 +332,25 @@ public List getSpecialGroups() {
}
return specialGroups;
}
+
+ /**
+ * Set the current context user if ePerson UUID parameter is not null
+ * and can be found. Reloads from database to avoid detached entity
+ * issues in downstream usage (e.g. authorization checks with equals()
+ * checks on EPerson objects, after the initial context was closed)
+ * @param context The current DSpace context
+ */
+ private void setCurrentUser(Context context) {
+ if (ePersonId == null) {
+ return;
+ }
+ try {
+ EPerson ePerson = ePersonService.find(context, ePersonId);
+ if (ePerson != null) {
+ context.setCurrentUser(ePerson);
+ }
+ } catch (SQLException e) {
+ log.error("Could not set the current user", e);
+ }
+ }
}
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/security/ProcessRestPermissionEvaluatorPlugin.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/security/ProcessRestPermissionEvaluatorPlugin.java
index b476b3fef98d..541948ab163f 100644
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/security/ProcessRestPermissionEvaluatorPlugin.java
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/security/ProcessRestPermissionEvaluatorPlugin.java
@@ -54,17 +54,20 @@ public boolean hasDSpacePermission(Authentication authentication, Serializable t
Request request = requestService.getCurrentRequest();
Context context = ContextUtil.obtainContext(request.getHttpServletRequest());
+ if (context == null) {
+ return false;
+ }
try {
int processId = Integer.parseInt(targetId.toString());
Process process = processService.find(context, processId);
+ // This previously returned true, to allow a 404 to be thrown later. However, this assists enumeration
+ // of sequential process IDs. It is better to simply return 'unauthorized' here.
if (process == null) {
- return true;
- }
- if (!((context.getCurrentUser() == null) || (!context.getCurrentUser().equals(process.getEPerson())
- && !authorizeService.isAdmin(context)))) {
- return true;
+ return false;
}
+ // Only the process owner or an administrator may perform any action
+ return processService.authorizeActionBoolean(context, process);
} catch (SQLException e) {
log.error(e::getMessage, e);
}
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/submit/step/OpenPolicyFinderPolicyStep.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/submit/step/OpenPolicyFinderPolicyStep.java
new file mode 100644
index 000000000000..cf89feb26111
--- /dev/null
+++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/submit/step/OpenPolicyFinderPolicyStep.java
@@ -0,0 +1,64 @@
+/**
+ * The contents of this file are subject to the license and copyright
+ * detailed in the LICENSE and NOTICE files at the root of the source
+ * tree and available online at
+ *
+ * http://www.dspace.org/license/
+ */
+package org.dspace.app.rest.submit.step;
+
+import java.util.Objects;
+
+import jakarta.servlet.http.HttpServletRequest;
+import org.dspace.app.openpolicyfinder.cache.OpenPolicyFinderCacheEvictService;
+import org.dspace.app.openpolicyfinder.submit.OpenPolicyFinderSubmitService;
+import org.dspace.app.openpolicyfinder.v2.OpenPolicyFinderResponse;
+import org.dspace.app.rest.model.patch.Operation;
+import org.dspace.app.rest.model.step.OpenPolicyFinderPolicy;
+import org.dspace.app.rest.submit.AbstractProcessingStep;
+import org.dspace.app.rest.submit.SubmissionService;
+import org.dspace.app.util.SubmissionStepConfig;
+import org.dspace.content.InProgressSubmission;
+import org.dspace.core.Context;
+import org.dspace.utils.DSpace;
+import org.dspace.web.ContextUtil;
+
+/**
+ * OpenPolicyFinderPolicy step for DSpace Spring Rest. Expose information about
+ * the Open Policy Finder policies for the in progress submission.
+ *
+ * @author Mykhaylo Boychuk (mykhaylo.boychuk at 4science.com)
+ */
+public class OpenPolicyFinderPolicyStep extends AbstractProcessingStep {
+
+ public static final String RETRIEVAL_TIME = "retrievalTime";
+
+ private OpenPolicyFinderCacheEvictService opfCacheEvictService = new DSpace().getSingletonService(
+ OpenPolicyFinderCacheEvictService.class);
+ private OpenPolicyFinderSubmitService opfSubmitService =
+ new DSpace().getSingletonService(OpenPolicyFinderSubmitService.class);
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public OpenPolicyFinderPolicy getData(SubmissionService submissionService, InProgressSubmission obj,
+ SubmissionStepConfig config) throws Exception {
+ Context context = ContextUtil.obtainCurrentRequestContext();
+ OpenPolicyFinderResponse response = opfSubmitService.searchRelatedJournals(context, obj.getItem());
+ if (Objects.nonNull(response)) {
+ OpenPolicyFinderPolicy result = new OpenPolicyFinderPolicy();
+ result.setOpfResponse(response);
+ return result;
+ }
+ return null;
+ }
+
+ @Override
+ public void doPatchProcessing(Context context, HttpServletRequest currentRequest, InProgressSubmission source,
+ Operation op, SubmissionStepConfig stepConf) throws Exception {
+ String path = op.getPath();
+ if (path.contains(RETRIEVAL_TIME)) {
+ opfCacheEvictService.evictCacheValues(context, source.getItem());
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/submit/step/SherpaPolicyStep.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/submit/step/SherpaPolicyStep.java
deleted file mode 100644
index 206b3fab5974..000000000000
--- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/submit/step/SherpaPolicyStep.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * The contents of this file are subject to the license and copyright
- * detailed in the LICENSE and NOTICE files at the root of the source
- * tree and available online at
- *
- * http://www.dspace.org/license/
- */
-package org.dspace.app.rest.submit.step;
-
-import java.util.Objects;
-
-import jakarta.servlet.http.HttpServletRequest;
-import org.dspace.app.rest.model.patch.Operation;
-import org.dspace.app.rest.model.step.SherpaPolicy;
-import org.dspace.app.rest.submit.AbstractProcessingStep;
-import org.dspace.app.rest.submit.SubmissionService;
-import org.dspace.app.sherpa.cache.SherpaCacheEvictService;
-import org.dspace.app.sherpa.submit.SHERPASubmitService;
-import org.dspace.app.sherpa.v2.SHERPAResponse;
-import org.dspace.app.util.SubmissionStepConfig;
-import org.dspace.content.InProgressSubmission;
-import org.dspace.core.Context;
-import org.dspace.utils.DSpace;
-import org.dspace.web.ContextUtil;
-
-/**
- * SherpaPolicy step for DSpace Spring Rest. Expose information about
- * the Sherpa policies for the in progress submission.
- *
- * @author Mykhaylo Boychuk (mykhaylo.boychuk at 4science.com)
- */
-public class SherpaPolicyStep extends AbstractProcessingStep {
-
- public static final String SHERPA_RETRIEVAL_TIME = "retrievalTime";
-
- private SherpaCacheEvictService sherpaCacheEvictService = new DSpace().getSingletonService(
- SherpaCacheEvictService.class);
- private SHERPASubmitService sherpaSubmitService = new DSpace().getSingletonService(SHERPASubmitService.class);
-
- @Override
- @SuppressWarnings("unchecked")
- public SherpaPolicy getData(SubmissionService submissionService, InProgressSubmission obj,
- SubmissionStepConfig config) throws Exception {
- Context context = ContextUtil.obtainCurrentRequestContext();
- SHERPAResponse response = sherpaSubmitService.searchRelatedJournals(context, obj.getItem());
- if (Objects.nonNull(response)) {
- SherpaPolicy result = new SherpaPolicy();
- result.setSherpaResponse(response);
- return result;
- }
- return null;
- }
-
- @Override
- public void doPatchProcessing(Context context, HttpServletRequest currentRequest, InProgressSubmission source,
- Operation op, SubmissionStepConfig stepConf) throws Exception {
- String path = op.getPath();
- if (path.contains(SHERPA_RETRIEVAL_TIME)) {
- sherpaCacheEvictService.evictCacheValues(context, source.getItem());
- }
- }
-
-}
\ No newline at end of file
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/itemimport/ItemImportIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/itemimport/ItemImportIT.java
index 68511a9d8921..708a41c82ac9 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/itemimport/ItemImportIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/itemimport/ItemImportIT.java
@@ -59,6 +59,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.mock.web.MockMultipartFile;
+import org.springframework.test.web.servlet.ResultMatcher;
/**
* Basic integration testing for the SAF Import feature via UI {@link ItemImport}.
@@ -81,6 +82,9 @@ public class ItemImportIT extends AbstractEntityIntegrationTest {
private ProcessService processService;
@Autowired
private DSpaceRunnableParameterConverter dSpaceRunnableParameterConverter;
+ @Autowired
+ private ObjectMapper mapper;
+
private Collection collection;
private Path workDir;
private static final String TEMP_DIR = ItemImport.TEMP_DIR;
@@ -134,6 +138,39 @@ public void importItemByZipSafWithBitstreams() throws Exception {
assertTrue(workTempDir.exists());
}
+ @Test
+ public void importItemUsingInvalidZipName() throws Exception {
+ String zipfileName = "saf-bitstreams.zip";
+ // This zip name is invalid as it must only contain a file name.
+ // This is an example path traversal attack.
+ String badZipFileName = "../../../" + zipfileName;
+
+ // First attack attempt. Provide a path traversal via both "-z" param and "filename" of multipart request.
+ LinkedList parameters = new LinkedList<>();
+ parameters.add(new DSpaceCommandLineParameter("-a", ""));
+ parameters.add(new DSpaceCommandLineParameter("-c", collection.getID().toString()));
+ parameters.add(new DSpaceCommandLineParameter("-z", badZipFileName));
+ MockMultipartFile bitstreamFile = new MockMultipartFile("file", badZipFileName,
+ MediaType.APPLICATION_OCTET_STREAM_VALUE,
+ getClass().getResourceAsStream("saf-bitstreams.zip"));
+
+ // Verify this import will fail and throw a 422 error
+ performImportScriptExpectError(parameters, bitstreamFile, status().isUnprocessableEntity());
+
+ // Second attack attempt. Provide a path traversal via "-z" param but a VALID file in "filename"
+ // of multipart request.
+ parameters = new LinkedList<>();
+ parameters.add(new DSpaceCommandLineParameter("-a", ""));
+ parameters.add(new DSpaceCommandLineParameter("-c", collection.getID().toString()));
+ parameters.add(new DSpaceCommandLineParameter("-z", badZipFileName));
+ bitstreamFile = new MockMultipartFile("file", zipfileName,
+ MediaType.APPLICATION_OCTET_STREAM_VALUE,
+ getClass().getResourceAsStream("saf-bitstreams.zip"));
+
+ // Verify this import will also fail and throw a 422 error
+ performImportScriptExpectError(parameters, bitstreamFile, status().isUnprocessableEntity());
+ }
+
@Test
public void importItemByZipSafWithRelationships() throws Exception {
context.turnOffAuthorisationSystem();
@@ -263,4 +300,23 @@ private void checkProcess(Process process) {
.filter(b -> StringUtils.contains(b.getName(), ".zip"))
.count());
}
+
+ private void performImportScriptExpectError(LinkedList parameters,
+ MockMultipartFile bitstreamFile,
+ ResultMatcher expectedErrorMatcher)
+ throws Exception {
+ List list = parameters.stream()
+ .map(dSpaceCommandLineParameter -> dSpaceRunnableParameterConverter
+ .convert(dSpaceCommandLineParameter, Projection.DEFAULT))
+ .collect(Collectors.toList());
+
+ AtomicReference idRef = new AtomicReference<>();
+
+ // Verify process fails
+ getClient(getAuthToken(admin.getEmail(), password))
+ .perform(multipart("/api/system/scripts/import/processes")
+ .file(bitstreamFile)
+ .param("properties", mapper.writeValueAsString(list)))
+ .andExpect(expectedErrorMatcher);
+ }
}
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/EPersonRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/EPersonRestRepositoryIT.java
index beeef03aec47..5e84fefd31a4 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/EPersonRestRepositoryIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/EPersonRestRepositoryIT.java
@@ -197,7 +197,7 @@ public void createAnonAccessDeniedTest() throws Exception {
.andExpect(status().isUnauthorized());
getClient().perform(get("/api/eperson/epersons/search/byEmail")
.param("email", data.getEmail()))
- .andExpect(status().isNoContent());
+ .andExpect(status().isUnauthorized());
}
@Test
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ExternalSourcesRestControllerIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ExternalSourcesRestControllerIT.java
index 55cc99567f59..f75d020a2e93 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ExternalSourcesRestControllerIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ExternalSourcesRestControllerIT.java
@@ -26,6 +26,7 @@
import org.dspace.external.provider.ExternalDataProvider;
import org.dspace.external.service.ExternalDataService;
import org.hamcrest.Matchers;
+import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,9 +35,19 @@ public class ExternalSourcesRestControllerIT extends AbstractControllerIntegrati
@Autowired
private ExternalDataService externalDataService;
+ String token;
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ // All tests just require basic authentication privileges
+ token = getAuthToken(eperson.getEmail(), password);
+ }
+
@Test
public void findAllExternalSources() throws Exception {
- getClient().perform(get("/api/integration/externalsources"))
+ getClient(token).perform(get("/api/integration/externalsources"))
.andExpect(status().isOk())
.andExpect(jsonPath("$._embedded.externalsources", Matchers.hasItems(
ExternalSourceMatcher.matchExternalSource("mock", "mock", false),
@@ -44,11 +55,11 @@ public void findAllExternalSources() throws Exception {
ExternalSourceMatcher.matchExternalSource("suggestion", "suggestion", false),
ExternalSourceMatcher.matchExternalSource("scopus", "scopus", false),
ExternalSourceMatcher.matchExternalSource(
- "sherpaJournalIssn", "sherpaJournalIssn", false),
+ "opfJournalIssn", "opfJournalIssn", false),
ExternalSourceMatcher.matchExternalSource(
- "sherpaJournal", "sherpaJournal", false),
+ "opfJournal", "opfJournal", false),
ExternalSourceMatcher.matchExternalSource(
- "sherpaPublisher", "sherpaPublisher", false),
+ "opfPublisher", "opfPublisher", false),
ExternalSourceMatcher.matchExternalSource(
"pubmed", "pubmed", false),
ExternalSourceMatcher.matchExternalSource(
@@ -57,51 +68,70 @@ public void findAllExternalSources() throws Exception {
.andExpect(jsonPath("$.page.totalElements", Matchers.is(11)));
}
+ @Test
+ public void findAllExternalSourcesAnonymous() throws Exception {
+ getClient().perform(get("/api/integration/externalsources").param("size", "21"))
+ .andExpect(status().isUnauthorized());
+ }
+
@Test
public void findOneExternalSourcesExistingSources() throws Exception {
- getClient().perform(get("/api/integration/externalsources/mock"))
+ getClient(token).perform(get("/api/integration/externalsources/mock"))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.is(
ExternalSourceMatcher.matchExternalSource("mock", "mock", false)
)));
}
+
+ @Test
+ public void findOneExternalSourcesExistingSourcesAnonymous() throws Exception {
+ getClient().perform(get("/api/integration/externalsources/mock"))
+ .andExpect(status().isUnauthorized());
+ }
+
@Test
public void findOneExternalSourcesNotExistingSources() throws Exception {
- getClient().perform(get("/api/integration/externalsources/mock2"))
+ getClient(token).perform(get("/api/integration/externalsources/mock2"))
.andExpect(status().isNotFound());
}
@Test
public void findOneExternalSourceEntryValue() throws Exception {
- getClient().perform(get("/api/integration/externalsources/mock/entryValues/one"))
+ getClient(token).perform(get("/api/integration/externalsources/mock/entryValues/one"))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.is(
ExternalSourceEntryMatcher.matchExternalSourceEntry("one", "one", "one", "mock")
)));
}
+ @Test
+ public void findOneExternalSourceEntryValueAnonymous() throws Exception {
+ getClient().perform(get("/api/integration/externalsources/mock/entryValues/one"))
+ .andExpect(status().isUnauthorized());
+ }
+
@Test
public void findOneExternalSourceEntryValueInvalidEntryId() throws Exception {
- getClient().perform(get("/api/integration/externalsources/mock/entryValues/entryIdInvalid"))
+ getClient(token).perform(get("/api/integration/externalsources/mock/entryValues/entryIdInvalid"))
.andExpect(status().isNotFound());
}
@Test
public void findOneExternalSourceEntryValueInvalidSource() throws Exception {
- getClient().perform(get("/api/integration/externalsources/mocktwo/entryValues/one"))
+ getClient(token).perform(get("/api/integration/externalsources/mocktwo/entryValues/one"))
.andExpect(status().isNotFound());
}
@Test
public void findOneExternalSourceEntriesInvalidSource() throws Exception {
- getClient().perform(get("/api/integration/externalsources/mocktwo/entries")
+ getClient(token).perform(get("/api/integration/externalsources/mocktwo/entries")
.param("query", "test"))
.andExpect(status().isNotFound());
}
@Test
public void findOneExternalSourceEntriesApplicableQuery() throws Exception {
- getClient().perform(get("/api/integration/externalsources/mock/entries")
+ getClient(token).perform(get("/api/integration/externalsources/mock/entries")
.param("query", "one"))
.andExpect(status().isOk())
.andExpect(jsonPath("$._embedded.externalSourceEntries", Matchers.containsInAnyOrder(
@@ -112,8 +142,15 @@ public void findOneExternalSourceEntriesApplicableQuery() throws Exception {
}
@Test
- public void findOneExternalSourceEntriesApplicableQueryPagination() throws Exception {
+ public void findOneExternalSourceEntriesApplicableQueryAnonymous() throws Exception {
getClient().perform(get("/api/integration/externalsources/mock/entries")
+ .param("query", "one"))
+ .andExpect(status().isUnauthorized());
+ }
+
+ @Test
+ public void findOneExternalSourceEntriesApplicableQueryPagination() throws Exception {
+ getClient(token).perform(get("/api/integration/externalsources/mock/entries")
.param("query", "one").param("size", "1"))
.andExpect(status().isOk())
.andExpect(jsonPath("$._embedded.externalSourceEntries", Matchers.hasItem(
@@ -121,7 +158,7 @@ public void findOneExternalSourceEntriesApplicableQueryPagination() throws Excep
)))
.andExpect(jsonPath("$.page", PageMatcher.pageEntryWithTotalPagesAndElements(0, 1, 2, 2)));
- getClient().perform(get("/api/integration/externalsources/mock/entries")
+ getClient(token).perform(get("/api/integration/externalsources/mock/entries")
.param("query", "one").param("size", "1").param("page", "1"))
.andExpect(status().isOk())
.andExpect(jsonPath("$._embedded.externalSourceEntries", Matchers.hasItem(
@@ -132,7 +169,7 @@ public void findOneExternalSourceEntriesApplicableQueryPagination() throws Excep
@Test
public void findOneExternalSourceEntriesNoReturnQuery() throws Exception {
- getClient().perform(get("/api/integration/externalsources/mock/entries")
+ getClient(token).perform(get("/api/integration/externalsources/mock/entries")
.param("query", "randomqueryfornoresults"))
.andExpect(status().isOk())
.andExpect(jsonPath("$._embedded").doesNotExist());
@@ -140,7 +177,7 @@ public void findOneExternalSourceEntriesNoReturnQuery() throws Exception {
@Test
public void findOneExternalSourceEntriesNoQuery() throws Exception {
- getClient().perform(get("/api/integration/externalsources/mock/entries"))
+ getClient(token).perform(get("/api/integration/externalsources/mock/entries"))
.andExpect(status().isBadRequest());
}
@@ -151,7 +188,7 @@ public void findExternalSourcesByEntityTypeTest() throws Exception {
List journalProviders =
externalDataService.getExternalDataProvidersForEntityType("Journal");
- getClient().perform(get("/api/integration/externalsources/search/findByEntityType")
+ getClient(token).perform(get("/api/integration/externalsources/search/findByEntityType")
.param("entityType", "Publication"))
.andExpect(status().isOk())
// Expect that Publication sources match (check a max of 20 as that is default page size)
@@ -160,7 +197,7 @@ public void findExternalSourcesByEntityTypeTest() throws Exception {
))
.andExpect(jsonPath("$.page.totalElements", Matchers.is(publicationProviders.size())));
- getClient().perform(get("/api/integration/externalsources/search/findByEntityType")
+ getClient(token).perform(get("/api/integration/externalsources/search/findByEntityType")
.param("entityType", "Journal"))
.andExpect(status().isOk())
// Check that Journal sources match (check a max of 20 as that is default page size)
@@ -170,9 +207,16 @@ public void findExternalSourcesByEntityTypeTest() throws Exception {
.andExpect(jsonPath("$.page.totalElements", Matchers.is(journalProviders.size())));
}
+ @Test
+ public void findExternalSourcesByEntityTypeAnonymousTest() throws Exception {
+ getClient().perform(get("/api/integration/externalsources/search/findByEntityType")
+ .param("entityType", "Publication"))
+ .andExpect(status().isUnauthorized());
+ }
+
@Test
public void findExternalSourcesByEntityTypeBadRequestTest() throws Exception {
- getClient().perform(get("/api/integration/externalsources/search/findByEntityType"))
+ getClient(token).perform(get("/api/integration/externalsources/search/findByEntityType"))
.andExpect(status().isBadRequest());
}
@@ -186,7 +230,7 @@ public void findExternalSourcesByEntityTypePaginationTest() throws Exception {
int pageSize = 2;
int numberOfPages = (int) Math.ceil((double) numJournalProviders / pageSize);
- getClient().perform(get("/api/integration/externalsources/search/findByEntityType")
+ getClient(token).perform(get("/api/integration/externalsources/search/findByEntityType")
.param("entityType", "Journal")
.param("size", String.valueOf(pageSize)))
.andExpect(status().isOk())
@@ -196,7 +240,7 @@ public void findExternalSourcesByEntityTypePaginationTest() throws Exception {
.andExpect(jsonPath("$.page.totalPages", Matchers.is(numberOfPages)))
.andExpect(jsonPath("$.page.totalElements", Matchers.is(numJournalProviders)));
- getClient().perform(get("/api/integration/externalsources/search/findByEntityType")
+ getClient(token).perform(get("/api/integration/externalsources/search/findByEntityType")
.param("entityType", "Journal")
.param("page", "1")
.param("size", String.valueOf(pageSize)))
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemTemplateRestControllerIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemTemplateRestControllerIT.java
index f3ba6d3aed1f..67c1f74ce6c1 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemTemplateRestControllerIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemTemplateRestControllerIT.java
@@ -30,23 +30,19 @@
import org.dspace.app.rest.model.patch.Operation;
import org.dspace.app.rest.model.patch.ReplaceOperation;
import org.dspace.app.rest.test.AbstractControllerIntegrationTest;
-import org.dspace.authorize.service.ResourcePolicyService;
import org.dspace.builder.CollectionBuilder;
import org.dspace.builder.CommunityBuilder;
+import org.dspace.builder.GroupBuilder;
import org.dspace.builder.ResourcePolicyBuilder;
import org.dspace.content.Collection;
import org.dspace.core.Constants;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.web.servlet.MvcResult;
public class ItemTemplateRestControllerIT extends AbstractControllerIntegrationTest {
- @Autowired
- ResourcePolicyService resourcePolicyService;
-
private ObjectMapper mapper;
private String adminAuthToken;
private Collection childCollection;
@@ -168,16 +164,56 @@ public void getTemplateItemFromCollection() throws Exception {
}
@Test
- public void getTemplateItemFromCollectionForbiddenTest() throws Exception {
+ public void getTemplateItemFromCollectionNotLoggedIn() throws Exception {
setupTestTemplate();
- String itemUuidString = installTestTemplate();
+ installTestTemplate();
+
+ getClient().perform(get(getCollectionTemplateItemUrlTemplate(childCollection.getID().toString())))
+ .andExpect(status().isUnauthorized());
+ }
+
+ @Test
+ public void getTemplateItemFromCollectionNoRights() throws Exception {
+ setupTestTemplate();
+ installTestTemplate();
- resourcePolicyService.removePolicies(context, childCollection, Constants.READ);
String tokenEperson = getAuthToken(eperson.getEmail(), password);
getClient(tokenEperson).perform(get(getCollectionTemplateItemUrlTemplate(childCollection.getID().toString())))
.andExpect(status().isForbidden());
}
+ @Test
+ public void getTemplateItemFromCollectionAsSubmitter() throws Exception {
+ setupTestTemplate();
+ installTestTemplate();
+
+ GroupBuilder.createCollectionSubmitterGroup(context, childCollection)
+ .addMember(eperson)
+ .build();
+ String submitterToken = getAuthToken(eperson.getEmail(), password);
+
+ getClient(submitterToken)
+ .perform(get(getCollectionTemplateItemUrlTemplate(childCollection.getID().toString())))
+ .andExpect(status().isOk())
+ .andExpect(jsonPath("$.type", is("itemtemplate")));
+ }
+
+ @Test
+ public void getTemplateItemFromCollectionAsCollectionAdmin() throws Exception {
+ setupTestTemplate();
+ installTestTemplate();
+
+ GroupBuilder.createCollectionAdminGroup(context, childCollection)
+ .addMember(eperson)
+ .build();
+ String collectionAdminToken = getAuthToken(eperson.getEmail(), password);
+
+ getClient(collectionAdminToken)
+ .perform(get(getCollectionTemplateItemUrlTemplate(childCollection.getID().toString())))
+ .andExpect(status().isOk())
+ .andExpect(jsonPath("$.type", is("itemtemplate")));
+ }
+
@Test
public void getTemplateItemFromItemId() throws Exception {
setupTestTemplate();
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/OpenaireFundingExternalSourcesIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/OpenaireFundingExternalSourcesIT.java
index 8c76c7adea0e..afb74ae26ae7 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/OpenaireFundingExternalSourcesIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/OpenaireFundingExternalSourcesIT.java
@@ -17,10 +17,21 @@
import org.dspace.app.rest.matcher.ExternalSourceMatcher;
import org.dspace.app.rest.test.AbstractControllerIntegrationTest;
import org.hamcrest.Matchers;
+import org.junit.Before;
import org.junit.Test;
public class OpenaireFundingExternalSourcesIT extends AbstractControllerIntegrationTest {
+ String token;
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ // All tests just require basic authentication privileges
+ token = getAuthToken(eperson.getEmail(), password);
+ }
+
/**
* Test openaire funding external source
*
@@ -28,7 +39,7 @@ public class OpenaireFundingExternalSourcesIT extends AbstractControllerIntegrat
*/
@Test
public void findOneOpenaireFundingExternalSourceTest() throws Exception {
- getClient().perform(get("/api/integration/externalsources")).andExpect(status().isOk())
+ getClient(token).perform(get("/api/integration/externalsources")).andExpect(status().isOk())
.andExpect(jsonPath("$._embedded.externalsources", Matchers.hasItem(
ExternalSourceMatcher.matchExternalSource("openaireFunding", "openaireFunding", false))));
}
@@ -40,11 +51,18 @@ public void findOneOpenaireFundingExternalSourceTest() throws Exception {
*/
@Test
public void findOneOpenaireFundingExternalSourceEntriesEmptyWithQueryTest() throws Exception {
-
- getClient().perform(get("/api/integration/externalsources/openaireFunding/entries").param("query", "empty"))
+ getClient(token).perform(get("/api/integration/externalsources/openaireFunding/entries")
+ .param("query", "empty"))
.andExpect(status().isOk()).andExpect(jsonPath("$.page.number", is(0)));
}
+ @Test
+ public void findOneOpenaireFundingExternalSourceEntriesEmptyWithQueryAnonymousTest() throws Exception {
+ getClient().perform(get("/api/integration/externalsources/openaireFunding/entries")
+ .param("query", "empty"))
+ .andExpect(status().isUnauthorized());
+ }
+
/**
* Test openaire funding entries with multiple keywords for a query returning no
* results
@@ -54,7 +72,7 @@ public void findOneOpenaireFundingExternalSourceEntriesEmptyWithQueryTest() thro
@Test
public void findOneOpenaireFundingExternalSourceEntriesWithQueryMultipleKeywordsTest() throws Exception {
- getClient()
+ getClient(token)
.perform(
get("/api/integration/externalsources/openaireFunding/entries").param("query", "empty+results"))
.andExpect(status().isOk()).andExpect(jsonPath("$.page.number", is(0)));
@@ -67,7 +85,8 @@ public void findOneOpenaireFundingExternalSourceEntriesWithQueryMultipleKeywords
*/
@Test
public void findOneOpenaireFundingExternalSourceEntriesWithQueryTest() throws Exception {
- getClient().perform(get("/api/integration/externalsources/openaireFunding/entries").param("query", "mushroom"))
+ getClient(token).perform(get("/api/integration/externalsources/openaireFunding/entries")
+ .param("query", "mushroom"))
.andExpect(status().isOk())
.andExpect(jsonPath("$._embedded.externalSourceEntries",
Matchers.hasItem(ExternalSourceEntryMatcher.matchExternalSourceEntry(
@@ -90,7 +109,7 @@ public void findOneOpenaireFundingExternalSourceEntryValueTest() throws Exceptio
String projectName = "Portuguese Wild Mushrooms: Chemical characterization and functional study"
+ " of antiproliferative and proapoptotic properties in cancer cell lines";
- getClient().perform(get("/api/integration/externalsources/openaireFunding/entryValues/" + projectID))
+ getClient(token).perform(get("/api/integration/externalsources/openaireFunding/entryValues/" + projectID))
.andExpect(status().isOk())
.andExpect(jsonPath("$",
Matchers.allOf(hasJsonPath("$.id", is(projectID)), hasJsonPath("$.display", is(projectName)),
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/OrcidExternalSourcesIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/OrcidExternalSourcesIT.java
index 04592c17da2d..e8e96076e5ab 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/OrcidExternalSourcesIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/OrcidExternalSourcesIT.java
@@ -23,6 +23,7 @@
import org.dspace.services.ConfigurationService;
import org.hamcrest.Matchers;
import org.junit.Assume;
+import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentMatchers;
import org.mockito.Mockito;
@@ -55,9 +56,19 @@ public void onlyRunIfConfigExists() {
}
}
+ String token;
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ // All tests just require basic authentication privileges
+ token = getAuthToken(eperson.getEmail(), password);
+ }
+
@Test
public void findOneExternalSourcesExistingSources() throws Exception {
- getClient().perform(get("/api/integration/externalsources/orcid"))
+ getClient(token).perform(get("/api/integration/externalsources/orcid"))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
hasJsonPath("$.id", is("orcid")),
@@ -67,12 +78,18 @@ public void findOneExternalSourcesExistingSources() throws Exception {
)));
}
+ @Test
+ public void findOneExternalSourcesExistingSourcesAnonymous() throws Exception {
+ getClient().perform(get("/api/integration/externalsources/orcid"))
+ .andExpect(status().isUnauthorized());
+ }
+
@Test
public void findOneExternalSourcesExistingSourcesWithentryValueTest() throws Exception {
// this test will query the real ORCID API if configured in the CI otherwise will be skipped
onlyRunIfConfigExists();
String entry = "0000-0002-9029-1854";
- getClient().perform(get("/api/integration/externalsources/orcid/entryValues/" + entry))
+ getClient(token).perform(get("/api/integration/externalsources/orcid/entryValues/" + entry))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
hasJsonPath("$.id", is(entry)),
@@ -92,7 +109,7 @@ public void findOneExternalSourceEntriesApplicableQueryTest() throws Exception {
// this test will query the real ORCID API if configured in the CI otherwise will be skipped
onlyRunIfConfigExists();
String q = "orcid:0000-0002-9029-1854";
- getClient().perform(get("/api/integration/externalsources/orcid/entries")
+ getClient(token).perform(get("/api/integration/externalsources/orcid/entries")
.param("query", q))
.andExpect(status().isOk())
.andExpect(jsonPath("$._embedded.externalSourceEntries[0]", Matchers.allOf(
@@ -117,7 +134,7 @@ public void findOneExternalSourceEntriesApplicableQueryFamilyNameAndGivenNamesTe
// this test will query the real ORCID API if configured in the CI otherwise will be skipped
onlyRunIfConfigExists();
String q = "family-name:bollini AND given-names:andrea";
- getClient().perform(get("/api/integration/externalsources/orcid/entries")
+ getClient(token).perform(get("/api/integration/externalsources/orcid/entries")
.param("query", q))
.andExpect(status().isOk())
.andExpect(jsonPath("$._embedded.externalSourceEntries", Matchers.hasItem(
@@ -158,7 +175,7 @@ public InputStream answer(InvocationOnMock invocation) {
});
String entry = "0000-0002-9029-1854";
- getClient().perform(get("/api/integration/externalsources/orcid/entryValues/" + entry))
+ getClient(token).perform(get("/api/integration/externalsources/orcid/entryValues/" + entry))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
hasJsonPath("$.id", is(entry)),
@@ -200,7 +217,7 @@ public InputStream answer(InvocationOnMock invocation) {
}
});
String q = "orcid:0000-0002-9029-1854";
- getClient().perform(get("/api/integration/externalsources/orcid/entries")
+ getClient(token).perform(get("/api/integration/externalsources/orcid/entries")
.param("query", q))
.andExpect(status().isOk())
.andExpect(jsonPath("$._embedded.externalSourceEntries[0]", Matchers.allOf(
@@ -253,7 +270,7 @@ public InputStream answer(InvocationOnMock invocation) {
}
});
String q = "family-name:bollini AND given-names:andrea";
- getClient().perform(get("/api/integration/externalsources/orcid/entries")
+ getClient(token).perform(get("/api/integration/externalsources/orcid/entries")
.param("query", q))
.andExpect(status().isOk())
.andExpect(jsonPath("$._embedded.externalSourceEntries", Matchers.hasItem(
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ProcessRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ProcessRestRepositoryIT.java
index d657917f13e3..6d0887c86f43 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ProcessRestRepositoryIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ProcessRestRepositoryIT.java
@@ -12,6 +12,7 @@
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.is;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@@ -55,6 +56,7 @@ public class ProcessRestRepositoryIT extends AbstractControllerIntegrationTest {
@Before
public void setup() throws SQLException {
+ context.setCurrentUser(admin);
CollectionUtils.emptyIfNull(processService.findAll(context)).stream().forEach(process -> {
try {
processService.delete(context, process);
@@ -66,6 +68,7 @@ public void setup() throws SQLException {
parameters.add(new DSpaceCommandLineParameter("-i", null));
process = ProcessBuilder.createProcess(context, admin, "mock-script", parameters).build();
+ context.setCurrentUser(eperson);
}
@Test
@@ -84,7 +87,9 @@ public void getProcessAdmin() throws Exception {
public void getProcessAdminEmptyParam() throws Exception {
String token = getAuthToken(admin.getEmail(), password);
+ context.setCurrentUser(admin);
Process process = ProcessBuilder.createProcess(context, admin, "mock-script", new LinkedList<>()).build();
+ context.setCurrentUser(eperson);
getClient(token).perform(get("/api/system/processes/" + process.getID()))
.andExpect(status().isOk())
@@ -132,7 +137,7 @@ public void getProcessNotExisting() throws Exception {
String token = getAuthToken(eperson.getEmail(), password);
getClient(token).perform(get("/api/system/processes/" + process.getID() * 23 + 17))
- .andExpect(status().isNotFound());
+ .andExpect(status().isForbidden());
}
@Test
@@ -154,9 +159,11 @@ public void getAllProcessesTestAdmin() throws Exception {
Process newProcess4 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
Process newProcess5 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
Process newProcess6 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
+ context.setCurrentUser(admin);
Process newProcess7 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters).build();
Process newProcess8 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters).build();
Process newProcess9 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters).build();
+ context.setCurrentUser(eperson);
String token = getAuthToken(admin.getEmail(), password);
@@ -211,9 +218,11 @@ public void getAllProcessesTestStartingUser() throws Exception {
Process newProcess4 = ProcessBuilder.createProcess(context, eperson, "mock-script", new LinkedList<>()).build();
Process newProcess5 = ProcessBuilder.createProcess(context, eperson, "mock-script", new LinkedList<>()).build();
Process newProcess6 = ProcessBuilder.createProcess(context, eperson, "mock-script", new LinkedList<>()).build();
+ context.setCurrentUser(admin);
Process newProcess7 = ProcessBuilder.createProcess(context, admin, "mock-script", new LinkedList<>()).build();
Process newProcess8 = ProcessBuilder.createProcess(context, admin, "mock-script", new LinkedList<>()).build();
Process newProcess9 = ProcessBuilder.createProcess(context, admin, "mock-script", new LinkedList<>()).build();
+ context.setCurrentUser(eperson);
String token = getAuthToken(eperson.getEmail(), password);
@@ -310,9 +319,11 @@ public void getProcessFilesTypes() throws Exception {
@Test
public void getProcessFilesTypesForbidden() throws Exception {
+ context.setCurrentUser(admin);
try (InputStream is = IOUtils.toInputStream("Test File For Process", CharEncoding.UTF_8)) {
processService.appendFile(context, process, is, "inputfile", "test.csv");
}
+ context.setCurrentUser(eperson);
List fileTypesToCheck = new LinkedList<>();
fileTypesToCheck.add("inputfile");
@@ -327,9 +338,11 @@ public void getProcessFilesTypesForbidden() throws Exception {
@Test
public void getProcessFilesTypesUnAuthorized() throws Exception {
+ context.setCurrentUser(admin);
try (InputStream is = IOUtils.toInputStream("Test File For Process", CharEncoding.UTF_8)) {
processService.appendFile(context, process, is, "inputfile", "test.csv");
}
+ context.setCurrentUser(eperson);
List fileTypesToCheck = new LinkedList<>();
fileTypesToCheck.add("inputfile");
@@ -341,9 +354,11 @@ public void getProcessFilesTypesUnAuthorized() throws Exception {
@Test
public void getProcessFilesTypesRandomProcessId() throws Exception {
+ context.setCurrentUser(admin);
try (InputStream is = IOUtils.toInputStream("Test File For Process", CharEncoding.UTF_8)) {
processService.appendFile(context, process, is, "inputfile", "test.csv");
}
+ context.setCurrentUser(eperson);
List fileTypesToCheck = new LinkedList<>();
fileTypesToCheck.add("inputfile");
@@ -380,9 +395,11 @@ public void searchProcessTestByUser() throws Exception {
Process newProcess4 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
Process newProcess5 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
Process newProcess6 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
+ context.setCurrentUser(admin);
Process newProcess7 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters).build();
Process newProcess8 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters).build();
Process newProcess9 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters).build();
+ context.setCurrentUser(eperson);
String token = getAuthToken(admin.getEmail(), password);
@@ -446,11 +463,13 @@ public void searchProcessTestByProcessStatus() throws Exception {
Process newProcess4 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
Process newProcess5 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
Process newProcess6 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
+ context.setCurrentUser(admin);
Process newProcess7 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters)
.withProcessStatus(ProcessStatus.FAILED).build();
Process newProcess8 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters).build();
Process newProcess9 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters)
.withProcessStatus(ProcessStatus.FAILED).build();
+ context.setCurrentUser(eperson);
String token = getAuthToken(admin.getEmail(), password);
@@ -478,11 +497,13 @@ public void searchProcessTestByScriptName() throws Exception {
Process newProcess4 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
Process newProcess5 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
Process newProcess6 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
+ context.setCurrentUser(admin);
Process newProcess7 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters)
.withProcessStatus(ProcessStatus.FAILED).build();
Process newProcess8 = ProcessBuilder.createProcess(context, admin, "another-mock-script", parameters).build();
Process newProcess9 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters)
.withProcessStatus(ProcessStatus.FAILED).build();
+ context.setCurrentUser(eperson);
String token = getAuthToken(admin.getEmail(), password);
@@ -507,11 +528,13 @@ public void searchProcessTestByScriptNameAndUserId() throws Exception {
Process newProcess4 = ProcessBuilder.createProcess(context, eperson, "another-mock-script", parameters).build();
Process newProcess5 = ProcessBuilder.createProcess(context, eperson, "another-mock-script", parameters).build();
Process newProcess6 = ProcessBuilder.createProcess(context, eperson, "another-mock-script", parameters).build();
+ context.setCurrentUser(admin);
Process newProcess7 = ProcessBuilder.createProcess(context, admin, "another-mock-script", parameters)
.withProcessStatus(ProcessStatus.FAILED).build();
Process newProcess8 = ProcessBuilder.createProcess(context, admin, "another-mock-script", parameters).build();
Process newProcess9 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters)
.withProcessStatus(ProcessStatus.FAILED).build();
+ context.setCurrentUser(eperson);
String token = getAuthToken(admin.getEmail(), password);
@@ -541,11 +564,13 @@ public void searchProcessTestByUserIdAndProcessStatus() throws Exception {
Process newProcess4 = ProcessBuilder.createProcess(context, eperson, "another-mock-script", parameters).build();
Process newProcess5 = ProcessBuilder.createProcess(context, eperson, "another-mock-script", parameters).build();
Process newProcess6 = ProcessBuilder.createProcess(context, eperson, "another-mock-script", parameters).build();
+ context.setCurrentUser(admin);
Process newProcess7 = ProcessBuilder.createProcess(context, admin, "another-mock-script", parameters).build();
Process newProcess8 = ProcessBuilder.createProcess(context, admin, "another-mock-script", parameters)
.withProcessStatus(ProcessStatus.FAILED).build();
Process newProcess9 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters)
.withProcessStatus(ProcessStatus.FAILED).build();
+ context.setCurrentUser(eperson);
String token = getAuthToken(admin.getEmail(), password);
@@ -576,10 +601,12 @@ public void searchProcessTestByUserIdAndProcessStatusAndScriptName() throws Exce
Process newProcess4 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
Process newProcess5 = ProcessBuilder.createProcess(context, eperson, "another-mock-script", parameters).build();
Process newProcess6 = ProcessBuilder.createProcess(context, eperson, "another-mock-script", parameters).build();
+ context.setCurrentUser(admin);
Process newProcess7 = ProcessBuilder.createProcess(context, admin, "another-mock-script", parameters).build();
Process newProcess8 = ProcessBuilder.createProcess(context, admin, "another-mock-script", parameters)
.withProcessStatus(ProcessStatus.FAILED).build();
Process newProcess9 = ProcessBuilder.createProcess(context, admin, "mock-script", parameters).build();
+ context.setCurrentUser(eperson);
String token = getAuthToken(admin.getEmail(), password);
@@ -892,9 +919,11 @@ public void testFindByCurrentUser() throws Exception {
Process process1 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters)
.withStartAndEndTime("10/01/1990", "20/01/1990")
.build();
+ context.setCurrentUser(admin);
ProcessBuilder.createProcess(context, admin, "mock-script", parameters)
.withStartAndEndTime("11/01/1990", "19/01/1990")
.build();
+ context.setCurrentUser(eperson);
Process process3 = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters)
.withStartAndEndTime("12/01/1990", "18/01/1990")
.build();
@@ -950,4 +979,54 @@ public void getProcessOutput() throws Exception {
is("script_output")));
}
+
+ @Test
+ public void deleteProcessByAdmin() throws Exception {
+ // Admin should be able to delete any process
+ Process processToDelete = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
+ int processId = processToDelete.getID();
+ String adminToken = getAuthToken(admin.getEmail(), password);
+ getClient(adminToken).perform(get("/api/system/processes/" + processId))
+ .andExpect(status().isOk());
+ getClient(adminToken).perform(delete("/api/system/processes/" + processId))
+ .andExpect(status().isNoContent());
+ getClient(adminToken).perform(get("/api/system/processes/" + processId))
+ .andExpect(status().isNotFound());
+ }
+
+ @Test
+ public void deleteProcessByOwner() throws Exception {
+ // The user who started the process should be able to delete it
+ Process processToDelete = ProcessBuilder.createProcess(context, eperson, "mock-script", parameters).build();
+ int processId = processToDelete.getID();
+ String ownerToken = getAuthToken(eperson.getEmail(), password);
+ getClient(ownerToken).perform(get("/api/system/processes/" + processId))
+ .andExpect(status().isOk());
+ getClient(ownerToken).perform(delete("/api/system/processes/" + processId))
+ .andExpect(status().isNoContent());
+ String adminToken = getAuthToken(admin.getEmail(), password);
+ getClient(adminToken).perform(get("/api/system/processes/" + processId))
+ .andExpect(status().isNotFound());
+ }
+
+ @Test
+ public void deleteProcessByOtherUserForbidden() throws Exception {
+ // A user who did not start the process (and is not admin) should get 403
+ String epersonToken = getAuthToken(eperson.getEmail(), password);
+ getClient(epersonToken).perform(delete("/api/system/processes/" + process.getID()))
+ .andExpect(status().isForbidden());
+ String adminToken = getAuthToken(admin.getEmail(), password);
+ getClient(adminToken).perform(get("/api/system/processes/" + process.getID()))
+ .andExpect(status().isOk());
+ }
+
+ @Test
+ public void deleteProcessByAnonymousUnauthorized() throws Exception {
+ // Anonymous users should get 401
+ getClient().perform(delete("/api/system/processes/" + process.getID()))
+ .andExpect(status().isUnauthorized());
+ String adminToken = getAuthToken(admin.getEmail(), password);
+ getClient(adminToken).perform(get("/api/system/processes/" + process.getID()))
+ .andExpect(status().isOk());
+ }
}
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/RegistrationRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/RegistrationRestRepositoryIT.java
index 1831fc6a8a85..3621ac846b7c 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/RegistrationRestRepositoryIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/RegistrationRestRepositoryIT.java
@@ -33,6 +33,7 @@
import org.dspace.app.rest.repository.RegistrationRestRepository;
import org.dspace.app.rest.test.AbstractControllerIntegrationTest;
import org.dspace.builder.EPersonBuilder;
+import org.dspace.core.Email;
import org.dspace.eperson.CaptchaServiceImpl;
import org.dspace.eperson.InvalidReCaptchaException;
import org.dspace.eperson.RegistrationData;
@@ -40,7 +41,12 @@
import org.dspace.eperson.service.CaptchaService;
import org.dspace.services.ConfigurationService;
import org.hamcrest.Matchers;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
+import org.mockito.MockedStatic;
+import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
public class RegistrationRestRepositoryIT extends AbstractControllerIntegrationTest {
@@ -53,6 +59,29 @@ public class RegistrationRestRepositoryIT extends AbstractControllerIntegrationT
private ConfigurationService configurationService;
@Autowired
private RegistrationRestRepository registrationRestRepository;
+ @Autowired
+ private ObjectMapper mapper;
+
+ private static MockedStatic emailMockedStatic;
+
+ @After
+ public void tearDown() throws Exception {
+ Iterator iterator = registrationDataDAO.findAll(context, RegistrationData.class).iterator();
+ while (iterator.hasNext()) {
+ RegistrationData registrationData = iterator.next();
+ registrationDataDAO.delete(context, registrationData);
+ }
+ }
+
+ @BeforeClass
+ public static void init() throws Exception {
+ emailMockedStatic = Mockito.mockStatic(Email.class);
+ }
+
+ @AfterClass
+ public static void tearDownClass() throws Exception {
+ emailMockedStatic.close();
+ }
@Test
public void findByTokenTestExistingUserTest() throws Exception {
@@ -121,6 +150,33 @@ private void createTokenForEmail(String email) throws Exception {
.andExpect(status().isCreated());
}
+ @Test
+ public void findByTokenWithoutToken() throws Exception {
+ getClient().perform(get("/api/eperson/registrations/search/findByToken"))
+ .andExpect(status().isBadRequest());
+ }
+
+ @Test
+ public void findByTokenWithEmptyToken() throws Exception {
+ getClient().perform(get("/api/eperson/registrations/search/findByToken")
+ .param("token", ""))
+ .andExpect(status().isBadRequest());
+ }
+
+ @Test
+ public void findByTokenWithBlankToken() throws Exception {
+ getClient().perform(get("/api/eperson/registrations/search/findByToken")
+ .param("token", " "))
+ .andExpect(status().isBadRequest());
+ }
+
+ @Test
+ public void findByTokenWithTooLongToken() throws Exception {
+ getClient().perform(get("/api/eperson/registrations/search/findByToken")
+ .param("token", "t".repeat(49))) // token length cannot be longer than 48 characters
+ .andExpect(status().isBadRequest());
+ }
+
@Test
public void registrationFlowTest() throws Exception {
List registrationDataList = registrationDataDAO.findAll(context, RegistrationData.class);
@@ -472,4 +528,51 @@ public void accountEndpoint_WrongAccountTypeParam() throws Exception {
.andExpect(status().isBadRequest());
}
+ @Test
+ public void registrationWithInvalidEmailFormatTest() throws Exception {
+ Email spy = Mockito.spy(Email.class);
+ doNothing().when(spy).send();
+ emailMockedStatic.when(() -> Email.getEmail(any())).thenReturn(spy);
+
+ RegistrationRest registrationRest = new RegistrationRest();
+ registrationRest.setEmail("invalid-email!!!!");
+
+ getClient().perform(post("/api/eperson/registrations")
+ .param(TYPE_QUERY_PARAM, TYPE_REGISTER)
+ .content(mapper.writeValueAsBytes(registrationRest))
+ .contentType(contentType))
+ .andExpect(status().isUnprocessableEntity());
+ }
+
+ @Test
+ public void registrationWithEmptyEmailTest() throws Exception {
+ Email spy = Mockito.spy(Email.class);
+ doNothing().when(spy).send();
+ emailMockedStatic.when(() -> Email.getEmail(any())).thenReturn(spy);
+
+ RegistrationRest registrationRest = new RegistrationRest();
+ registrationRest.setEmail("");
+
+ getClient().perform(post("/api/eperson/registrations")
+ .param(TYPE_QUERY_PARAM, TYPE_REGISTER)
+ .content(mapper.writeValueAsBytes(registrationRest))
+ .contentType(contentType))
+ .andExpect(status().isUnprocessableEntity());
+ }
+
+ @Test
+ public void registrationWithNullEmailTest() throws Exception {
+ Email spy = Mockito.spy(Email.class);
+ doNothing().when(spy).send();
+ emailMockedStatic.when(() -> Email.getEmail(any())).thenReturn(spy);
+
+ RegistrationRest registrationRest = new RegistrationRest();
+ registrationRest.setEmail(null);
+
+ getClient().perform(post("/api/eperson/registrations")
+ .param(TYPE_QUERY_PARAM, TYPE_REGISTER)
+ .content(mapper.writeValueAsBytes(registrationRest))
+ .contentType(contentType))
+ .andExpect(status().isUnprocessableEntity());
+ }
}
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ResearcherProfileRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ResearcherProfileRestRepositoryIT.java
index a0c66cddb70e..687efcef9c6f 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ResearcherProfileRestRepositoryIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ResearcherProfileRestRepositoryIT.java
@@ -1028,6 +1028,22 @@ public void testAutomaticProfileClaimByEmailWithRegularEntity() throws Exception
String secondItemId = getItemIdByProfileId(newUserToken, id);
assertEquals("The item should be the same", firstItemId, secondItemId);
+ getClient(getAuthToken(admin.getEmail(), password))
+ .perform(get("/api/authz/resourcepolicies/search/resource")
+ .param("uuid", firstItemId))
+ .andExpect(status().isOk())
+ .andExpect(jsonPath("$._embedded.resourcepolicies",
+ hasItem(matchResourcePolicyProperties(null, user, itemToBeClaimed, null,
+ Constants.WRITE, null))));
+
+ getClient(newUserToken)
+ .perform(get("/api/authz/authorizations/search/object")
+ .param("uri", "http://localhost/api/core/items/" + firstItemId)
+ .param("feature", "canEditMetadata")
+ .param("embed", "feature"))
+ .andExpect(status().isOk())
+ .andExpect(jsonPath("$._embedded.authorizations[0]._embedded.feature.id")
+ .value("canEditMetadata"));
}
@Test
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/VersionRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/VersionRestRepositoryIT.java
index daec24d29e70..0418643a58a8 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/VersionRestRepositoryIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/VersionRestRepositoryIT.java
@@ -84,8 +84,12 @@ public class VersionRestRepositoryIT extends AbstractControllerIntegrationTest {
private Item item;
+ private Item adminOnlyItem;
+
private Version version;
+ private Version adminOnlyVersion;
+
@Autowired
private VersioningService versioningService;
@@ -114,7 +118,7 @@ public void setup() throws SQLException, AuthorizeException {
context.turnOffAuthorisationSystem();
//** GIVEN **
- //1. A community-collection structure with one parent community with sub-community and two collections.
+ //1. A community-collection structure with one parent community with sub-community and one collection.
parentCommunity = CommunityBuilder.createCommunity(context)
.withName("Parent Community")
.build();
@@ -123,7 +127,7 @@ public void setup() throws SQLException, AuthorizeException {
.build();
Collection col1 = CollectionBuilder.createCollection(context, child1).withName("Collection 1").build();
- //2. Three public items that are readable by Anonymous with different subjects
+ //2. One public item that is readable by Anonymous
item = ItemBuilder.createItem(context, col1)
.withTitle("Public item 1")
.withIssueDate("2017-10-17")
@@ -132,6 +136,21 @@ public void setup() throws SQLException, AuthorizeException {
.build();
version = VersionBuilder.createVersion(context, item, "Fixing some typos").build();
+
+ //3. One Admin-Only Item, created by the Admin user
+ context.setCurrentUser(admin);
+ adminOnlyItem = ItemBuilder.createItem(context, col1)
+ .withTitle("Admin-Only item")
+ .withIssueDate("2017-10-17")
+ .withAuthor("Smith, Donald").withAuthor("Doe, John")
+ .withSubject("Private")
+ .withReaderGroup(context.getAdminGroup())
+ .build();
+ adminOnlyVersion = VersionBuilder.createVersion(context, item, "Fixing some typos").build();
+
+ // Revert current user to EPerson for all tests
+ context.setCurrentUser(eperson);
+
context.restoreAuthSystemState();
}
@@ -274,6 +293,31 @@ public void versionItemTest() throws Exception {
.andExpect(jsonPath("$", Matchers.is(ItemMatcher.matchItemProperties(version.getItem()))));
}
+ @Test
+ public void versionRestrictedItemAdminTest() throws Exception {
+ String adminToken = getAuthToken(admin.getEmail(), password);
+
+ // The Admin-only item is visible to Admin
+ getClient(adminToken).perform(get("/api/versioning/versions/" + adminOnlyVersion.getID() + "/item"))
+ .andExpect(status().isOk());
+ }
+
+ @Test
+ public void versionRestrictedItemForbiddenUserTest() throws Exception {
+ String epersonToken = getAuthToken(eperson.getEmail(), password);
+
+ // The Admin-only item is not visible to another user
+ getClient(epersonToken).perform(get("/api/versioning/versions/" + adminOnlyVersion.getID() + "/item"))
+ .andExpect(status().isForbidden());
+ }
+
+ @Test
+ public void versionRestrictedItemAnonymousTest() throws Exception {
+ // Anonymous user cannot access info about an Admin-only item
+ getClient().perform(get("/api/versioning/versions/" + adminOnlyVersion.getID() + "/item"))
+ .andExpect(status().isUnauthorized());
+ }
+
@Test
public void versionItemTestWrongId() throws Exception {
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/VocabularyRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/VocabularyRestRepositoryIT.java
index 7a3bc738eb66..356ca9fe9900 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/VocabularyRestRepositoryIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/VocabularyRestRepositoryIT.java
@@ -73,8 +73,8 @@ public void setup() throws Exception {
configurationService.setProperty("plugin.named.org.dspace.content.authority.ChoiceAuthority",
new String[] {
"org.dspace.content.authority.SolrAuthority = SolrAuthorAuthority",
- "org.dspace.content.authority.SHERPARoMEOPublisher = SRPublisher",
- "org.dspace.content.authority.SHERPARoMEOJournalTitle = SRJournalTitle"
+ "org.dspace.content.authority.OpenPolicyFinderPublisherAuthority = SRPublisher",
+ "org.dspace.content.authority.OpenPolicyFinderJournalTitle = SRJournalTitle"
});
configurationService.setProperty("solr.authority.server",
@@ -364,7 +364,7 @@ public void noResultsSolrQueryTest() throws Exception {
}
@Test
- public void sherpaJournalTest() throws Exception {
+ public void opfJournalTest() throws Exception {
String token = getAuthToken(admin.getEmail(), password);
getClient(token).perform(
get("/api/submission/vocabularies/SRJournalTitle/entries")
@@ -380,7 +380,7 @@ public void sherpaJournalTest() throws Exception {
}
@Test
- public void sherpaPublisherTest() throws Exception {
+ public void opfPublisherTest() throws Exception {
String token = getAuthToken(admin.getEmail(), password);
getClient(token).perform(
get("/api/submission/vocabularies/SRPublisher/entries")
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/WorkspaceItemRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/WorkspaceItemRestRepositoryIT.java
index 24a389dcaf69..fb07ad843913 100644
--- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/WorkspaceItemRestRepositoryIT.java
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/WorkspaceItemRestRepositoryIT.java
@@ -8133,7 +8133,7 @@ public void verifyUnconfiguredBitstreamPolicyIsDeniedTest() throws Exception {
}
@Test
- public void sherpaPolicySectionCacheTest() throws Exception {
+ public void opfPolicySectionCacheTest() throws Exception {
context.turnOffAuthorisationSystem();
String dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
@@ -8161,15 +8161,15 @@ public void sherpaPolicySectionCacheTest() throws Exception {
getClient(token).perform(get("/api/submission/workspaceitems/" + witem.getID()))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.error", is(false)))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.error", is(false)))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals[0].titles[0]",
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals[0].titles[0]",
is("Nature Synthesis")))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals[0].issns[0]",
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals[0].issns[0]",
is("2731-0582")))))
.andDo(result -> retrievalTime.set(read(
- result.getResponse().getContentAsString(), "$.sections.sherpaPolicies.retrievalTime")));
+ result.getResponse().getContentAsString(), "$.sections.opfPolicies.retrievalTime")));
Date date = new SimpleDateFormat(dateFormat).parse(retrievalTime.get());
@@ -8177,15 +8177,15 @@ public void sherpaPolicySectionCacheTest() throws Exception {
getClient(token).perform(get("/api/submission/workspaceitems/" + witem.getID()))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.error", is(false)))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.error", is(false)))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals[0].titles[0]",
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals[0].titles[0]",
is("Nature Synthesis")))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals[0].issns[0]",
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals[0].issns[0]",
is("2731-0582")))))
.andDo(result -> retrievalTime2.set(read(
- result.getResponse().getContentAsString(), "$.sections.sherpaPolicies.retrievalTime")));
+ result.getResponse().getContentAsString(), "$.sections.opfPolicies.retrievalTime")));
Date date2 = new SimpleDateFormat(dateFormat).parse(retrievalTime2.get());
@@ -8193,7 +8193,7 @@ public void sherpaPolicySectionCacheTest() throws Exception {
// create a list of values to use in add operation
List operations = new ArrayList<>();
- operations.add(new RemoveOperation("/sections/sherpaPolicies/retrievalTime"));
+ operations.add(new RemoveOperation("/sections/opfPolicies/retrievalTime"));
// empty the cache and verify the retrivatTime
String patchBody = getPatchContent(operations);
@@ -8202,15 +8202,15 @@ public void sherpaPolicySectionCacheTest() throws Exception {
.contentType(MediaType.APPLICATION_JSON_PATCH_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.error", is(false)))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.error", is(false)))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals[0].titles[0]",
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals[0].titles[0]",
is("Nature Synthesis")))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals[0].issns[0]",
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals[0].issns[0]",
is("2731-0582")))))
.andDo(result -> retrievalTime.set(read(
- result.getResponse().getContentAsString(), "$.sections.sherpaPolicies.retrievalTime")));
+ result.getResponse().getContentAsString(), "$.sections.opfPolicies.retrievalTime")));
date = new SimpleDateFormat(dateFormat).parse(retrievalTime.get());
@@ -8220,22 +8220,22 @@ public void sherpaPolicySectionCacheTest() throws Exception {
getClient(token).perform(get("/api/submission/workspaceitems/" + witem.getID()))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.error", is(false)))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.error", is(false)))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals[0].titles[0]",
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals[0].titles[0]",
is("Nature Synthesis")))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals[0].issns[0]",
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals[0].issns[0]",
is("2731-0582")))))
.andDo(result -> retrievalTime2.set(read(
- result.getResponse().getContentAsString(), "$.sections.sherpaPolicies.retrievalTime")));
+ result.getResponse().getContentAsString(), "$.sections.opfPolicies.retrievalTime")));
date2 = new SimpleDateFormat(dateFormat).parse(retrievalTime2.get());
assertTrue(date.equals(date2));
}
@Test
- public void sherpaPolicySectionWithWrongIssnCacheTest() throws Exception {
+ public void opfPolicySectionWithWrongIssnCacheTest() throws Exception {
context.turnOffAuthorisationSystem();
String dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
@@ -8263,13 +8263,13 @@ public void sherpaPolicySectionWithWrongIssnCacheTest() throws Exception {
getClient(token).perform(get("/api/submission/workspaceitems/" + witem.getID()))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.error", is(true)))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.error", is(true)))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.message", is("No results found")))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.message", is("No results found")))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals", nullValue()))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals", nullValue()))))
.andDo(result -> retrievalTime.set(read(
- result.getResponse().getContentAsString(), "$.sections.sherpaPolicies.retrievalTime")));
+ result.getResponse().getContentAsString(), "$.sections.opfPolicies.retrievalTime")));
Date date = new SimpleDateFormat(dateFormat).parse(retrievalTime.get());
@@ -8277,13 +8277,13 @@ public void sherpaPolicySectionWithWrongIssnCacheTest() throws Exception {
getClient(token).perform(get("/api/submission/workspaceitems/" + witem.getID()))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.error", is(true)))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.error", is(true)))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.message", is("No results found")))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.message", is("No results found")))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals", nullValue()))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals", nullValue()))))
.andDo(result -> retrievalTime2.set(read(
- result.getResponse().getContentAsString(), "$.sections.sherpaPolicies.retrievalTime")));
+ result.getResponse().getContentAsString(), "$.sections.opfPolicies.retrievalTime")));
Date date2 = new SimpleDateFormat(dateFormat).parse(retrievalTime2.get());
@@ -8291,7 +8291,7 @@ public void sherpaPolicySectionWithWrongIssnCacheTest() throws Exception {
// create a list of values to use in add operation
List operations = new ArrayList<>();
- operations.add(new RemoveOperation("/sections/sherpaPolicies/retrievalTime"));
+ operations.add(new RemoveOperation("/sections/opfPolicies/retrievalTime"));
// empty the cache and verify the retrivatTime
String patchBody = getPatchContent(operations);
@@ -8300,13 +8300,13 @@ public void sherpaPolicySectionWithWrongIssnCacheTest() throws Exception {
.contentType(MediaType.APPLICATION_JSON_PATCH_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.error", is(true)))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.error", is(true)))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.message", is("No results found")))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.message", is("No results found")))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals", nullValue()))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals", nullValue()))))
.andDo(result -> retrievalTime.set(read(
- result.getResponse().getContentAsString(), "$.sections.sherpaPolicies.retrievalTime")));
+ result.getResponse().getContentAsString(), "$.sections.opfPolicies.retrievalTime")));
date = new SimpleDateFormat(dateFormat).parse(retrievalTime.get());
@@ -8316,13 +8316,13 @@ public void sherpaPolicySectionWithWrongIssnCacheTest() throws Exception {
getClient(token).perform(get("/api/submission/workspaceitems/" + witem.getID()))
.andExpect(status().isOk())
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.error", is(true)))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.error", is(true)))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.message", is("No results found")))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.message", is("No results found")))))
.andExpect(jsonPath("$", Matchers.allOf(
- hasJsonPath("$.sections.sherpaPolicies.sherpaResponse.journals", nullValue()))))
+ hasJsonPath("$.sections.opfPolicies.opfResponse.journals", nullValue()))))
.andDo(result -> retrievalTime2.set(read(
- result.getResponse().getContentAsString(), "$.sections.sherpaPolicies.retrievalTime")));
+ result.getResponse().getContentAsString(), "$.sections.opfPolicies.retrievalTime")));
date2 = new SimpleDateFormat(dateFormat).parse(retrievalTime2.get());
assertTrue(date.equals(date2));
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/health/SEOHealthIndicatorTest.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/health/SEOHealthIndicatorTest.java
new file mode 100644
index 000000000000..e5c9bb1c9e5d
--- /dev/null
+++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/health/SEOHealthIndicatorTest.java
@@ -0,0 +1,123 @@
+/**
+ * The contents of this file are subject to the license and copyright
+ * detailed in the LICENSE and NOTICE files at the root of the source
+ * tree and available online at
+ *
+ * http://www.dspace.org/license/
+ */
+package org.dspace.app.rest.health;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.when;
+
+import java.util.Map;
+
+import org.dspace.app.rest.configuration.ActuatorConfiguration;
+import org.dspace.services.ConfigurationService;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.springframework.boot.actuate.health.Health;
+import org.springframework.boot.actuate.health.Status;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * Unit tests for {@link SEOHealthIndicator}.
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class SEOHealthIndicatorTest {
+
+ private static final String BASE_URL = "https://demo.dspace.org";
+
+ @Mock
+ private ConfigurationService configurationService;
+
+ @Mock
+ private RestTemplate restTemplate;
+
+ @InjectMocks
+ private SEOHealthIndicator seoHealthIndicator;
+
+ @Before
+ public void setUp() {
+ when(configurationService.getProperty("dspace.ui.url")).thenReturn(BASE_URL);
+ }
+
+ @Test
+ public void testWithSeoConfiguredCorrectly() {
+ when(restTemplate.getForEntity(anyString(), eq(String.class)))
+ .thenReturn(ResponseEntity.ok(""));
+ when(restTemplate.getForObject(eq(BASE_URL + "/robots.txt"), eq(String.class)))
+ .thenReturn("User-agent: *\nSitemap: " + BASE_URL + "/sitemap_index.xml");
+ when(restTemplate.getForObject(eq(BASE_URL), eq(String.class)))
+ .thenReturn("Rendered content");
+
+ Health health = seoHealthIndicator.health();
+
+ assertThat(health.getStatus(), is(Status.UP));
+ assertThat(health.getDetails(), is(Map.of(
+ SEOHealthIndicator.SITEMAP, SEOHealthIndicator.OK,
+ SEOHealthIndicator.ROBOTS_TXT, SEOHealthIndicator.OK,
+ SEOHealthIndicator.SSR, SEOHealthIndicator.OK)));
+ }
+
+ @Test
+ public void testWithSeoChecksFailingReportsUpWithIssues() {
+ when(restTemplate.getForEntity(anyString(), eq(String.class)))
+ .thenThrow(new RestClientException("connection refused"));
+ when(restTemplate.getForObject(anyString(), eq(String.class)))
+ .thenThrow(new RestClientException("connection refused"));
+
+ Health health = seoHealthIndicator.health();
+
+ assertThat(health.getStatus(), is(ActuatorConfiguration.UP_WITH_ISSUES_STATUS));
+ assertThat(health.getDetails(), is(Map.of(
+ SEOHealthIndicator.SITEMAP, SEOHealthIndicator.SITEMAP_MISSING,
+ SEOHealthIndicator.ROBOTS_TXT, SEOHealthIndicator.ROBOTS_MISSING,
+ SEOHealthIndicator.SSR, SEOHealthIndicator.SSR_DISABLED)));
+ }
+
+ @Test
+ public void testWithRobotsTxtContainingLocalhostReportsUpWithIssues() {
+ when(restTemplate.getForEntity(anyString(), eq(String.class)))
+ .thenReturn(ResponseEntity.ok(""));
+ when(restTemplate.getForObject(eq(BASE_URL + "/robots.txt"), eq(String.class)))
+ .thenReturn("Sitemap: http://localhost:8080/sitemap_index.xml");
+ when(restTemplate.getForObject(eq(BASE_URL), eq(String.class)))
+ .thenReturn("Rendered content");
+
+ Health health = seoHealthIndicator.health();
+
+ assertThat(health.getStatus(), is(ActuatorConfiguration.UP_WITH_ISSUES_STATUS));
+ assertThat(health.getDetails(), is(Map.of(
+ SEOHealthIndicator.SITEMAP, SEOHealthIndicator.OK,
+ SEOHealthIndicator.ROBOTS_TXT, SEOHealthIndicator.ROBOTS_INVALID,
+ SEOHealthIndicator.SSR, SEOHealthIndicator.OK)));
+ }
+
+ @Test
+ public void testWithSsrDisabledReportsUpWithIssues() {
+ when(restTemplate.getForEntity(anyString(), eq(String.class)))
+ .thenReturn(ResponseEntity.ok(""));
+ when(restTemplate.getForObject(eq(BASE_URL + "/robots.txt"), eq(String.class)))
+ .thenReturn("User-agent: *\nSitemap: " + BASE_URL + "/sitemap_index.xml");
+ when(restTemplate.getForObject(eq(BASE_URL), eq(String.class)))
+ .thenReturn("");
+
+ Health health = seoHealthIndicator.health();
+
+ assertThat(health.getStatus(), is(ActuatorConfiguration.UP_WITH_ISSUES_STATUS));
+ assertThat(health.getDetails(), is(Map.of(
+ SEOHealthIndicator.SITEMAP, SEOHealthIndicator.OK,
+ SEOHealthIndicator.ROBOTS_TXT, SEOHealthIndicator.OK,
+ SEOHealthIndicator.SSR, SEOHealthIndicator.SSR_DISABLED)));
+ }
+}
diff --git a/dspace-services/pom.xml b/dspace-services/pom.xml
index cc0af05c37a5..49f2d433e946 100644
--- a/dspace-services/pom.xml
+++ b/dspace-services/pom.xml
@@ -9,7 +9,7 @@
org.dspace
dspace-parent
- 8.4
+ 8.5
diff --git a/dspace-sword/pom.xml b/dspace-sword/pom.xml
index ad02d31f1325..a3490942c204 100644
--- a/dspace-sword/pom.xml
+++ b/dspace-sword/pom.xml
@@ -15,7 +15,7 @@
org.dspace
dspace-parent
- 8.4
+ 8.5
..
@@ -72,7 +72,7 @@
xom
xom
- 1.4.1
+ 1.4.6
diff --git a/dspace-swordv2/pom.xml b/dspace-swordv2/pom.xml
index 27c4bee8e77c..9067e546379d 100644
--- a/dspace-swordv2/pom.xml
+++ b/dspace-swordv2/pom.xml
@@ -13,7 +13,7 @@
org.dspace
dspace-parent
- 8.4
+ 8.5
..
diff --git a/dspace/config/crosswalks/DIM2DataCite.xsl b/dspace/config/crosswalks/DIM2DataCite.xsl
index 34fb9c64bf96..c44fb3d65780 100644
--- a/dspace/config/crosswalks/DIM2DataCite.xsl
+++ b/dspace/config/crosswalks/DIM2DataCite.xsl
@@ -359,14 +359,16 @@
-
-
-
-
+
+
+
+
+
+
diff --git a/dspace/config/dspace.cfg b/dspace/config/dspace.cfg
index 5917849ad634..9f4383d5ceb3 100644
--- a/dspace/config/dspace.cfg
+++ b/dspace/config/dspace.cfg
@@ -915,6 +915,11 @@ checker.retention.CHECKSUM_MATCH=8w
# The directory where the exports will be done and compressed
org.dspace.app.itemexport.work.dir = ${dspace.dir}/exports
+# Allowed base directories for item export output. This directory
+# will be enforced as the parent dir of all exports, including downloads, script "-d"
+# destination path, and so on. The default value matches org.dspace.app.itemexport.work.dir.
+#org.dspace.app.itemexport.allowed.dir = ${org.dspace.app.itemexport.work.dir}
+
# The directory where the compressed files will reside and be read by the downloader
org.dspace.app.itemexport.download.dir = ${dspace.dir}/exports/download
@@ -1459,17 +1464,6 @@ sitemap.dir = ${dspace.dir}/sitemaps
# Keep in mind, changing the schedule requires rebooting your servlet container, e.g. Tomcat.
sitemap.cron = 0 15 1 * * ?
-##### SHERPA/Romeo Integration Settings ####
-# The SHERPA/RoMEO endpoint (v2 API)
-sherpa.romeo.url = https://v2.sherpa.ac.uk/cgi/retrieve
-
-# Please register for a free api access key to use the SHERPA v2 API
-# https://v2.sherpa.ac.uk/api/
-# Please note: the SHERPA v2 API uses different API keys to the legacy APIs.
-# If you have been using the old ROMeO endpoint (end-of-life as at 2020-04-14), you must
-# register for a new API key
-sherpa.romeo.apikey =
-
##### Google Scholar Metadata Configuration #####
google-metadata.config = ${dspace.dir}/config/crosswalks/google-metadata.properties
google-metadata.enable = true
diff --git a/dspace/config/ehcache.xml b/dspace/config/ehcache.xml
index 41508a5fa826..b5430d0723a2 100644
--- a/dspace/config/ehcache.xml
+++ b/dspace/config/ehcache.xml
@@ -44,10 +44,10 @@
4
-
+
- org.dspace.app.sherpa.cache.SherpaCacheLogger
+ org.dspace.app.openpolicyfinder.cache.OpenPolicyFinderCacheLogger
ASYNCHRONOUS
UNORDERED
CREATED
@@ -64,6 +64,6 @@
-
+
\ No newline at end of file
diff --git a/dspace/config/item-submission.xml b/dspace/config/item-submission.xml
index 42b8c4f950d0..e0d2ebd3ce09 100644
--- a/dspace/config/item-submission.xml
+++ b/dspace/config/item-submission.xml
@@ -228,10 +228,10 @@
sample
-
- submit.progressbar.sherpapolicy
- org.dspace.app.rest.submit.step.SherpaPolicyStep
- sherpaPolicy
+
+ submit.progressbar.opfpolicy
+ org.dspace.app.rest.submit.step.OpenPolicyFinderPolicyStep
+ opfPolicy
@@ -288,8 +288,8 @@
-
-
+
+
-
-
-
+
+
+
+
-
+
Journal
-
-
-
-
+
+
+
+
@@ -247,10 +247,10 @@
-
-
-
-
+
+
+
+
diff --git a/dspace/config/spring/api/sherpa.xml b/dspace/config/spring/api/openpolicyfinder.xml
similarity index 59%
rename from dspace/config/spring/api/sherpa.xml
rename to dspace/config/spring/api/openpolicyfinder.xml
index da42880218ca..a30e0df20a9b 100644
--- a/dspace/config/spring/api/sherpa.xml
+++ b/dspace/config/spring/api/openpolicyfinder.xml
@@ -10,19 +10,21 @@
-
+
+
-
-
-
+
+
diff --git a/dspace/config/submission-forms.xml b/dspace/config/submission-forms.xml
index 102ff804568d..3074b3c3d02d 100644
--- a/dspace/config/submission-forms.xml
+++ b/dspace/config/submission-forms.xml
@@ -719,7 +719,7 @@
Select the journal related to this volume.
- sherpaJournal
+ opfJournal
diff --git a/dspace/modules/additions/pom.xml b/dspace/modules/additions/pom.xml
index f094b1dfcaf1..2f6d7a61c952 100644
--- a/dspace/modules/additions/pom.xml
+++ b/dspace/modules/additions/pom.xml
@@ -17,7 +17,7 @@
org.dspace
modules
- 8.4
+ 8.5
..
diff --git a/dspace/modules/pom.xml b/dspace/modules/pom.xml
index b41455e53e0d..40ce9685278f 100644
--- a/dspace/modules/pom.xml
+++ b/dspace/modules/pom.xml
@@ -11,7 +11,7 @@
org.dspace
dspace-parent
- 8.4
+ 8.5
../../pom.xml
diff --git a/dspace/modules/server-boot/pom.xml b/dspace/modules/server-boot/pom.xml
index 5e4b7fe9611c..c1ef5d283a5b 100644
--- a/dspace/modules/server-boot/pom.xml
+++ b/dspace/modules/server-boot/pom.xml
@@ -11,7 +11,7 @@
modules
org.dspace
- 8.4
+ 8.5
..
diff --git a/dspace/modules/server/pom.xml b/dspace/modules/server/pom.xml
index 6523392f76fe..ef67939e8d97 100644
--- a/dspace/modules/server/pom.xml
+++ b/dspace/modules/server/pom.xml
@@ -7,7 +7,7 @@
modules
org.dspace
- 8.4
+ 8.5
..
diff --git a/dspace/pom.xml b/dspace/pom.xml
index 7492408e81a4..65cd86f3006a 100644
--- a/dspace/pom.xml
+++ b/dspace/pom.xml
@@ -16,7 +16,7 @@
org.dspace
dspace-parent
- 8.4
+ 8.5
../pom.xml
diff --git a/dspace/src/main/config/build.xml b/dspace/src/main/config/build.xml
index f588eb023877..44acfb393428 100644
--- a/dspace/src/main/config/build.xml
+++ b/dspace/src/main/config/build.xml
@@ -126,6 +126,7 @@ Common usage:
+
@@ -163,6 +164,16 @@ Common usage:
+
+
+
+
+
+
+
+
+
@@ -178,11 +189,83 @@ Common usage:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+====================================================================
+ The following configuration files are no longer part of DSpace.
+ Each one has been renamed to "<filename>.obsolete-${build.date}"
+ so that it can no longer be loaded by DSpace:
+
+ ${obsolete.configs.found}
+
+ Nothing was deleted. Review these files for any local customizations
+ you still need, then run "ant clean_obsolete" to remove them.
+====================================================================
+
+
+
+
17
- 6.2.18
- 3.3.7
- 3.5.14
- 6.5.10
+ 6.2.19
+ 3.3.8
+ 3.5.16
+ 6.5.11
6.4.10.Final
- 8.0.3.Final
- 42.7.11
+ 8.0.5.Final
+ 42.7.13
10.22.0
8.11.4
3.12.0
2.42.0
- 2.21.3
- 2.21
+ 2.22.2
+ 2.22
2.1.1
4.0.5
- 4.0.8
+ 4.0.9
1.1.1
9.4.58.v20250814
- 2.25.4
- 3.0.7
+ 2.26.1
+ 3.0.8
1.19.0
- 2.0.17
- 3.3.0
+ 2.0.18
+ 3.3.2
1.81
8.0.1
- 3.1.11
+ 3.1.12
2.10.0
@@ -92,7 +92,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 3.6.2
+ 3.6.3
enforce-java
@@ -189,7 +189,7 @@
org.apache.maven.plugins
maven-jar-plugin
- 3.5.0
+ 3.5.1
@@ -220,7 +220,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.5.5
+ 3.5.6
@@ -247,7 +247,7 @@
maven-failsafe-plugin
- 3.5.5
+ 3.5.6
@@ -315,7 +315,7 @@
com.github.spotbugs
spotbugs-maven-plugin
- 4.9.8.3
+ 4.10.4.0
Max
Low
@@ -325,7 +325,7 @@
com.github.spotbugs
spotbugs
- 4.9.8
+ 4.10.4
@@ -360,7 +360,7 @@
org.apache.maven.plugins
maven-dependency-plugin
- 3.10.0
+ 3.11.0
org.apache.maven.plugins
@@ -377,7 +377,7 @@
org.sonatype.central
central-publishing-maven-plugin
- 0.10.0
+ 0.11.0
@@ -417,7 +417,7 @@
org.jacoco
jacoco-maven-plugin
- 0.8.14
+ 0.8.15
@@ -507,7 +507,7 @@
-
+
${root.basedir}
@@ -517,6 +517,7 @@
**/target/**
+ **/.*/**
@@ -1026,68 +1027,68 @@
org.dspace
dspace-api
- 8.4
+ 8.5
org.dspace
dspace-api
test-jar
- 8.4
+ 8.5
test
org.dspace.modules
additions
- 8.4
+ 8.5
org.dspace.modules
server
classes
- 8.4
+ 8.5
org.dspace
dspace-sword
- 8.4
+ 8.5
org.dspace
dspace-swordv2
- 8.4
+ 8.5
org.dspace
dspace-oai
- 8.4
+ 8.5
org.dspace
dspace-services
- 8.4
+ 8.5
org.dspace
dspace-server-webapp
test-jar
- 8.4
+ 8.5
test
org.dspace
dspace-rdf
- 8.4
+ 8.5
org.dspace
dspace-iiif
- 8.4
+ 8.5
org.dspace
dspace-server-webapp
- 8.4
+ 8.5
@@ -1354,7 +1355,7 @@
com.healthmarketscience.jackcess
jackcess
- 4.0.10
+ 4.0.11
@@ -1509,17 +1510,17 @@
commons-codec
commons-codec
- 1.22.0
+ 1.22.1
org.apache.commons
commons-collections4
- 4.5.0
+ 4.6.0
org.apache.commons
commons-configuration2
- 2.15.0
+ 2.15.1
org.apache.commons
@@ -1548,7 +1549,7 @@
commons-logging
commons-logging
- 1.3.6
+ 1.4.0
org.apache.commons
@@ -1573,7 +1574,7 @@
commons-validator
commons-validator
- 1.10.1
+ 1.11.0
jakarta.activation
@@ -1609,7 +1610,7 @@
jaxen
jaxen
- 2.0.1
+ 2.0.6
org.jdom
@@ -1746,20 +1747,6 @@
test
-
-
- com.google.code.findbugs
- jsr305
- 3.0.2
- provided
-
-
- com.google.code.findbugs
- annotations
- 3.0.1u2
- provided
-
-
com.fasterxml
@@ -1801,7 +1788,7 @@
xom
xom
- 1.4.1
+ 1.4.6
xml-apis
@@ -1943,7 +1930,7 @@
scm:git:git@github.com:DSpace/DSpace.git
scm:git:git@github.com:DSpace/DSpace.git
https://github.com/DSpace/DSpace
- dspace-8.4
+ dspace-8.5