diff --git a/CHANGELOG.md b/CHANGELOG.md index ef27214a..81e47871 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 0.3.21 -### Added - -## fixed -- Fixed handling of Oauth (Bearer token). - ## 0.3.20 ### Added - Length for Column "SUB_PROTOCOL_BODY" has been extended to 2048. diff --git a/backend/src/main/java/org/eclipse/tractusx/semantics/registry/security/OAuthSecurityConfig.java b/backend/src/main/java/org/eclipse/tractusx/semantics/registry/security/OAuthSecurityConfig.java index 34edad22..ffe01b59 100644 --- a/backend/src/main/java/org/eclipse/tractusx/semantics/registry/security/OAuthSecurityConfig.java +++ b/backend/src/main/java/org/eclipse/tractusx/semantics/registry/security/OAuthSecurityConfig.java @@ -69,11 +69,9 @@ protected SecurityFilterChain configure(HttpSecurity http) throws Exception { //getDescription allowed for reader .requestMatchers( HttpMethod.GET, "/**/description" ).access( "@authorizationEvaluator.hasRoleViewDigitalTwin()" ) ) - .csrf().disable() - .sessionManagement().sessionCreationPolicy( SessionCreationPolicy.STATELESS ) - .and() - .oauth2ResourceServer() - .jwt(); + .csrf(CsrfConfigurer::disable) + .sessionManagement(sessionManagement -> sessionManagement.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .oauth2ResourceServer(oauth2ResourceServerConfigurer -> oauth2ResourceServerConfigurer.jwt()); return http.build(); }