From b9410e55a729e624ce673606c6c6aabbb632baaf Mon Sep 17 00:00:00 2001 From: dungbik Date: Mon, 9 Feb 2026 18:54:29 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Feat:=20Auth=20svc=20route=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-local.yml | 34 +++++++++++++++++--- src/main/resources/application.yml | 41 ++++++++++++++++++++---- 2 files changed, 64 insertions(+), 11 deletions(-) diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index 194dc3b..c12691b 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -2,14 +2,40 @@ spring: cloud: gateway: routes: - - id: user-service-public + - id: user-private uri: http://localhost:8081 predicates: - - Path=/v1/users/signup, /v1/users/login + - Path=/v1/users/** + filters: + - AuthenticationFilter - - id: user-service-private + - id: auth-public uri: http://localhost:8081 predicates: - - Path=/v1/users/** + - name: Path + args: + patterns: + - /v1/auth/login + - /v1/auth/register + - /v1/auth/token/refresh + - /v1/auth/email-verification/request + - /v1/auth/email-verification + - /v1/auth/password-reset/request + - /v1/auth/password-reset + - /v1/oauth2/callback/* + + - id: auth-private + uri: http://localhost:8081 + predicates: + - name: Path + args: + patterns: + - /v1/auth/logout + - /v1/auth/password + - /v1/auth/social-links + - /v1/oauth2/authorization/* filters: - AuthenticationFilter + +jwt: + secret: "55ca298dcfc216e215622e3f48a251abaa4e8bb973074f065ab170e311acc15811d01a2407290c3ac143648196306d4a6f666a4ed364d3df633e08eb184bb0aea0f2edde4fd2d7fa68ea95ddbc421ff532ce47bde775975911042d665bc22d88a9fa26a03bb4d25530b8cdeb1247d87c9e3efcd721e368b0566b00a43308a729" diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 0169d95..eb351dd 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -7,21 +7,49 @@ spring: cloud: gateway: + default-filters: + - RemoveRequestHeader=X-User-Id + - RemoveRequestHeader=X-User-Email + - RemoveRequestHeader=X-User-Role routes: - - id: user-service-public + - id: user-private uri: http://user-service:8081 predicates: - - Path=/v1/users/signup, /v1/users/login + - Path=/v1/users/** + filters: + - AuthenticationFilter - - id: user-service-private + - id: auth-public uri: http://user-service:8081 predicates: - - Path=/v1/users/** + - name: Path + args: + patterns: + - /v1/auth/login + - /v1/auth/register + - /v1/auth/token/refresh + - /v1/auth/email-verification/request + - /v1/auth/email-verification + - /v1/auth/password-reset/request + - /v1/auth/password-reset + - /v1/oauth2/callback/* + + - id: auth-private + uri: http://user-service:8081 + predicates: + - name: Path + args: + patterns: + - /v1/auth/logout + - /v1/auth/password + - /v1/auth/social-links + - /v1/auth/social-links/* + - /v1/oauth2/authorization/* filters: - AuthenticationFilter jwt: - secret: ${JWT_SECRET:"55ca298dcfc216e215622e3f48a251abaa4e8bb973074f065ab170e311acc15811d01a2407290c3ac143648196306d4a6f666a4ed364d3df633e08eb184bb0aea0f2edde4fd2d7fa68ea95ddbc421ff532ce47bde775975911042d665bc22d88a9fa26a03bb4d25530b8cdeb1247d87c9e3efcd721e368b0566b00a43308a729"} + secret: ${JWT_SECRET} management: endpoints: @@ -31,5 +59,4 @@ management: logging: level: - org.springframework.cloud.gateway: DEBUG - flipnote.apigateway: DEBUG + flipnote.apigateway: INFO From 77c5db277c6f1e490423b71249a34a400a3f54d0 Mon Sep 17 00:00:00 2001 From: dungbik Date: Mon, 9 Feb 2026 18:58:49 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Feat:=20Auth=20svc=20route=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-local.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index c12691b..aba3e12 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -33,6 +33,7 @@ spring: - /v1/auth/logout - /v1/auth/password - /v1/auth/social-links + - /v1/auth/social-links/* - /v1/oauth2/authorization/* filters: - AuthenticationFilter