Skip to content

[FIX] 게이트웨이 화이트리스트 수정 - #24

Merged
HyeonBin2379 merged 7 commits into
devfrom
fix/#23-gateway-monitoring-setting
May 14, 2026
Merged

[FIX] 게이트웨이 화이트리스트 수정#24
HyeonBin2379 merged 7 commits into
devfrom
fix/#23-gateway-monitoring-setting

Conversation

@HyeonBin2379

@HyeonBin2379 HyeonBin2379 commented May 14, 2026

Copy link
Copy Markdown
Contributor

작업 배경

  • 게이트웨이에 모니터링 기능 연동

작업 내용

  • 모니터링 관련 actuator를 게이트웨이 화이트리스트에 추가

테스트 여부

  • 현재 pr에서 재배포 진행 후 모니터링 서버에 게이트웨이가 연동되는지 확인 예정

    • 게이트웨이용 VM 인스턴스 3대 모두 prometheus에 연동됨을 확인
  • zipkin 서버 연동 관련 설정 추가

    • deploy/promtail-config.yml 파일도 원격 서버에 배포되도록 배포 워크플로우 수정
    • application.yaml 파일에 Zipkin 관련 설정 추가
    • gateway-server의 원격 VM 인스턴스에 zipkin, loki 관련 환경변수 추가
    • deploy/docker-compose.prod.yaml 파일에 promtail 관련 설정 추가
    • deploy/promtail-config.yml 파일 추가
gateway-server Prometheus 연동 확인 image
gateway-server Zipkin 연동 확인 image

기타

  • user-service와 마찬가지로 변경된 보안 설정 적용부터 우선 진행한 후 게이트웨이 로그 수집 관련 설정을 추가하는 작업이 완료되면 현재 pr을 merge할 예정입니다.

이슈

이 PR과 연관된 이슈 번호를 작성해주세요. (이슈 없으면 생략 가능)

Summary by CodeRabbit

  • Chores

    • 내부 라이브러리 의존성 버전 업데이트
  • Configuration

    • ZIPKIN_ENDPOINT/LOKI_URL 환경 변수 및 샘플링 설정 추가
    • Actuator 엔드포인트 접근 허용 범위 확장
  • Deployment

    • Promtail 로그 수집기 추가 및 배포 구성 통합
    • 배포 액션에 Promtail 구성 동기화 및 롤백 재시도 구성 개선

Review Change Stack

- 모니터링 관련 api를 게이트웨이 화이트리스트에 추가
@HyeonBin2379
HyeonBin2379 requested a review from Jin4041 May 14, 2026 03:20
@HyeonBin2379 HyeonBin2379 self-assigned this May 14, 2026
@HyeonBin2379 HyeonBin2379 added bug Something isn't working enhancement New feature or request labels May 14, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in 8949 project May 14, 2026
@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

공통 라이브러리 버전을 0.3.2-SNAPSHOT으로 올리고 JwtGatewayFilter 화이트리스트에 Actuator 경로를 추가합니다. Zipkin/LOKI 환경 변수와 application tracing을 설정하고 Promtail 구성·docker-compose 및 배포 액션을 통합합니다.

Changes

모니터링 및 배포 통합

Layer / File(s) Summary
공통 라이브러리 의존성 업데이트
build.gradle
org.pgsg:common 의존성을 0.2.5-SNAPSHOT에서 0.3.2-SNAPSHOT으로 업데이트합니다.
Actuator 엔드포인트 JWT 화이트리스트 확장
src/main/java/org/pgsg/gateway/filter/JwtGatewayFilter.java
WHITELIST/actuator/info, /actuator/prometheus, /actuator/prometheus/**, /actuator/metrics, /actuator/metrics/**, /actuator/refresh를 추가하여 해당 경로가 JWT 검증을 우회하도록 합니다.
Tracing/Env 및 애플리케이션 설정
.env.example, deploy/.env.template, src/main/resources/application.yaml
ZIPKIN_ENDPOINT, LOKI_URL, EUREKA_SERVER_URL 자리표시자를 추가하고 application.yamlmanagement.tracing(샘플링 확률 및 Zipkin 엔드포인트)을 추가합니다.
Promtail 구성 및 docker-compose 통합
deploy/promtail-config.yml, deploy/docker-compose.prod.yaml
Promtail 설정 파일을 추가하고 docker-compose.prod.yamlpromtail 서비스를 추가, gateway-serverenv_file: .envpgsg-network 외부 네트워크를 연결합니다.
배포 액션에 Promtail 전송 및 롤백 파라미터화
.github/actions/deploy-vm/action.yaml
액션에 gcloud compute scpdeploy/promtail-config.yml을 VM으로 전송하고 배포 시 작업 디렉터리로 이동시키며, 롤백 헬스체크의 반복 횟수와 간격을 입력값으로 대체합니다.

Sequence Diagram(s)

sequenceDiagram
  participant gateway_server as gateway-server
  participant promtail as promtail
  participant loki as Loki
  gateway_server->>promtail: 로그 파일 쓰기 (/logs/*.log)
  promtail->>loki: 로그 푸시 (${LOKI_URL})
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • loveletheart
  • Jin4041
  • ddangme
  • kimjuneon
  • kimdh32022

Poem

🐰 모니터가 찾아와 소곤대네,
로그는 달려가 Promtail 품에,
Zipkin은 조용히 흔적을 남기고,
Actuator 문은 활짝 열려있네,
토끼가 박수치며 배포를 축하한다.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning 일부 변경사항이 이슈 #23의 주요 범위를 초과합니다. 모니터링 기능 추가(Zipkin, Promtail, Loki, 로그 수집)는 보안 설정 수정의 범위를 벗어나며, 의존성 버전 업그레이드도 이슈와 무관합니다. 범위 초과 변경사항(Zipkin 설정, Promtail 로그 수집, 의존성 업그레이드)을 별도 PR로 분리하고, 이슈 #23은 게이트웨이 화이트리스트 수정만 포함하도록 정리할 것을 권장합니다.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR이 이슈 #23의 모든 주요 목표를 충족합니다. 게이트웨이 화이트리스트에 모니터링 관련 actuator API (/actuator/info, /actuator/prometheus, /actuator/metrics, /actuator/refresh)를 추가했으며, Zipkin 연동 설정과 로그 수집 기능도 구현되었습니다.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#23-gateway-monitoring-setting

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Jin4041 Jin4041 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네 확인했습니다. 이대로 추가하시면 될 것 같습니다!

- build.gradle의 공통모듈 버전을 0.3.2-SNAPSHOT으로 업그레이드

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/org/pgsg/gateway/filter/JwtGatewayFilter.java`:
- Around line 47-52: In JwtGatewayFilter, remove "/actuator/refresh" from the
unauthenticated whitelist array so the filter no longer allows anonymous access
to the refresh endpoint; update the whitelist to only include read-only actuator
endpoints (e.g., "/actuator/health", "/actuator/prometheus", "/actuator/metrics"
and their /** variants) and add a brief comment next to the whitelist explaining
that state-changing endpoints like "/actuator/refresh" must require
authentication/authorization; also run or adjust any related unit/integration
tests that assumed anonymous access to refresh.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: db38e401-0d04-4349-87c7-289eb4bf0c47

📥 Commits

Reviewing files that changed from the base of the PR and between e6a84dd and 351be86.

📒 Files selected for processing (2)
  • build.gradle
  • src/main/java/org/pgsg/gateway/filter/JwtGatewayFilter.java

Comment thread src/main/java/org/pgsg/gateway/filter/JwtGatewayFilter.java Outdated
- zipkin, loki 연동 관련 환경변수 추가
- application.yaml 파일에 zipkin 관련 설정 추가
- deploy/docker-compose.prod.yaml 파일 내 promtail 관련 설정 추가
- deploy/promtail-config.yml 파일 추가
- deploy/promtail-config.yml 파일이 원격 서버에 배포되도록 배포 워크플로우 수정

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deploy/docker-compose.prod.yaml`:
- Around line 13-22: The promtail service is missing environment injection and
config expansion so LOKI_URL referenced in promtail-config.yml won't be
substituted; update the promtail service block to supply the LOKI_URL (either
add an env_file that provides LOKI_URL or add an environment: entry with
LOKI_URL) and add the -config.expand-env flag to the command for promtail
(ensure the service named "promtail" retains the container_name
gateway-server-promtail and uses the same promtail-config.yml path).
- Line 19: The docker-compose service mounts /opt/gateway/logs but the app has
no file logging configured, so no logs will be written there; update the Spring
Boot config (application.yaml) to enable file logging by adding
logging.file.path: /opt/gateway/logs or logging.file.name: gateway.log, or add
an explicit file-appender in your logback.xml or log4j2.xml to write logs to
that mounted directory so Promtail can collect them; ensure the chosen
filename/path matches the mounted volume and restart the service.

In `@deploy/promtail-config.yml`:
- Around line 4-5: Promtail’s ${LOKI_URL...} interpolation won’t work because
the promtail service in docker-compose.prod.yaml lacks the
-config.expand-env=true flag and no LOKI_URL is passed into the container;
update the promtail service: add the -config.expand-env=true option to the
command for promtail and provide LOKI_URL via an env_file or environment entry
so the variable is available at runtime (alternatively, implement an envsubst
step to render deploy/promtail-config.yml before container start). Ensure you
modify the promtail service definition and reference LOKI_URL consistently.
- Around line 7-14: Promtail is configured to scrape files at __path__:
/logs/*.log under scrape_configs -> job_name: gateway-server but the app’s
application.yaml has no file logging enabled (Spring Boot defaults to console),
so no files will be produced; fix by either adding file appender configuration
to application.yaml (or your Config Server) to write logs to /logs/*.log (ensure
directory exists and permissions are correct) or change the Promtail
scrape_configs for job_name: gateway-server to read Docker stdout/stderr (e.g.,
use the docker or container targets / pipeline to tail container logs) so logs
are collected from stdout instead of /logs/*.log.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b54e903-c8ce-4234-928b-5c92c8a820df

📥 Commits

Reviewing files that changed from the base of the PR and between 351be86 and 8dca0ff.

📒 Files selected for processing (6)
  • .env.example
  • .github/actions/deploy-vm/action.yaml
  • deploy/.env.template
  • deploy/docker-compose.prod.yaml
  • deploy/promtail-config.yml
  • src/main/resources/application.yaml

Comment thread deploy/docker-compose.prod.yaml
Comment thread deploy/docker-compose.prod.yaml Outdated
Comment thread deploy/promtail-config.yml
Comment thread deploy/promtail-config.yml
- 도커 이미지 기반으로 docker compose 명령어 실행 직전 도커 네트워크부터 먼저 탐색하도록 수정
- promtail 컨테이너명 수정
- 게이트웨이 내부 로그파일 생성 및 저장 경로 지정
- 게이트웨이 로그파일 생성 및 관리 관련 설정은 configs의 gateway-server/application.yml에 반영
- promtail-config.yml에 환경변수 값을 적용하기 위한 설정 추가
- 게이트웨이 화이트리스트에서 /actuator/refresh 삭제
@HyeonBin2379
HyeonBin2379 merged commit d568399 into dev May 14, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in 8949 project May 14, 2026
HyeonBin2379 added a commit that referenced this pull request May 20, 2026
* [Feat] 게이트웨이 라우팅 설정 및 인증 필터 구현 (#3)

* chore: 공통모듈 의존성 추가 및 빌드 관련 설정 변경

- build.gradle에 공통모듈 의존성 추가 및 github package 인증 관련 설정 추가
- Dockerfile 및 docker-compose.yml 파일에 공통모듈 사용에 필요한 github package 인증정보 및 jwt 환경변수 관련 설정 추가
- GatewayApplication.java의 @SpringBootApplication에서 데이터소스 관련 자동 설정 기능 비활성화

* chore: 환경변수 추가

- env.example 파일 추가
- .env 파일에 관한 .gitignore 설정 추가

* chore: application.yaml 파일 설정 수정

- application.yml 파일에서의 게이트웨이 라우팅 관련 설정은 config server에 새로 추가한 라우팅 설정으로 대체
- src/test/resources/application.yaml 파일의 설정을 수정하여 일반 실행 환경과 테스트 환경 분리

* feat: JwtTokenProvider 빈 설정 추가

- 공통모듈의 Jwt 토큰 발급 기능을 사용하기 위한 JwtTokenProvider, JwtProperties에 관한 수동 빈 등록

* feat: 게이트웨이 인증 필터 구현

- 기본 동작 메커니즘은 user-service의 JwtAuthenticationFilter와 거의 동일
- 요청 헤더의 추가/삭제 시 Wrapper를 활용할 필요가 없다는 측면에서 spring framework 제공 필터에 비해 편의성 및 가독성을 개선
- application.yaml 파일에서는 모든 api 경로가 항상 게이트웨이 기본 필터를 경유하도록 하여, 모든 api 요청에 대해 보안 정책을 일괄 적용

* feat: 게이트웨이 전용 SecurityConfig 설정 추가

- 게이트웨이를 통해 들어온 모든 요청에 대해 무조건 허용

* docs: 현재까지의 작업 내역 요약 정리

- 게이트웨이 세팅 및 인증 필터 구현, 향후 고도화 계획 관련 내용 요약

* fix: 코드래빗 수정사항 반영

- 빌드용 환경변수와 실행용 환경변수 분리를 통해 github 자격증명 정보의 노출 방지(.gitignore에 .env.runtime 추가)
- 테스트용 환경변수 중 JWT_SECRET의 기본값 지정
- 토큰 검증 성공 시 사용자 식별자가 노출되어 누적되지 않도록 수정

* refactor: 서버 포트 명시

- application.yml 내 server.port 추가

* Feature/#4 gateway blacklist and trace (#5)

* chore: 의존성 설정 수정

- 게이트웨이에서 사용하지 않는 queryDsl, jpa 관련 의존성 제외
- 기존의 AppCtx 대신 게이트웨이 맞춤형 AppCtx 사용

* chore: application.yml 설정 수정

- 로컬 application.yml 파일의 게이트웨이 관련 설정을 원격 config의 gateway 설정으로 대체

* refactor: 게이트웨이 필터 구현 방식 변경

- 구현의 복잡성을 낮추면서 .yaml 파일 시반 라우팅 설정 적용을 목적으로 수행
- 기존 HandlerFilterFunction 기반 인증 필터로 요청 발송 시 라우팅 설정이 제대로 적용되지 않는 문제 개선
- HandlerFilterFunction 대신 OncePerRequestFilter를 기반으로 하여 게이트웨이 인증 필터가 동작하도록 수정

* chore: build.gradle 의존성 추가 및 FeignClient 활성화

- user-service와의 동기식 통신을 통해 토큰 블랙리스트 검증을 수행하기 위한 FeignClient 추가
- traceId를 할당 작업용 라이브러리 추가
- GatewayApplication 내 @EnableFeignClients 추가

* feat : 블랙리스트 검증 로직 호출용 FeignClient 추가

- user-service의 /internal/v1/auth/verify api 호출용 FeignClient 엔드포인트 추가
- FeignClient 요청 처리 실패 시 Fallback 로직 추가
- accessToken 검증 결과를 임시 저장(3분)하기 위한 로컬 캐시 추가
- 추후 목 테스트를 수행하기 위해 AuthProvider 인터페이스와 구현체를 분리

* feat : 토큰 블랙리스트 검증 및 traceId 할당 기능 추가

- JwtGatewayFilter에 FeignClient 기반 accessToken 블랙리스트 검증 로직을 적용
- 인증 필터 실행 시 traceId를 요청 헤더에 저장하는 기능 추가
- 게이트웨이 내부에서 JwtGatewayFilter가 MdcLoggingFilter 바로 다음에 동작하도록 필터 실행 우선순위를 조정
- 초기에는 Zipkin의 traceId를 생성한 후 MDC의 traceID로 동기화

* refactor : 토큰 블랙리스트 검증 응답 형식 수정

- AuthDto.TokenVerifyResponse 대신 AuthDto.TokenVerifyData를 CommonResponse<T>로 래핑하는 형태로 수정

* refactor : 게이트웨이 인증 실패 시 응답 처리 코드 수정

- CustomAuthenticationEntryPoint를 활용하여 인증 실패 시 공통 모듈의 에러 메시지 형식에 맞춰 응답을 반환하도록 수정

* fix : 게이트웨이 설정 적용 방식 수정

- - 게이트웨이에서 JPA, QueryDsl 관련 설정을 확실하게 제외하기 위해 GatewayAppCtx로 커스터마이징한 빈 설정을 확실히 적용하도록 @import를 사용

* refactor : FeignClient의 변경된 반환타입 반영

- response의 타입을 CommonResponse<AuthDto.TokenVerifyData>로 변경

* docs : 작업 내용 요약본 정리

- 게이트웨이 토큰 블랙리스트 검증 및 traceId 할당 기능 추가 관련 작업 내역 문서화

* docs : 게이트웨이 관련 작업 내역 정리 문서 업데이트

- README 추가
- 기존 작업 내역 업데이트

* fix : 코드래빗 피드백 반영

- 캐시 저장용량 상한 초과 시 캐시 삭제 로직 추가
- fallback traceId의 길이를 초기 발급된 traceId의 길이와 통일
- 오기재된 문서 및 주석 내용 수정

* fix : 코드래빗 피드백 반영

- 유효하지 않은 accessToken을 사용한 요청은 게이트웨이에서 필터링하도록 수정
- 단, 토큰 재발급 요청에 한해서는 통과
(accessToken이 로그아웃한 사용자의 토큰이더라도 user-service의 재발급 로직에서 블랙리스트 포함 여부를 확인)

* refactor : 게이트웨이 필터 검증 순서 최적화

- 기존에는 블랙리스트 검증 -> 토큰 유효성 검증 -> 토큰 파싱 순으로 진행
- 인증 필터 내부에서 토큰 유효성 검증 -> 블랙리스트 검증 -> 토큰 파싱 순으로 작업을 진행하여 이미 검증된 토큰에 대해서만 원격 검증을 수행하도록 하여, 불필요한 FeignClient 호출 방지
- 문서에 관련 내용 업데이트

* [TASK] 게이트웨이 인증 필터 관련 통합테스트 코드 작성 (#7)

* refactor : 게이트웨이 JwtGatewayFilter 세부 로직 수정 및 통합테스트 코드 추가

- 게이트웨이 JwtGatewayFilter의 헤더 추가 기능은 그대로 유지하고, user-service의 인증 필터 로직을 다시 원상복구하는 방향으로 진행 예정
- JwtGatewayIntegrationTest에 게이트웨이 통합테스트 코드 추가

* docs : 게이트웨이 통합테스트 관련 작업사항 문서화

- 게이트웨이 통합테스트 코드 관련 내용 문서화

* fix : JwtGatewayFilter의 토큰 검증 로직 수정

- 요청 헤더에 accessToken이 아예 없는 경우에는 차단하도록 수정
- 화이트리스트에 포함되지 않은 경로에 대해서는 유효한 토큰이 요청 헤더에 없으면 차단하는지를 검증하는 테스트코드 추가

* feat : 회이트리스트 경로 검증 시 패턴매칭 적용

- 화이트리스트에 경로에 관한 패턴도 포함 가능하게 하여 화이트리스트에 특정 패턴이 저장된 경우에는 해당 패턴을 포함된 경로 전체를 허용 가능하도록 개선

* chore : 게이트웨이 ci/cd 설정 추가 (#9)

* chore : 게이트웨이 ci/cd 설정 추가

- 게이트웨이 배포 관련 github action workflow 추가
- 게이트웨이 배포 전용 docker-compose.yml 파일 및 환경변수 템플릿 추가
- gar 이미지 관리 정책 추가(eureka-server와 동일)

* chore : application.yaml 설정 추가

- management 블록 추가

* chore : 코드래빗 피드백 반영

- .env.example 파일명을 .env.template으로 변경
- deploy.yaml 파일의 워크플로우 세부사항 수정

* comment : 주석 수정

- .env.example 파일명을 .env.template으로 변경함에 따라 주석 내용 갱신

* chore : github action 배포 워크플로우 세부 스크립트 수정 (#11)

* chore : github action 배포 워크플로우 세부 스크립트 수정

- gateway-server-1의 영역을 asia-northeast3-a로 수정
- main 또는 dev 브랜치에서 배포 성공 시 promote-remote job이 자동 실행되도록 실행 조건 수정

* fix : 게이트웨이 인증 필터 화이트리스트 수정

- actuator 관련 api 호출은 허용하도록 화이트리스트 추가

* chore : 게이트웨이 설정 수정

- config server가 제공하는 common/application.yml 파일의 management 블록 설정 적용

* fix : ar-image-retention-policy.json 파일 수정

- 오류 수정

* fix : actuator 관련 화이트리스트 지정 범위 축소

- /actuator/health, /actuator/info로 한정해서 화이트리스트 축소

* [TASK] : 게이트웨이 VM 3대 구동 시 배포 테스트 (#13)

* chore : 게이트웨이 VM 3대 구동하도록 설정 수정

- 게이트웨이 3대 구동 시 배포 테스트용 설정 활성화

* chore : 수동 스케일아웃/스케일인 워크플로우 추가

- 부하테스트 진행 시에만 게이트웨이를 3대까지 구동하기 위해 추가

* refactor : 게이트웨이 CI/CD 워크플로우 리팩토링

- step, action 기반으로 분할하여 코드 가독성 개선

* fix : 게이트웨이 CI/CD 워크플로우 오류 수정

- permission 블록을 추가하여 하위 워크플로우에 권한 관련 정보를 명시적으로 전달

* fix : 스케일아웃 실행 중 오류 수정

- _scale.yaml 파일에 actions/checkout 추가

* fix : 코드래빗 수정사항 반영

- 이전 버전의 워크플로우 삭제
- 스케일아웃 타임아웃 시간 연장
- VM 미존재 시 명시적으로 오류 처리하도록 수정

* fix : 배포 오류 수정

- 배포 성공 직후 에러가 발생하면서 강제종료되는 문제 수정

* refactor : 배포 워크플로우 수정

- build-and-push와 scale-out 작업을 병행하도록 수정

* [TASK] nginx CI/CD 워크플로우 추가 (#15)

* chore : nginx CI/CD 워크플로우 추가

- nginx 설정 변경용 워크플로우 추가

* fix : 코드래빗 수정사항 반영

- 수정된 nginx.conf 검증한 후 기존 파일을 업데이트하도록 수정

* [TASK] nginx 배포 워크플로우 테스트 (#17)

* fix : nginx.conf 변경사항 검증 로직 수정

- /tmp/nginx.conf의 변경사항에 관한 검증 로직을 수행할 수 없는 문제 수정

* chore : 게이트웨이 application.yaml 파일 수정

- nginx 연동 테스트용 actuator 설정 추가

* chore : 게이트웨이 application.yaml 파일 수정

- info 설정 추가

* chore : eureka server 연동 관련 설정 추가

- config server 구동 여부에 관계없이 유레카 서버와 연동 가능하도록 추가

* chore : eureka server 연동 관련 설정 추가

- config server 구동 여부에 관계없이 유레카 서버와 연동 가능하도록 추가

* fix : 코드래빗 수정사항 반영

- nginx 설정 변경사항 검증 관련 문제 수정

* fix : nginx 빌드 오류 수정

- 큰따옴표 이스케이프 적용

* fix : nginx 빌드 오류 수정

- 이전 검증 방식으로 원상 복구

* fix : nginx 빌드 오류 수정

- .conf 파일 검증 방식 수정

* chore : application.yaml 파일 설정 수정

- info 블록의 HOSTNAME 기본값 지정

* chore : 로드밸런싱 테스트용 nginx.conf 설정 추가

- application.yaml 파일의 info 블록 삭제

* fix : 코드래빗 피드백 반영

- nginx.conf 변경사항 적용 성공 시에도 백업본을 저장하도록 수정

* fix : nginx 배포 오류 수정

- nginx 배포 워크플로우 수정 후 발생한 오류 수정

* fix : nginx 배포 오류 수정

- nginx 배포 워크플로우 수정 후 발생한 오류 수정

* fix : nginx 로드밸런싱 테스트 관련 누락된 설정 추가

- nginx.conf 파일에 add_header 추가

* chore : 게이트웨이 로드밸런싱 테스트용 nginx 로그 설정 삭제

- 로드밸런싱 테스트 완료로 인해 nginx.conf 내 nginx 로그 관련 설정 삭제

* [TASK] 게이트웨이 application.yaml 파일 설정 수정 (#20)

* chore : 게이트웨이 application.yaml 파일 설정 수정

- config server 연동 방식 수정

* chore : 게이트웨이 application.yaml 파일 설정 수정

- config server 설정 관련 오탈자 수정

* [TASK] 게이트웨이 application.yaml 파일 설정 수정 (#22)

* chore : 게이트웨이 application.yaml 파일 설정 수정

- 유레카 서버에 게이트웨이의 주소를 등록하는 방식 수정

* chore : 게이트웨이 헬스체크 간격 및 횟수 조정

- 게이트웨이 빌드 시간을 단축하고 실패 시 빠른 피드백을 받기 위해 조정

* [FIX] 게이트웨이 화이트리스트 수정 (#24)

* fix : 게이트웨이 화이트리스트 수정

- 모니터링 관련 api를 게이트웨이 화이트리스트에 추가

* chore : 게이트웨이 공통모듈 버전 수정

- build.gradle의 공통모듈 버전을 0.3.2-SNAPSHOT으로 업그레이드

* chore : 분산 추적 & 로그 수집 관련 설정 추가

- zipkin, loki 연동 관련 환경변수 추가
- application.yaml 파일에 zipkin 관련 설정 추가
- deploy/docker-compose.prod.yaml 파일 내 promtail 관련 설정 추가
- deploy/promtail-config.yml 파일 추가
- deploy/promtail-config.yml 파일이 원격 서버에 배포되도록 배포 워크플로우 수정

* chore : 배포 중 발생한 도커 네트워크 관련 오류 수정

- 도커 이미지 기반으로 docker compose 명령어 실행 직전 도커 네트워크부터 먼저 탐색하도록 수정

* chore : docker-compose.prod.yaml 수정

- promtail 컨테이너명 수정

* chore : 코드래빗 피드백 반영

- 게이트웨이 내부 로그파일 생성 및 저장 경로 지정
- 게이트웨이 로그파일 생성 및 관리 관련 설정은 configs의 gateway-server/application.yml에 반영

* chore : 코드래빗 피드백 반영

- promtail-config.yml에 환경변수 값을 적용하기 위한 설정 추가
- 게이트웨이 화이트리스트에서 /actuator/refresh 삭제

* [TASK] 1차 게이트웨이 부하테스트 스크립트 추가 (#26)

* chore : k6 부하테스트 스크립트 추가

- 게이트웨이 부하테스트 진행용 스크립트 추가
- 2차 부하테스트 진행용 스크립트 추가
- 1차 부하테스트 결과 스크립트 추가

* chore : 코드래빗 피드백 반영

- 결과 스크립트에 사용했던 access token이 저장되지 않도록 수정

* chore : 코드래빗 피드백 반영

- 테스트항목 1 부하테스트 스크립트 관련 수정사항 반영

* chore : 코드래빗 피드백 반영

- 2차 부하테스트 진행용 k6 스크립트 관련 수정사항 반영
- test2-max-users.js 테스트 스크립트를 test2-max-users-revised.js로
  대체한다는 주석 추가

* [Refactor] WebFlux 기반 필터 전환 (#28)

* chore : build.gradle 수정

- WebFlux 기반 게이트웨이로 전환하기 위한 webflux 관련 의존성 추가

* refactor : WebClient 도입

- 기존의 FeignClient 기반 코드를 WebClient로 대체

* refactor : Config 클래스 수정

- 기존의 서블릿 기반 설정을 WebFlux 기반 설정으로 수정

* refactor : WebFlux 기반 필터 사용

- 기존의 서블릿 기반 게이트웨이 필터를 WebFlux 기반 필터로 교체
- WebFlux 필터 로직 검증용 통합 테스트 수행

* chore : docker compose 수정

- 불필요한 환경변수 설정 삭제

* chore : 코드래빗 리뷰 반영

- 의존성 제외 설정 관련 오탈자 수정

* [TASK] 게이트웨이 2차 부하테스트 진행 (#30)

* chore : 부하테스트 코드 수정

- 테스트 항목 2 관련 k6 스크립트에 테스트 시작, 종료시간 추가

* refactor : 1차 부하테스트 결과 파일명 수정

- 2차 부하테스트 준비 및 1차 부하테스트 진행 결과 보존용

* refactor : 게이트웨이 필터 코드 개선

- 게이트웨이 인증 로직 중 일부 구간에서 블로킹 방식 및 기존 서블릿 필터 방식이 적용된 코드를 수정

* refactor : JWT 토큰 검증용 캐시 추가

- 이미 Jwt 검증 및 파싱 완료된 토큰에 관한 캐시 추가(TTL 30초)

* chore : 부하테스트 기록 저장

- test1-baseline-2.json 추가

* refactor : 캐시 적용 순서 조정

- 토큰 블랙리스트 검증 통과 후 JWT 검증 결과 캐싱 여부를 확인하도록 순서 조정

* chore : 이전 테스트 기록 저장

- 2차 부하테스트 기록 저장

* refactor : WebClient 커넥션 풀 타임아웃 설정 추가

- 부하테스트 지표 개선용

* fix : JWT 토큰 검증 & 캐싱 로직 보강

- 만료된 토큰이 게이트웨이 필터를 통과하는 문제에 관한 방어 로직 보강

* comment : Jwt 토큰 검증 & 캐싱 관련 주석 수정

- 캐싱된 JWT 토큰이라도 검증을 수행한다는 내용으로 수정

* test : 테스트 항목 3 k6 테스트 스크립트 추가

- 테스트 항목 2 관련 k6 테스트 스크립트를 테스트 항목 3 테스트 스크립트로 사용

* test : 2차 부하테스트 진행 기록 추가

- 부하테스트 진행 결과 스크립트 추가

* [TASK] : 게이트웨이 부하테스트 결과 추가 (#32)

* test : 게이트웨이 부하테스트 결과 추가

- user-service 스케일아웃 이후 게이트웨이 부하테스트 결과 저장

* docs : 게이트웨이 README 내용 업데이트

- WebFlux 기반 필터로 교체한 이후의 내용 반영
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FIX] 모니터링 서버 연동 관련 게이트웨이 보안 설정 수정

2 participants