From e53f59eb3e89fab550d798ed2d6b6dc275ab2292 Mon Sep 17 00:00:00 2001
From: petruki <31597636+petruki@users.noreply.github.com>
Date: Sat, 23 Mar 2024 14:34:44 -0700
Subject: [PATCH] Fixes tenant security config module
---
pom.xml | 2 +-
.../tenant/config/MultiTenantSecurityConfig.java | 9 +--------
trackerforce-common/pom.xml | 13 +++++++++++++
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/pom.xml b/pom.xml
index 686687f..d128259 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
org.springframework.boot
spring-boot-starter-parent
- 3.2.3
+ 3.2.4
diff --git a/trackerforce-common-tenancy/src/main/java/com/trackerforce/common/tenant/config/MultiTenantSecurityConfig.java b/trackerforce-common-tenancy/src/main/java/com/trackerforce/common/tenant/config/MultiTenantSecurityConfig.java
index 15fbf1b..d7bd802 100644
--- a/trackerforce-common-tenancy/src/main/java/com/trackerforce/common/tenant/config/MultiTenantSecurityConfig.java
+++ b/trackerforce-common-tenancy/src/main/java/com/trackerforce/common/tenant/config/MultiTenantSecurityConfig.java
@@ -16,18 +16,11 @@
@EnableMethodSecurity
public class MultiTenantSecurityConfig extends SecurityConfig {
- private static final String[] SWAGGER_MATCHERS = {
- "/v3/api-docs/**",
- "/swagger-ui/**",
- "/swagger-ui.html",
- };
-
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.authorizeHttpRequests(auth ->
auth.requestMatchers(allowedEndpoint).permitAll()
- .requestMatchers(SWAGGER_MATCHERS).permitAll()
- .requestMatchers("/**").access(this::authorize));
+ .anyRequest().access(this::authorize));
http.exceptionHandling(auth -> auth.authenticationEntryPoint(jwtAuthenticationEntryPoint));
http.sessionManagement(auth -> auth.sessionCreationPolicy(SessionCreationPolicy.STATELESS));
diff --git a/trackerforce-common/pom.xml b/trackerforce-common/pom.xml
index bb6522f..c34ece0 100644
--- a/trackerforce-common/pom.xml
+++ b/trackerforce-common/pom.xml
@@ -33,6 +33,9 @@
4.12.2
+
+
+ 1.26.1
@@ -118,4 +121,14 @@
${springdoc-openapi-starter-webmvc-ui.version}
+
+
+
+
+ org.apache.commons
+ commons-compress
+ ${commons-compress.version}
+
+
+