Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-spring-boot-starter</artifactId>
Expand Down Expand Up @@ -139,6 +131,7 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
Expand Down
8 changes: 1 addition & 7 deletions src/main/java/dev/vality/wachter/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

import static org.springframework.security.config.Customizer.withDefaults;


@Configuration
@ComponentScan(
basePackageClasses = KeycloakSecurityComponents.class,
Expand All @@ -43,10 +40,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.requestMatchers(HttpMethod.GET, "/**/health/liveness").permitAll()
.requestMatchers(HttpMethod.GET, "/**/health/readiness").permitAll()
.requestMatchers(HttpMethod.GET, "/**/actuator/prometheus").permitAll()
.anyRequest().authenticated())
.oauth2Login(withDefaults())
.oauth2Client(withDefaults())
.oauth2ResourceServer(withDefaults());
.anyRequest().authenticated());

return http.build();
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
server:
port: '@server.port@'
port: '${server.port}'
management:
security:
flag: false
server:
port: '@management.port@'
port: '${management.port}'
metrics:
tags:
application: '@project.name@'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import dev.vality.wachter.exeptions.WachterException;
import dev.vality.wachter.testutil.TMessageUtil;
import lombok.SneakyThrows;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.thrift.protocol.TProtocolFactory;
import org.junit.jupiter.api.AfterEach;
Expand Down