Skip to content

[DEPLOY] 게이트웨이 1차 배포 - #20

Closed
mimimya wants to merge 23 commits into
prodfrom
dev
Closed

mimimya wants to merge 23 commits into
prodfrom
dev

Conversation

@mimimya

@mimimya mimimya commented May 17, 2026

Copy link
Copy Markdown
Contributor

📝 작업 내용

이번 PR에서 작업한 내용을 설명해주세요.

  • 배포 GitFlow 확인
  • Public IP로 요청 날려 응답 에러가 나타나는지 확인

🚀 주요 변경 사항

완료한 이슈 번호
Close #
관련된 이슈 번호 (닫고 싶지 않은 경우)
Related to #

✅ 자체 체크리스트 (필수)

  • ./gradlew build 실행 결과 정상 (인증샷 첨부)
  • Postman 테스트 완료 (인증샷 첨부)
  • 팀 내 컨벤션 준수 및 불필요한 로그, import 제거
  • 중요한 변경 사항이 팀에 공유되었는지

📸 테스트 인증샷

빌드 결과 및 Postman 실행 화면을 여기에 첨부해 주세요.

💬 리뷰어 전달사항 (선택)

특별히 봐주었으면 하는 부분이나 논의가 필요한 점을 적어주세요.

  • 논의점


📎 참고 자료

관련 문서, 레퍼런스 링크 등이 있다면 여기에 첨부해주세요.

mimimya and others added 23 commits April 23, 2026 19:20
- 서버 포트 8080 지정
- spring.config.import로 Config Server 연결 (optional)
- Eureka 클라이언트 설정 (localhost:8000, hostname 기반)
- spring.profiles.active=dev로 Config Server dev 브랜치 참조

Related to: #1
[CHORE] gateway 프로젝트 초기 구성
JWT 토큰 검증 및 클레임 파싱 책임을 담당하는 컴포넌트.

JwtTokenProvider:
- HMAC HS256 알고리즘 (대칭키 방식)
- jwt.secret 환경변수에서 키 초기화 (256비트 이상 보장)
- validateToken(): 서명/만료/형식 검증, 5가지 예외 구분 로깅
- parseClaims(): sub(UUID) + role(String) 추출

JwtClaims (record):
- 불변 DTO, 파싱 결과 전달용

application.yml:
- jwt.secret 환경변수 패턴 추가 (운영 시 외부 주입)
- 기본값은 개발 전용

build.gradle:
- jjwt 0.12.6 의존성 추가 (api/impl/jackson)
- ext 변수 jjwtVersion 으로 단일 관리

Gateway는 토큰 검증만 책임, 생성은 User(Auth) Service 담당.
양쪽이 동일한 JWT_SECRET 공유.

Related to: #5
JWT 인증 필터를 Spring Cloud Gateway의 GlobalFilter로 구현.

JwtProperties (record):
- @ConfigurationProperties로 jwt 섹션 자동 바인딩
- secret + publicPaths 통합 관리

AuthenticationFilter:
- Public Path 매칭 시 인증 우회 (AntPathMatcher 사용)
- Bearer 형식 강제 (RFC 6750)
- 검증 실패 시 401 + JSON 에러 응답
- 검증 성공 시 X-User-Id, X-User-Role 헤더 주입
- @order HIGHEST_PRECEDENCE+100 으로 가장 일찍 실행

application.yml:
- jwt.public-paths 추가 (회원가입/로그인/actuator/webhook)

JwtTokenProvider:
- @value 주입에서 JwtProperties 의존으로 변경 (일관성)

GatewayApplication:
- @EnableConfigurationProperties(JwtProperties.class)

Related to: #6
♻️ Refactor: 프로젝트 패키지 오타 수정
- GatewayExceptionHandler 작성
- 서비스 공통모듈과 같은 형태 적용
…path-exclusion

BUG/15 회원가입 외 User 서비스 public path 해제
Signed-off-by: SEONJU PARK <101613808+mimimya@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0576ca93-68e3-4a1a-bdcf-54cb483bcb4c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

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.

@mimimya mimimya closed this May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant