Skip to content
Snippets Groups Projects
Commit e770ea4a authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4939 Removed old variables

parent 326557f5
No related branches found
No related tags found
No related merge requests found
......@@ -20,8 +20,6 @@
package de.ozgcloud.admin.security;
import org.apache.http.HttpHeaders;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
......@@ -39,8 +37,7 @@ import org.springframework.security.web.SecurityFilterChain;
public class SecurityConfiguration {
@Bean
SecurityFilterChain filterChain(HttpSecurity http, ServerProperties serverProperties, @Value("${permit-all:[]}") String[] permitAll)
throws Exception {
SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
// Configure a resource server with JWT decoder
http.oauth2ResourceServer(oauth2 -> oauth2.jwt(Customizer.withDefaults()));
......@@ -57,7 +54,6 @@ public class SecurityConfiguration {
response.sendError(HttpStatus.UNAUTHORIZED.value(), HttpStatus.UNAUTHORIZED.getReasonPhrase());
}));
// @formatter:off
http.authorizeHttpRequests(requests -> requests
.requestMatchers(HttpMethod.GET, "/api/environment").permitAll()
.requestMatchers("/api").authenticated()
......@@ -66,7 +62,6 @@ public class SecurityConfiguration {
.requestMatchers("/actuator/**").permitAll()
.requestMatchers("/configserver/**").permitAll()
.anyRequest().denyAll());
// @formatter:on
return http.build();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment