From 7c3c197e3ddce4cb25f7178238b00db5a421ab11 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Sun, 11 Feb 2024 23:24:56 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=EC=A1=B4=EC=9E=AC=ED=95=98=EC=A7=80?= =?UTF-8?q?=20=EC=95=8A=EB=8A=94=20=EC=84=A4=EC=A0=95=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 41ff71fc6..f11df1e7d 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -6,7 +6,6 @@ spring: dev: "dev, datasource" include: - redis - - storage - security - swagger From 6b7e8c4a4272839e12c055530258bd645a0478e7 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Sun, 11 Feb 2024 23:26:32 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20url=EC=97=90=20=EB=94=B0=EB=A5=B8?= =?UTF-8?q?=20=EC=9D=B8=EC=A6=9D=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gdsc/global/config/WebSecurityConfig.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/gdschongik/gdsc/global/config/WebSecurityConfig.java b/src/main/java/com/gdschongik/gdsc/global/config/WebSecurityConfig.java index 18f9fb40b..e8442305d 100644 --- a/src/main/java/com/gdschongik/gdsc/global/config/WebSecurityConfig.java +++ b/src/main/java/com/gdschongik/gdsc/global/config/WebSecurityConfig.java @@ -82,6 +82,18 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.addFilterAfter(jwtExceptionFilter(objectMapper), LogoutFilter.class); http.addFilterAfter(jwtFilter(jwtService, cookieUtil), LogoutFilter.class); + http.authorizeHttpRequests(authorize -> authorize + .requestMatchers("/oauth2/**") + .permitAll() + .requestMatchers("/gdsc-actuator/**") + .permitAll() + .requestMatchers("/onboarding/**") + .authenticated() + .requestMatchers("/admin/**") + .hasRole("ADMIN") + .anyRequest() + .authenticated()); + return http.build(); } From f35b3ae6a029d461eef04ee7cba410bf64bdde45 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Sun, 11 Feb 2024 23:26:45 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=EC=95=A1=EC=B6=94=EC=97=90?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 3 +++ src/main/resources/application-actuator.yml | 13 +++++++++++++ src/main/resources/application.yml | 1 + 3 files changed, 17 insertions(+) create mode 100644 src/main/resources/application-actuator.yml diff --git a/build.gradle b/build.gradle index 924f790ab..a99ad76e8 100644 --- a/build.gradle +++ b/build.gradle @@ -58,6 +58,9 @@ dependencies { // Swagger implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' + + // Actuator + implementation 'org.springframework.boot:spring-boot-starter-actuator' } tasks.named('test') { diff --git a/src/main/resources/application-actuator.yml b/src/main/resources/application-actuator.yml new file mode 100644 index 000000000..9290215f9 --- /dev/null +++ b/src/main/resources/application-actuator.yml @@ -0,0 +1,13 @@ +management: + endpoints: + web: + exposure: + include: health + base-path: /gdsc-actuator + jmx: + exposure: + exclude: "*" + enabled-by-default: false + endpoint: + health: + enabled: true diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f11df1e7d..37cd16cd1 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -8,6 +8,7 @@ spring: - redis - security - swagger + - actuator logging: level: