Skip to content

Update backend dependencies #904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:21-jre-alpine
FROM eclipse-temurin:23-jre-alpine
MAINTAINER [email protected]
COPY build/libs/cmsch.jar /opt/cmsch/
WORKDIR /opt/cmsch
Expand Down
18 changes: 9 additions & 9 deletions backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("org.springframework.boot") version "3.4.5"
id("org.springframework.boot") version "3.5.0"
id("io.spring.dependency-management") version "1.1.7"
id("org.owasp.dependencycheck") version "12.1.1"
kotlin("jvm") version "2.1.20"
kotlin("plugin.spring") version "2.1.20"
id("org.sonarqube") version "4.4.1.3373"
kotlin("jvm") version "2.1.21"
kotlin("plugin.spring") version "2.1.21"
id("org.sonarqube") version "6.2.0.5505"
}

group = "hu.bme.sch"
Expand Down Expand Up @@ -42,8 +42,8 @@ repositories {
}

dependencies {
implementation("com.google.firebase:firebase-admin:9.4.3")
implementation("software.amazon.awssdk:s3:2.31.32")
implementation("com.google.firebase:firebase-admin:9.5.0")
implementation("software.amazon.awssdk:s3:2.31.57")
implementation("jakarta.xml.bind:jakarta.xml.bind-api:4.0.2")
implementation("org.springframework.boot:spring-boot-configuration-processor")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
Expand All @@ -59,11 +59,11 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-aop")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.itextpdf:itext-core:9.1.0")
implementation("com.itextpdf:itext-core:9.2.0")
implementation("com.github.spullara.mustache.java:compiler:0.9.14")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.6")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.8")
implementation("com.google.zxing:core:3.5.3")
implementation("com.google.zxing:javase:3.5.3")
implementation("io.jsonwebtoken:jjwt-api:0.12.6")
Expand All @@ -77,7 +77,7 @@ dependencies {
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
runtimeOnly("com.h2database:h2")
implementation("org.postgresql:postgresql")
implementation(platform("io.micrometer:micrometer-bom:1.14.6"))
implementation(platform("io.micrometer:micrometer-bom:1.15.0"))
implementation("io.micrometer:micrometer-core")
implementation("io.micrometer:micrometer-registry-prometheus")
implementation("io.micrometer:micrometer-observation")
Expand Down
2 changes: 1 addition & 1 deletion backend/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.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
101 changes: 50 additions & 51 deletions backend/src/main/kotlin/hu/bme/sch/cmsch/config/SecurityConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest
import org.springframework.security.oauth2.core.oidc.user.DefaultOidcUser
import org.springframework.security.oauth2.core.user.DefaultOAuth2User
import org.springframework.security.web.SecurityFilterChain
import org.springframework.security.web.util.matcher.AntPathRequestMatcher.antMatcher
import org.springframework.web.reactive.function.client.WebClient
import java.util.*

Expand Down Expand Up @@ -74,51 +73,51 @@ open class SecurityConfig(
fun securityFilterChain(http: HttpSecurity): SecurityFilterChain {
http.authorizeHttpRequests {
it.requestMatchers(
antMatcher("/"),
antMatcher("/error"),
antMatcher("/403"),
antMatcher("/404"),
antMatcher("/control/loggedin"),
antMatcher("/control/login"),
antMatcher("/control/logged-out"),
antMatcher("/control/post-login"),
antMatcher("/style4.css"),
antMatcher("/flatpickr_custom.css"),
antMatcher("/tabulator_simple.css"),
antMatcher("/tabulator_simple.min.css.map"),
antMatcher("/control/test-user"),
antMatcher("/images/**"),
antMatcher("/js/**"),
antMatcher("/docs-icons/**"),
antMatcher("/files/**"),
antMatcher("/admin/logout"),
antMatcher("/countdown"),
antMatcher("/control/logout"),
antMatcher("/control/test"),
antMatcher("/control/open-site"),
antMatcher("/api/**"),
antMatcher("/remote-api/**"),
antMatcher("/share/**"),
antMatcher("/swagger-ui.html"),
antMatcher("/swagger-ui/**"),
antMatcher("/v3/api-docs/**"),
antMatcher("/${StorageService.OBJECT_SERVE_PATH}/**"),
antMatcher("/manifest/manifest.json"),
antMatcher("/control/refresh"),
antMatcher("/oauth2/authorization"),
antMatcher("/c/**"),
antMatcher("/ol.js"),
antMatcher("/ol.css"),
antMatcher("/tracker.css"),
antMatcher("/scanner.css"),
antMatcher("/redirect/beacon"),
antMatcher("/actuator/prometheus"),
antMatcher("/actuator/health/liveness"),
antMatcher("/actuator/health/readiness"),
"/",
"/error",
"/403",
"/404",
"/control/loggedin",
"/control/login",
"/control/logged-out",
"/control/post-login",
"/style4.css",
"/flatpickr_custom.css",
"/tabulator_simple.css",
"/tabulator_simple.min.css.map",
"/control/test-user",
"/images/**",
"/js/**",
"/docs-icons/**",
"/files/**",
"/admin/logout",
"/countdown",
"/control/logout",
"/control/test",
"/control/open-site",
"/api/**",
"/remote-api/**",
"/share/**",
"/swagger-ui.html",
"/swagger-ui/**",
"/v3/api-docs/**",
"/${StorageService.OBJECT_SERVE_PATH}/**",
"/manifest/manifest.json",
"/control/refresh",
"/oauth2/authorization",
"/c/**",
"/ol.js",
"/ol.css",
"/tracker.css",
"/scanner.css",
"/redirect/beacon",
"/actuator/prometheus",
"/actuator/health/liveness",
"/actuator/health/readiness",
).permitAll()

it.requestMatchers(
antMatcher("/control/open-site"),
"/control/open-site",
).hasAnyRole(
RoleType.BASIC.name,
RoleType.STAFF.name,
Expand All @@ -129,8 +128,8 @@ open class SecurityConfig(
)

it.requestMatchers(
antMatcher("/admin/**"),
antMatcher("/${StorageService.OBJECT_SERVE_PATH}/**")
"/admin/**",
"/${StorageService.OBJECT_SERVE_PATH}/**",
).hasAnyRole(
RoleType.STAFF.name,
RoleType.ADMIN.name,
Expand Down Expand Up @@ -165,12 +164,12 @@ open class SecurityConfig(
countdownConfigurer.ifPresent { http.with(it, Customizer.withDefaults()) }
http.csrf {
it.ignoringRequestMatchers(
antMatcher("/api/**"),
antMatcher("/remote-api/**"),
antMatcher("/admin/api/**"),
antMatcher("/admin/sell/**"),
antMatcher("/admin/admission/**"),
antMatcher("/${StorageService.OBJECT_SERVE_PATH}/**")
"/api/**",
"/remote-api/**",
"/admin/api/**",
"/admin/sell/**",
"/admin/admission/**",
"/${StorageService.OBJECT_SERVE_PATH}/**",
)
}.cors(Customizer.withDefaults())
return http.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class FilesystemStorageService(
private fun constructObjectUrl(path: String, name: String) = constructObjectUrl(getObjectName(path, name))

private fun constructObjectUrl(fullName: String): String =
UriComponentsBuilder.fromHttpUrl(applicationComponent.adminSiteUrl.getValue())
UriComponentsBuilder.fromUriString(applicationComponent.adminSiteUrl.getValue())
.pathSegment(StorageService.OBJECT_SERVE_PATH, fullName)
.build()
.toUriString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class S3StorageService(
}

private fun getS3PublicUrl(fullName: String) =
UriComponentsBuilder.fromHttpUrl(startupPropertyConfig.s3PublicEndpoint)
UriComponentsBuilder.fromUriString(startupPropertyConfig.s3PublicEndpoint)
.pathSegment(startupPropertyConfig.s3Bucket, fullName)
.build()
.toUriString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ spring.devtools.add-properties=false
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.h2.console.enabled=false
spring.jpa.hibernate.ddl-auto=update
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ spring.datasource.url=jdbc:postgresql://${POSTGRES_IP:localhost:5432}/${POSTGRES
spring.datasource.username=${POSTGRES_USER:psqluser}
spring.datasource.password=${POSTGRES_PW:psqlpw}
spring.jpa.hibernate.ddl-auto=${POSTGRES_DDL:update}
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.datasource.driverClassName=org.postgresql.Driver
2 changes: 1 addition & 1 deletion backend/src/main/resources/config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ spring.profiles.include=${CMSCH_SPRING_PROFILES:}
server.error.include-stacktrace=always
spring.threads.virtual.enabled=true
hu.bme.sch.cmsch.startup.sysadmins=${SYSADMINS:6af3c8b0-592c-6864-8dd9-5f354edfc0be}
spring.jpa.open-in-view=false

spring.session.jdbc.initialize-schema=always
spring.session.jdbc.schema=classpath:org/springframework/session/jdbc/schema-@@platform@@.sql
Expand Down Expand Up @@ -61,7 +62,6 @@ hu.bme.sch.cmsch.startup.increased-session-time=172800
spring.datasource.driverClassName=org.h2.Driver
#spring.datasource.username=sa
#spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
#spring.datasource.url=jdbc:h2:file:./temp/db
spring.h2.console.enabled=false
spring.jpa.hibernate.ddl-auto=update
Expand Down
Loading