security: Demand authentication for non-permitted paths

This commit is contained in:
2025-08-10 09:25:04 +02:00
parent cbedde2c4c
commit 18aa9af708
@@ -36,7 +36,7 @@ open class WebSecurityConfiguration {
.csrf { it.disable() }
.authorizeHttpRequests { it.requestMatchers(*PERMITTED_PATHS.toTypedArray<String>()).permitAll() }
.authorizeHttpRequests { it.requestMatchers(HttpMethod.OPTIONS).permitAll() }
.authorizeHttpRequests { it.anyRequest().permitAll() }
.authorizeHttpRequests { it.anyRequest().authenticated() }
.oauth2ResourceServer { obj: OAuth2ResourceServerConfigurer<HttpSecurity?> -> obj.jwt(Customizer.withDefaults()) }
return http.build()
}