chore: erweitere Resilience4j-Bundle um Kotlin-Support, aktualisiere PingController um Fallback-Logik, füge Fehlerhandler hinzu, verbessere PingControllerTest, synchronisiere .env und dc-infra.yaml
This commit is contained in:
+6
-4
@@ -52,10 +52,12 @@ class GlobalSecurityConfig {
|
||||
|
||||
@Bean
|
||||
fun jwtDecoder(): JwtDecoder {
|
||||
// Wenn jwk-set-uri gesetzt ist, nutzen wir sie.
|
||||
// Wir verzichten auf den Issuer-Check für maximale Flexibilität zwischen Docker/Host.
|
||||
val jwkSetUri = System.getenv("SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK_SET_URI")
|
||||
?: "http://keycloak:8080/realms/meldestelle/protocol/openid-connect/certs"
|
||||
// 1. Suche in System-Properties (Spring injects these)
|
||||
// 2. Suche in Environment Variables
|
||||
// 3. Fallback auf localhost (IDE-Start) oder keycloak (Docker-Start)
|
||||
val jwkSetUri = System.getProperty("spring.security.oauth2.resourceserver.jwt.jwk-set-uri")
|
||||
?: System.getenv("SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK_SET_URI")
|
||||
?: "http://localhost:8180/realms/meldestelle/protocol/openid-connect/certs"
|
||||
|
||||
val decoder = NimbusJwtDecoder.withJwkSetUri(jwkSetUri).build()
|
||||
val validator = DelegatingOAuth2TokenValidator<Jwt>(JwtTimestampValidator())
|
||||
|
||||
Reference in New Issue
Block a user