fixing auth-build konflikte

This commit is contained in:
2025-10-04 13:28:41 +02:00
parent dabb7bf5e3
commit 1ed5f3bfca
7 changed files with 34 additions and 10 deletions
+6
View File
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// Dieses Modul ist das API-Gateway und der einzige öffentliche Einstiegspunkt
// für alle externen Anfragen an das Meldestelle-System.
plugins {
@@ -104,3 +106,7 @@ tasks.register<Test>("integrationTest") {
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.compilerOptions {
freeCompilerArgs.set(listOf("-Xannotation-default-target=param-property"))
}
@@ -8,8 +8,8 @@ import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity
import org.springframework.security.config.web.server.ServerHttpSecurity
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder
import org.springframework.security.oauth2.jwt.NimbusReactiveJwtDecoder
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder
import org.springframework.security.web.server.SecurityWebFilterChain
import org.springframework.web.cors.CorsConfiguration
import org.springframework.web.cors.reactive.CorsConfigurationSource
@@ -66,8 +66,8 @@ import java.time.Duration
@EnableConfigurationProperties(GatewaySecurityProperties::class)
class SecurityConfig(
private val securityProperties: GatewaySecurityProperties,
@Value("\${keycloak.issuer-uri:}") private val issuerUri: String,
@Value("\${keycloak.jwk-set-uri:}") private val jwkSetUri: String
@Value($$"${keycloak.issuer-uri:}") private val issuerUri: String,
@Value($$"${keycloak.jwk-set-uri:}") private val jwkSetUri: String
) {
/**
@@ -75,7 +75,7 @@ class SecurityConfig(
*
* Diese Methode konfiguriert die reaktive Sicherheits-Filterkette mit:
* - CSRF deaktiviert für zustandslosen API-Betrieb
* - Expliziter CORS-Konfiguration für Cross-Origin-Unterstützung
* - Explizite CORS-Konfiguration für Cross-Origin-Unterstützung
* - Permissiver Autorisierung (Authentifizierung durch den JWT-Filter)
*
* Die Konfiguration bleibt kompatibel mit der bestehenden Filterarchitektur