From 11d9f301c042e73caa74b9fab89d09f8bcf325ab Mon Sep 17 00:00:00 2001 From: "idriss.naji" Date: Mon, 7 Nov 2022 14:04:38 +0100 Subject: [PATCH] fix: enable Swagger UI after CVEs fixes --- pom.xml | 22 ++++++++----------- .../agencyservice/config/SecurityConfig.java | 2 +- src/main/resources/application.properties | 1 + 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 238b7302..4f4bf5a0 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,6 @@ 6.2.0 5.11.10.Final 0.2.3 - 3.0.0 2.1.1 3.11 4.1.1 @@ -40,6 +39,8 @@ 5.0.0 2.7.5 4.9.1 + 3.0.0 + 5.7.5 @@ -69,6 +70,11 @@ spring-boot-starter-validation + + org.springframework.security + spring-security-core + ${spring-security-core.version} + org.hibernate @@ -91,18 +97,8 @@ io.springfox - springfox-swagger2 - ${springfox-swagger2.version} - - - io.springfox - springfox-bean-validators - ${springfox-swagger2.version} - - - io.springfox - springfox-swagger-ui - ${springfox-swagger2.version} + springfox-boot-starter + ${springfox-boot-starter.version} diff --git a/src/main/java/de/caritas/cob/agencyservice/config/SecurityConfig.java b/src/main/java/de/caritas/cob/agencyservice/config/SecurityConfig.java index 6be574c6..b1d52c65 100644 --- a/src/main/java/de/caritas/cob/agencyservice/config/SecurityConfig.java +++ b/src/main/java/de/caritas/cob/agencyservice/config/SecurityConfig.java @@ -33,7 +33,7 @@ public class SecurityConfig extends KeycloakWebSecurityConfigurerAdapter { public static final String[] WHITE_LIST = new String[]{"/agencies/docs", "/agencies/docs/**", "/v2/api-docs", "/configuration/ui", - "/swagger-resources/**", "/configuration/security", "/swagger-ui.html", "/webjars/**"}; + "/swagger-resources/**", "/configuration/security", "/swagger-ui.html", "/swagger-ui/**", "/webjars/**"}; @SuppressWarnings("unused") private final KeycloakClientRequestFactory keycloakClientRequestFactory; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 7a19c50f..36e0ba09 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -13,6 +13,7 @@ server.port=8080 spring.mvc.locale=de_DE spring.jackson.time-zone=Europe/Berlin +spring.mvc.pathmatch.matching-strategy=ant_path_matcher # Logging: SLF4J (via Lombok) logging.file.name=log/agencyservice.log