Skip to content

Commit 3616699

Browse files
author
RPKI Team at RIPE NCC
committed
RIPE NCC has merged fe98b5a
* fix(deps): update dependency org.springframework:spring-context to v6.2.15 [82cd0653] * fix(deps): update dependency commons-io:commons-io to v2.21.0 [43a4570a] * chore(deps): update dependency org.sonarqube:org.sonarqube.gradle.plugin to v7.2.2.6593 [f546fb27] * chore(deps): update plugin com.google.cloud.tools.jib to v3.5.2 [e0cf0fee] * fix(deps): update dependency org.wiremock:wiremock-jetty12 to v3.13.2 [1bda560a] * fix(deps): update dependency commons-codec:commons-codec to v1.20.0 [37f325ae] * fix(deps): update dependency io.sentry:sentry-bom to v8.29.0 [9ebaff46] * chore(deps): update dependency org.eclipse.jgit:org.eclipse.jgit to v7.5.0.202512021534-r [93c5b858] * renovate: extend recommended config [2559c5cb] * gitlab: fix deploy check [d5bbe311] * spring-boot: 3.2.12 -> 3.5.9 [aeb7c7c1] * gradle: cleanup capabilities for thales HSM implementation [bc4996fc] * gradle: cleanup build files [454c1ccd] * gradle: fix property assignment deprecation [4e8710be] * renovatebot: fix labels and minimum release age [c4422ecc] * gitlab: generate lockfile for dependency analysis [87c0deb3] * gitlab: auto-approve dependency update MRs [d1df6ce4] * Simplify [74cc25e1] * Same for ta_published_object [3cafbe94] * Formatting [33297495] * Do not recalculate SHA256 with every query [435eaedb] * renovate: fix configuration [4e22ea33] * renovate: update dependencies on 'next' branch [ae19578e]
1 parent c569475 commit 3616699

37 files changed

Lines changed: 140 additions & 136 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ target/
44
# Gradle
55
.gradle/
66
build/
7+
gradle.lockfile
78

89
# direnv
910
.direnv

.gitlab-ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ include:
3232
file: /templates/security.yml
3333
inputs:
3434
stage: security
35+
needs: ["lockfile"]
36+
- project: swe/gitlab-support
37+
file: /templates/approval.yml
38+
inputs:
39+
stage: .post
40+
label: renovatebot
41+
access-token: "$APPROVAL_BOT_ACCESS_TOKEN"
3542

3643
variables:
3744
BUILD_NUMBER: ${CI_COMMIT_REF_SLUG}-${CI_PIPELINE_ID}
@@ -71,6 +78,14 @@ build:
7178
junit:
7279
- build/test-results/**/*.xml
7380

81+
lockfile:
82+
stage: build
83+
script:
84+
- gradle dependencies --write-locks
85+
artifacts:
86+
paths:
87+
- "gradle.lockfile"
88+
7489
sonarqube:
7590
stage: security
7691
needs: ["build"]

build.gradle

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
plugins {
22
id 'rpki-ripe-ncc.build-conventions'
3-
id 'org.springframework.boot' version "3.2.12"
3+
id 'org.springframework.boot' version "3.5.9"
44
id 'distribution'
55
id 'jacoco'
6-
id "com.google.cloud.tools.jib" version "3.4.5"
6+
id "com.google.cloud.tools.jib" version "3.5.2"
77
id "com.google.osdetector" version "1.7.3"
88
}
99

@@ -12,19 +12,17 @@ apply plugin: 'io.spring.dependency-management'
1212

1313
apply from: "dependencies.gradle"
1414

15-
// Use this style to override dependencies when needed:
16-
// ext['log4j2.version'] = '2.17.1'
17-
1815
def ENV = System.getenv()
19-
def hsmImpl = ENV['HSM_IMPL'] ?: 'api-only'
16+
def useThalesHsm = ENV['HSM_IMPL'] == "thales"
2017

2118
description = 'RPKI RIPE NCC'
2219
version = ENV['BUILD_NUMBER'] ?: 'DEV'
2320

21+
ext['hibernate.version'] = '6.2.49.Final'
22+
2423
def managedVersions = dependencyManagement.managedVersions
2524

2625
dependencies {
27-
//developmentOnly 'org.springframework.boot:spring-boot-devtools'
2826
implementation 'org.springframework.boot:spring-boot-starter'
2927
implementation 'org.springframework.boot:spring-boot-starter-actuator'
3028
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
@@ -34,17 +32,16 @@ dependencies {
3432
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
3533
implementation 'org.springframework.boot:spring-boot-starter-quartz'
3634
implementation 'org.springframework.boot:spring-boot-starter-security'
37-
// for http client - we do not use reactive patterns in general
3835
implementation 'org.springframework.boot:spring-boot-starter-webflux'
3936
if (osdetector.os == "osx") {
4037
runtimeOnly "io.netty:netty-resolver-dns-native-macos:${managedVersions['io.netty:netty-resolver-dns-native-macos']}:osx-${osdetector.arch}"
4138
}
42-
implementation 'org.flywaydb:flyway-core'
39+
implementation 'org.flywaydb:flyway-database-postgresql'
4340

4441
implementation "org.thymeleaf:thymeleaf:3.1.2.RELEASE"
4542
implementation "org.thymeleaf:thymeleaf-spring6:3.1.3.RELEASE"
4643

47-
implementation platform('io.sentry:sentry-bom:8.26.0')
44+
implementation platform('io.sentry:sentry-bom:8.29.0')
4845
implementation 'io.sentry:sentry-spring-boot-starter'
4946
implementation 'io.sentry:sentry-logback'
5047

@@ -58,8 +55,8 @@ dependencies {
5855

5956
implementation 'com.google.code.gson:gson:2.13.2'
6057
implementation 'com.jamesmurty.utils:java-xmlbuilder:1.3'
61-
implementation 'commons-codec:commons-codec:1.19.0'
62-
implementation 'commons-io:commons-io:2.20.0'
58+
implementation 'commons-codec:commons-codec:1.20.0'
59+
implementation 'commons-io:commons-io:2.21.0'
6360
implementation 'ch.qos.logback.contrib:logback-json-classic:0.1.5'
6461
implementation 'ch.qos.logback.contrib:logback-jackson:0.1.5'
6562
implementation 'net.logstash.logback:logstash-logback-encoder:8.1'
@@ -72,20 +69,20 @@ dependencies {
7269
exclude group: 'org.hamcrest', module: 'hamcrest-core'
7370
}
7471

75-
testImplementation "org.wiremock:wiremock-jetty12:3.9.2"
72+
testImplementation "org.wiremock:wiremock-jetty12:3.13.2"
7673
testImplementation 'net.jqwik:jqwik:1.9.3'
7774
testImplementation("net.ripe.rpki:rpki-commons:$rpki_commons_version:tests") {
7875
exclude group: "net.sf.saxon", module: "Saxon-HE"
7976
}
8077
testImplementation 'org.assertj:assertj-core'
8178

82-
8379
implementation (project(':hsm')) {
84-
capabilities {
85-
requireCapability('net.ripe.rpki.hsm:' + hsmImpl)
80+
if (useThalesHsm) {
81+
capabilities {
82+
requireCapability('net.ripe.rpki.hsm:thales')
83+
}
8684
}
8785
}
88-
8986
}
9087

9188
sourceSets {
@@ -103,6 +100,10 @@ configurations {
103100
integrationRuntimeOnly.extendsFrom testRuntimeOnly
104101
}
105102

103+
dependencyLocking {
104+
lockAllConfigurations()
105+
}
106+
106107
tasks.withType(Tar) {
107108
compression = Compression.GZIP
108109
}
@@ -121,7 +122,6 @@ task integrationTest(type: Test) {
121122
mustRunAfter test
122123
}
123124

124-
// run integration tests as part of `check`
125125
tasks.named('check') {
126126
dependsOn tasks.named('integrationTest')
127127
}

buildSrc/build.gradle

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ plugins {
44

55
repositories {
66
maven {
7-
url "https://plugins.gradle.org/m2/"
7+
url = "https://plugins.gradle.org/m2/"
88
}
99
}
1010

1111
dependencies {
1212
implementation 'io.freefair.lombok:io.freefair.lombok.gradle.plugin:9.0.0'
13-
implementation('com.gorylenko.gradle-git-properties:com.gorylenko.gradle-git-properties.gradle.plugin:2.5.3') {
14-
exclude group: 'org.eclipse.jgit', module: 'org.eclipse.jgit'
15-
}
16-
implementation 'org.eclipse.jgit:org.eclipse.jgit:7.4.0.202509020913-r'
17-
implementation 'org.sonarqube:org.sonarqube.gradle.plugin:7.0.1.6134'
13+
implementation 'com.gorylenko.gradle-git-properties:com.gorylenko.gradle-git-properties.gradle.plugin:2.5.3'
14+
implementation 'org.eclipse.jgit:org.eclipse.jgit:7.5.0.202512021534-r'
15+
implementation 'org.sonarqube:org.sonarqube.gradle.plugin:7.2.2.6593'
1816
}

buildSrc/src/main/groovy/rpki-ripe-ncc.build-conventions.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ repositories {
3535
maven {
3636
url = uri('https://maven.nexus.ripe.net/repository/maven-third-party')
3737
}
38-
// Use when testing new third party dependencies
39-
// maven {
40-
// url = uri('https://maven.nexus.ripe.net/repository/maven-third-party-snapshots')
41-
// }
4238
}
4339

4440
java {

hsm/build.gradle

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,20 @@ sourceSets {
1313
}
1414

1515
java {
16-
registerFeature("apiOnly") {
17-
usingSourceSet(sourceSets.main)
18-
capability('net.ripe.rpki.hsm', 'api-only', '1.0')
19-
}
20-
2116
registerFeature("thales") {
2217
usingSourceSet(sourceSets.thales)
2318
capability('net.ripe.rpki.hsm', 'thales', '1.0')
2419
}
2520
}
2621

2722
dependencies {
28-
thalesApi (project(':hsm')) {
29-
capabilities {
30-
requireCapability('net.ripe.rpki.hsm:api-only')
31-
}
32-
}
23+
thalesApi (project(':hsm'))
3324
thalesImplementation("net.ripe.rpki:rpki-commons:$rpki_commons_version")
3425

35-
// 2024-4-26: Final DBProvider 1.6 provided by Entrust
3626
thalesImplementation 'com.thales.esecurity.asg.ripe.db-jceprovider:DBProvider:1.6'
37-
// **When using JDK 11** make sure the matching version of nCipherKM is on classpath because DBProvider depends on it.
3827
thalesImplementation 'com.ncipher.nfast:nCipherKM:13.6.12'
3928

40-
thalesImplementation 'org.springframework:spring-context:6.1.15'
41-
// used in spring-context, but not exported.
29+
thalesImplementation 'org.springframework:spring-context:6.2.15'
4230
thalesImplementation 'javax.annotation:javax.annotation-api:1.3.2'
43-
thalesImplementation "org.springframework.boot:spring-boot-autoconfigure:2.7.18"
31+
thalesImplementation "org.springframework.boot:spring-boot-autoconfigure:3.5.9"
4432
}

renovate.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"enabled": true,
4-
"autoApprove": true,
54
"extends": [
6-
"config:base",
5+
"config:recommended",
76
"group:recommended"
87
],
8+
"baseBranchPatterns": ["next"],
99
"schedule": "after 8am and before 1pm every weekday",
1010
"dependencyDashboard": true,
1111
"osvVulnerabilityAlerts": true,
12+
"minimumReleaseAge": "3 days",
13+
"labels": ["renovatebot:dependencies"],
1214
"vulnerabilityAlerts": {
13-
"labels": ["security"],
15+
"labels": ["renovatebot:security"],
1416
"automerge": true
1517
},
1618
"packageRules": [
17-
{
18-
"minimumReleaseAge": "3 days"
19-
},
2019
{
2120
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
2221
"automerge": true

scripts/gitlab-deploy-check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ const main = async (ctx) => {
190190
status: "success",
191191
})();
192192
const timeline = [...deployments].sort(Calendar.compare((x) => x.finished_at))
193+
.filter((x) => x.deployable != null)
193194
.filter((x) => !Calendar.isAfter(x.deployable.created_at, mergeRequest.merged_at))
194195
.reduce((acc, x) => acc.find(({id}) => id === x.id) != null ? acc : [...acc, x], []);
195196

src/main/java/net/ripe/rpki/config/actuator/ActiveNodeEndpoint.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
import lombok.Value;
66
import net.ripe.rpki.server.api.services.system.ActiveNodeService;
77
import org.springframework.beans.factory.annotation.Autowired;
8-
import org.springframework.boot.actuate.endpoint.web.annotation.RestControllerEndpoint;
8+
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
9+
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
910
import org.springframework.stereotype.Component;
10-
import org.springframework.web.bind.annotation.GetMapping;
1111

1212
@AllArgsConstructor
1313
@Component
14-
@RestControllerEndpoint(id="active-node")
14+
@Endpoint(id="active-node")
1515
public class ActiveNodeEndpoint {
1616
@Autowired
1717
private ActiveNodeService activeNodeService;
1818

19-
@GetMapping()
19+
@ReadOperation()
2020
public ActiveNodeStatus activeNodeStatus() {
2121
return ActiveNodeStatus.builder()
2222
.activeNodeName(activeNodeService.getActiveNodeName())

src/main/java/net/ripe/rpki/domain/ManagedCertificateAuthority.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static EventSubscription subscribe(final CertificateAuthorityEventVisitor
6161
return EVENTS.subscribe(event -> event.accept(listener, recording));
6262
}
6363

64-
@OneToMany(orphanRemoval = true, cascade = CascadeType.ALL )
64+
@OneToMany(orphanRemoval = true, cascade = CascadeType.ALL)
6565
@JoinColumn(name = "ca_id", nullable = false)
6666
private final Set<KeyPairEntity> keyPairs = new HashSet<>();
6767

0 commit comments

Comments
 (0)