Skip to content

Commit

Permalink
Fixes tenant security config module
Browse files Browse the repository at this point in the history
  • Loading branch information
petruki committed Mar 23, 2024
1 parent d69022e commit e53f59e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.3</version>
<version>3.2.4</version>
<relativePath />
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
13 changes: 13 additions & 0 deletions trackerforce-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@

<!-- Test-->
<flapdoodle.embed.mongo.version>4.12.2</flapdoodle.embed.mongo.version>

<!-- Managed Dependencies -->
<commons-compress.version>1.26.1</commons-compress.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -118,4 +121,14 @@
<version>${springdoc-openapi-starter-webmvc-ui.version}</version>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${commons-compress.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

0 comments on commit e53f59e

Please sign in to comment.