Skip to content

Commit

Permalink
Merge pull request #489 from kit-data-manager/development
Browse files Browse the repository at this point in the history
Prepare next release
  • Loading branch information
VolkerHartmann committed Apr 12, 2024
2 parents 7fda525 + ba994fd commit f237005
Show file tree
Hide file tree
Showing 21 changed files with 503 additions and 67 deletions.
9 changes: 7 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
########################################
# Set AAI 4 Metastore & Indexing-Service
########################################
REPO_AUTH_ENABLED=false
JWT_SECRET=Please+add+your+own+long+and+valid+secret+here
########################################
# Adopt authentication for RabbitMQ
########################################
RABBIT_MQ_USER=rabbituser
Expand All @@ -7,8 +12,8 @@ RABBIT_MQ_PASSWORD=rabbitpasswd
# Only edit the following lines if you
# want to update service versions.
########################################
METASTORE_VERSION=v1.4.1
FRONTEND_COLLECTION_VERSION=metastore-v1.0.0
METASTORE_VERSION=v1.4.2
FRONTEND_COLLECTION_VERSION=metastore-v1.0.1
INDEXING_SERVICE_VERSION=v1.0.1
ELASTICSEARCH_VERSION=8.11.1
########################################
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ jobs:
- name: Build with Gradle (JDK ${{ env.currentBuildVersion }})
run: ./gradlew clean check jacocoTestReport
- name: Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./build/reports/jacoco/test/jacocoTestReport.xml #optional
37 changes: 36 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [1.4.2] - 2024-04-12
### Security

### Added
- Enable AAI for docker compose
- Add licenseUri to metadata (schema) records

### Changed
- Bump gradle from 8.2.1 to 8.7

### Fixed
- Fix health endpoint to evaluate elasticsearch if needed

### Libs
- Bump com.google.errorprone:error_prone_core from 2.24.1 to 2.26.1
- Bump com.networknt:json-schema-validator from 1.1.0 to 1.4.0
- Bump commons-io:commons-io from 2.15.1 to 2.16.1
- Bump edu.kit.datamanager:repo-core from 1.2.1 to 1.2.2
- Bump edu.kit.datamanager:service-base from 1.2.0 to 1.3.0
- Bump io.freefair.lombok from 8.4 to 8.6
- Bump io.freefair.maven-publish-java from 8.4 to 8.6
- Bump javersVersion from 7.3.7 to 7.4.2
- Bump org.apache.tika:tika-core from 2.9.1 to 2.9.2
- Bump org.mockito:mockito-core from 5.8.0 to 5.11.0
- Bump org.owasp.dependencycheck from 9.0.8 to 9.1.0
- Bump org.postgresql:postgresql from 42.7.1 to 42.7.3
- Bump org.springframework.boot from 3.2.1 to 3.2.4
- Bump org.springframework.cloud:spring-cloud-gateway-mvc from 4.1.1 to 4.1.2
- Bump org.springframework.data:spring-data-elasticsearch from 5.2.2 to 5.2.4
- Bump springDocVersion from 2.3.0 to 2.5.0

### Github Actions
- Bump codecov/codecov-action from 3 to 4

## [1.4.1] - 2024-01-13
### Added

Expand Down Expand Up @@ -413,7 +447,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Registry for XSD files and support for XML metadata

[Unreleased]: https://github.com/kit-data-manager/metastore2/compare/v1.4.1...HEAD
[Unreleased]: https://github.com/kit-data-manager/metastore2/compare/v1.4.2...HEAD
[1.4.2]: https://github.com/kit-data-manager/metastore2/compare/v1.4.1...1.4.2
[1.4.1]: https://github.com/kit-data-manager/metastore2/compare/v1.4.0...v1.4.1
[1.4.0]: https://github.com/kit-data-manager/metastore2/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/kit-data-manager/metastore2/compare/v1.2.3...v1.3.0
Expand Down
34 changes: 17 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
id 'org.springframework.boot' version '3.2.1'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
id 'io.freefair.lombok' version '8.4'
id 'io.freefair.maven-publish-java' version '8.4'
id 'org.owasp.dependencycheck' version '9.0.8'
id 'org.asciidoctor.jvm.convert' version '4.0.1'
id 'io.freefair.lombok' version '8.6'
id 'io.freefair.maven-publish-java' version '8.6'
id 'org.owasp.dependencycheck' version '9.1.0'
id 'org.asciidoctor.jvm.convert' version '4.0.2'
id 'net.ltgt.errorprone' version '3.1.0'
id 'net.researchgate.release' version '3.0.2'
id 'com.gorylenko.gradle-git-properties' version '2.4.1'
Expand All @@ -17,10 +17,10 @@ group = 'edu.kit.datamanager'

ext {
// versions of dependencies
springDocVersion = '2.3.0'
javersVersion = '7.3.7'
springDocVersion = '2.5.0'
javersVersion = '7.4.2'
keycloakVersion = '19.0.0'
errorproneVersion = '2.24.1'
errorproneVersion = '2.26.1'
// directory for generated code snippets during tests
snippetsDir = file("build/generated-snippets")
}
Expand Down Expand Up @@ -50,7 +50,7 @@ if (System.getProperty('profile') == 'minimal') {
dependencies {
// Spring
implementation 'org.springframework:spring-messaging:6.1.1'
implementation 'org.springframework.cloud:spring-cloud-gateway-mvc:4.1.1'
implementation 'org.springframework.cloud:spring-cloud-gateway-mvc:4.1.2'

// Spring Boot
implementation "org.springframework.boot:spring-boot-starter-data-rest"
Expand Down Expand Up @@ -94,26 +94,26 @@ dependencies {
implementation "org.javers:javers-core:${javersVersion}"

// driver for postgres
implementation "org.postgresql:postgresql:42.7.1"
implementation "org.postgresql:postgresql:42.7.3"
//driver for h2
implementation "com.h2database:h2:2.2.224"

// apache
implementation "commons-io:commons-io:2.15.1"
implementation "org.apache.tika:tika-core:2.9.1"
implementation "commons-io:commons-io:2.16.1"
implementation "org.apache.tika:tika-core:2.9.2"

// JSON validator
implementation "com.networknt:json-schema-validator:1.1.0"
implementation "com.networknt:json-schema-validator:1.4.0"

// XML validator // https://mvnrepository.com/artifact/xerces/xercesImpl
implementation 'xerces:xercesImpl:2.12.2'

// datamanager
implementation "edu.kit.datamanager:repo-core:1.2.1"
implementation "edu.kit.datamanager:service-base:1.2.0"
implementation "edu.kit.datamanager:repo-core:1.2.2"
implementation "edu.kit.datamanager:service-base:1.3.0"

// elasticsearch (since service-base 1.1.0)
implementation "org.springframework.data:spring-data-elasticsearch:5.2.2"
implementation "org.springframework.data:spring-data-elasticsearch:5.2.4"

// DOIP SDK
implementation "net.dona.doip:doip-sdk:2.2.0"
Expand All @@ -127,7 +127,7 @@ dependencies {
testImplementation "org.springframework.security:spring-security-test"

//Java 11 Support
testImplementation "org.mockito:mockito-core:5.8.0"
testImplementation "org.mockito:mockito-core:5.11.0"
testImplementation "junit:junit:4.13.2"
testImplementation "com.github.stefanbirkner:system-lambda:1.2.1"

Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ services:
environment:
- REPO_MESSAGING_USERNAME=${RABBIT_MQ_USER}
- REPO_MESSAGING_PASSWORD=${RABBIT_MQ_PASSWORD}
- REPO_AUTH_JWTSECRET=${JWT_SECRET}
depends_on:
rabbitmq:
condition: service_started
Expand All @@ -77,6 +78,9 @@ services:
- REPO_MESSAGING_ENABLED=true
- REPO_MESSAGING_USERNAME=${RABBIT_MQ_USER}
- REPO_MESSAGING_PASSWORD=${RABBIT_MQ_PASSWORD}
- MANAGEMENT_HEALTH_RABBIT_ENABLED=true
- REPO_AUTH_ENABLED=${REPO_AUTH_ENABLED}
- REPO_AUTH_JWTSECRET=${JWT_SECRET}
depends_on:
rabbitmq:
condition: service_started
Expand Down
15 changes: 15 additions & 0 deletions docs/documentation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ like this:
"sid" : "...",
"permission" : "..."
} ],
"licenseUri" : "...",
"schemaDocumentUri" : "...",
"schemaHash" : "...",
"locked" : false
Expand All @@ -81,6 +82,8 @@ At least the following elements are expected to be provided by the user:
In addition, ACL may be useful to make schema readable/editable by others.
This will be of interest while accessing/updating an existing schema.(if authorization is enabled)

[NOTE]
License URI is optional. It's new since 1.5.0.

=== Registering a Metadata Schema Document

Expand Down Expand Up @@ -464,6 +467,7 @@ like this:
"sid": "...",
"permission": "..."
}],
"licenseUri": "...",
"metadataDocumentUri": "...",
"documentHash": "..."
}
Expand All @@ -479,6 +483,9 @@ In addition, ACL may be useful to make metadata editable by others. (This will b
[NOTE]
If linked schema is identified by its schemaId the INTERNAL type has to be used.

[NOTE]
License URI is optional. It's new since 1.5.0.

==== Register/Ingest a Metadata Record with Metadata Document

The following example shows the creation of the first metadata record and its metadata only providing mandatory fields mentioned above:
Expand Down Expand Up @@ -757,6 +764,7 @@ like this:
"sid" : "...",
"permission" : "..."
} ],
"licenseUri" : "...",
"schemaDocumentUri" : "...",
"schemaHash" : "...",
"locked" : false
Expand All @@ -771,6 +779,9 @@ At least the following elements are expected to be provided by the user:

In addition, ACL may be useful to make schema editable by others. (This will be of interest while updating an existing schema)

[NOTE]
License URI is optional. It's new since 1.5.0.

=== Registering a Metadata Schema Document

The following example shows the creation of the first json schema only providing mandatory fields mentioned above:
Expand Down Expand Up @@ -1186,6 +1197,7 @@ like this:
"sid": "...",
"permission": "..."
}],
"licenseUri": "...",
"metadataDocumentUri": "...",
"documentHash": "..."
}
Expand All @@ -1198,6 +1210,9 @@ At least the following elements are expected to be provided by the user:

In addition, ACL may be useful to make metadata editable by others. (This will be of interest while updating an existing metadata)

[NOTE]
License URI is optional. It's new since 1.5.0.

==== Register/Ingest a Metadata Record with Metadata Document

The following example shows the creation of the first metadata record and its metadata only providing mandatory fields mentioned above:
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ action.custom-6.args=--configure-on-demand -w -x check -x test -Xlint:deprecatio
netbeans.com-github-philippefichet-sonarlint4netbeans.excludedRules=[{"repository":"php","rule":"S3335"},{"repository":"php","rule":"S3336"},{"repository":"php","rule":"S2002"},{"repository":"php","rule":"S2005"},{"repository":"php","rule":"S3333"},{"repository":"php","rule":"S3334"},{"repository":"Web","rule":"ImgWithoutWidthOrHeightCheck"},{"repository":"php","rule":"S1151"},{"repository":"php","rule":"S3332"},{"repository":"php","rule":"S2001"},{"repository":"Web","rule":"UnclosedTagCheck"},{"repository":"php","rule":"S2000"},{"repository":"java","rule":"S2309"},{"repository":"php","rule":"S126"},{"repository":"java","rule":"S4605"},{"repository":"java","rule":"S4604"},{"repository":"java","rule":"S2308"},{"repository":"xml","rule":"S3282"},{"repository":"php","rule":"S2918"},{"repository":"java","rule":"S2301"},{"repository":"java","rule":"S1696"},{"repository":"java","rule":"S1213"},{"repository":"java","rule":"S1698"},{"repository":"java","rule":"S1699"},{"repository":"php","rule":"S1820"},{"repository":"java","rule":"S3750"},{"repository":"java","rule":"S4288"},{"repository":"java","rule":"S1451"},{"repository":"php","rule":"S122"},{"repository":"java","rule":"S1694"},{"repository":"java","rule":"S1695"},{"repository":"php","rule":"S1821"},{"repository":"php","rule":"S5867"},{"repository":"java","rule":"S6211"},{"repository":"java","rule":"S2096"},{"repository":"java","rule":"S6212"},{"repository":"php","rule":"S2011"},{"repository":"Web","rule":"UnifiedExpressionCheck"},{"repository":"Web","rule":"PageWithoutFaviconCheck"},{"repository":"php","rule":"S134"},{"repository":"java","rule":"S1448"},{"repository":"java","rule":"S2658"},{"repository":"java","rule":"S1449"},{"repository":"java","rule":"S3749"},{"repository":"php","rule":"S139"},{"repository":"java","rule":"S5128"},{"repository":"php","rule":"S2007"},{"repository":"php","rule":"S3337"},{"repository":"php","rule":"S3338"},{"repository":"java","rule":"S1200"},{"repository":"Web","rule":"ComplexityCheck"},{"repository":"Web","rule":"RequiredAttributeCheck"},{"repository":"php","rule":"S104"},{"repository":"java","rule":"S3658"},{"repository":"java","rule":"S2208"},{"repository":"java","rule":"S2444"},{"repository":"java","rule":"S2203"},{"repository":"java","rule":"S2325"},{"repository":"java","rule":"S3414"},{"repository":"Web","rule":"S1829"},{"repository":"java","rule":"S4174"},{"repository":"Web","rule":"IllegalTabCheck"},{"repository":"java","rule":"S1106"},{"repository":"java","rule":"S1228"},{"repository":"java","rule":"S1107"},{"repository":"java","rule":"S1108"},{"repository":"java","rule":"S1109"},{"repository":"xml","rule":"S3373"},{"repository":"java","rule":"S1105"},{"repository":"php","rule":"S5856"},{"repository":"java","rule":"S2063"},{"repository":"java","rule":"S3030"},{"repository":"java","rule":"S3032"},{"repository":"Web","rule":"DoubleQuotesCheck"},{"repository":"Web","rule":"MaxLineLengthCheck"},{"repository":"java","rule":"S105"},{"repository":"Web","rule":"LongJavaScriptCheck"},{"repository":"java","rule":"S103"},{"repository":"Web","rule":"WmodeIsWindowCheck"},{"repository":"java","rule":"S104"},{"repository":"java","rule":"S109"},{"repository":"java","rule":"S113"},{"repository":"java","rule":"S4926"},{"repository":"java","rule":"S4248"},{"repository":"java","rule":"S1774"},{"repository":"php","rule":"S1105"},{"repository":"php","rule":"S1106"},{"repository":"php","rule":"S1121"},{"repository":"Web","rule":"InputWithoutLabelCheck"},{"repository":"xml","rule":"S2260"},{"repository":"java","rule":"S2059"},{"repository":"java","rule":"S1641"},{"repository":"java","rule":"S2972"},{"repository":"java","rule":"S2973"},{"repository":"java","rule":"S2974"},{"repository":"java","rule":"S2057"},{"repository":"java","rule":"S6411"},{"repository":"php","rule":"S1117"},{"repository":"java","rule":"S3052"},{"repository":"php","rule":"S1451"},{"repository":"Web","rule":"NonConsecutiveHeadingCheck"},{"repository":"java","rule":"S126"},{"repository":"java","rule":"S923"},{"repository":"java","rule":"S134"},{"repository":"java","rule":"S1315"},{"repository":"java","rule":"S1312"},{"repository":"java","rule":"S1314"},{"repository":"java","rule":"S4266"},{"repository":"java","rule":"S1310"},{"repository":"java","rule":"S2196"},{"repository":"java","rule":"S2197"},{"repository":"java","rule":"S118"},{"repository":"java","rule":"S1309"},{"repository":"java","rule":"S3725"},{"repository":"java","rule":"S121"},{"repository":"java","rule":"S122"},{"repository":"Web","rule":"DynamicJspIncludeCheck"},{"repository":"php","rule":"S1578"},{"repository":"php","rule":"S5935"},{"repository":"Web","rule":"InlineStyleCheck"},{"repository":"java","rule":"S3047"},{"repository":"java","rule":"S1541"},{"repository":"java","rule":"S2260"},{"repository":"java","rule":"S2141"},{"repository":"php","rule":"S1311"},{"repository":"java","rule":"S2384"},{"repository":"php","rule":"S4142"},{"repository":"xml","rule":"S105"},{"repository":"java","rule":"S2701"},{"repository":"xml","rule":"S103"},{"repository":"java","rule":"S2148"},{"repository":"php","rule":"S881"},{"repository":"java","rule":"S2143"},{"repository":"java","rule":"S1176"},{"repository":"java","rule":"S1160"},{"repository":"php","rule":"S1200"},{"repository":"java","rule":"S2250"},{"repository":"java","rule":"S818"},{"repository":"java","rule":"S1162"},{"repository":"java","rule":"S4551"},{"repository":"java","rule":"S2131"},{"repository":"java","rule":"S138"},{"repository":"java","rule":"S139"},{"repository":"Web","rule":"IllegalNamespaceCheck"},{"repository":"php","rule":"S5915"},{"repository":"php","rule":"S1314"},{"repository":"java","rule":"S1166"},{"repository":"php","rule":"S1799"},{"repository":"java","rule":"S5793"},{"repository":"java","rule":"S1194"},{"repository":"java","rule":"S2162"},{"repository":"java","rule":"S2164"},{"repository":"xml","rule":"S3419"},{"repository":"Web","rule":"WhiteSpaceAroundCheck"},{"repository":"java","rule":"S3937"},{"repository":"xml","rule":"S1120"},{"repository":"java","rule":"S1996"},{"repository":"Web","rule":"MultiplePageDirectivesCheck"},{"repository":"xml","rule":"S3420"},{"repository":"java","rule":"S3254"},{"repository":"xml","rule":"S3423"},{"repository":"java","rule":"S2047"},{"repository":"php","rule":"S1541"},{"repository":"Web","rule":"InternationalizationCheck"},{"repository":"java","rule":"S3242"},{"repository":"java","rule":"S6073"},{"repository":"php","rule":"S2070"},{"repository":"java","rule":"S2959"},{"repository":"Web","rule":"LinkToNothingCheck"},{"repository":"Web","rule":"S1436"},{"repository":"java","rule":"S2039"},{"repository":"xml","rule":"S2321"},{"repository":"java","rule":"S1188"},{"repository":"java","rule":"S1067"},{"repository":"java","rule":"S2156"},{"repository":"java","rule":"S3366"},{"repository":"Web","rule":"LinksIdenticalTextsDifferentTargetsCheck"},{"repository":"php","rule":"S2047"},{"repository":"php","rule":"S2046"},{"repository":"java","rule":"S5970"},{"repository":"php","rule":"S2043"},{"repository":"php","rule":"S2042"},{"repository":"php","rule":"S1990"},{"repository":"php","rule":"S2044"},{"repository":"java","rule":"S864"},{"repository":"Web","rule":"MouseEventWithoutKeyboardEquivalentCheck"},{"repository":"java","rule":"S5979"},{"repository":"java","rule":"NoSonar"},{"repository":"java","rule":"S5977"},{"repository":"java","rule":"S5612"},{"repository":"java","rule":"S1258"},{"repository":"java","rule":"S3437"},{"repository":"Web","rule":"FileLengthCheck"},{"repository":"Web","rule":"JspScriptletCheck"},{"repository":"java","rule":"S2221"},{"repository":"java","rule":"S1132"},{"repository":"java","rule":"S3553"},{"repository":"php","rule":"NoSonar"},{"repository":"Web","rule":"IllegalTagLibsCheck"},{"repository":"php","rule":"S2050"},{"repository":"java","rule":"S3306"},{"repository":"java","rule":"S2698"},{"repository":"php","rule":"S1996"},{"repository":"php","rule":"S2964"},{"repository":"java","rule":"S2693"},{"repository":"java","rule":"S1120"},{"repository":"java","rule":"S2694"},{"repository":"java","rule":"S2211"},{"repository":"php","rule":"S1997"},{"repository":"java","rule":"S2333"},{"repository":"java","rule":"S1244"},{"repository":"php","rule":"S5899"},{"repository":"java","rule":"S1151"},{"repository":"Web","rule":"IllegalElementCheck"},{"repository":"java","rule":"S5194"},{"repository":"php","rule":"S2260"},{"repository":"java","rule":"S888"},{"repository":"java","rule":"S1711"},{"repository":"java","rule":"S3578"},{"repository":"php","rule":"S2036"},{"repository":"php","rule":"S2278"},{"repository":"php","rule":"S2277"},{"repository":"php","rule":"S1067"},{"repository":"php","rule":"S2830"},{"repository":"php","rule":"S2038"},{"repository":"php","rule":"S2037"},{"repository":"php","rule":"S5783"},{"repository":"java","rule":"S1939"},{"repository":"java","rule":"S1821"},{"repository":"java","rule":"S1942"},{"repository":"java","rule":"S1943"},{"repository":"java","rule":"S881"},{"repository":"java","rule":"S5867"},{"repository":"java","rule":"S1147"},{"repository":"java","rule":"S1820"},{"repository":"java","rule":"S1941"},{"repository":"java","rule":"S1142"},{"repository":"php","rule":"S2701"},{"repository":"Web","rule":"HeaderCheck"}]
netbeans.com-github-philippefichet-sonarlint4netbeans.rules_2e_parameters_2e_java_2e_S3776_2e_Threshold=15
netbeans.com-github-philippefichet-sonarlint4netbeans.extraProperties={}
netbeans.hint.jdkPlatform=JDK_19
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public class MetadataRecord implements EtagSupport, Serializable {
@NotNull(message = "A list of access control entries for resticting access.")
@OneToMany(cascade = jakarta.persistence.CascadeType.ALL, orphanRemoval = true)
private final Set<AclEntry> acl = new HashSet<>();
@NotBlank(message = "The uri of the license, e.g. for Apache-2.0 license this would be 'https://spdx.org/licenses/Apache-2.0'.")
private String licenseUri;
@NotBlank(message = "The metadata document uri, e.g. pointing to a local file.")
private String metadataDocumentUri;
@NotBlank(message = "The SHA-1 hash of the associated metadata file. The hash is used for comparison while updating.")
Expand Down
Loading

0 comments on commit f237005

Please sign in to comment.