[TEST] 게이트웨이 1차 배포 테스트 - #21
Merged
Merged
Conversation
- 서버 포트 8080 지정 - spring.config.import로 Config Server 연결 (optional) - Eureka 클라이언트 설정 (localhost:8000, hostname 기반) - spring.profiles.active=dev로 Config Server dev 브랜치 참조 Related to: #1
Resolves:#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
Related to: #12
Feat/2 jwt authentication
♻️ Refactor: 프로젝트 패키지 오타 수정
- GatewayExceptionHandler 작성 - 서비스 공통모듈과 같은 형태 적용
…path-exclusion BUG/15 회원가입 외 User 서비스 public path 해제
Signed-off-by: SEONJU PARK <101613808+mimimya@users.noreply.github.com>
Resolves:#17
Feat/17 Auth Service 라우팅
Related to:#19
- application-prod.yml Related to:#19
- CONFIG_SERVER_URL 환경변수 기반 설정으로 변경 Related to:#19
- 공통모듈 미사용으로 GPR_* 사용 제거 Related to:#19
Related to:#19
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 작업 내용
🚀 주요 변경 사항
✅ 자체 체크리스트 (필수)
./gradlew build실행 결과 정상 (인증샷 첨부)📸 테스트 인증샷
💬 리뷰어 전달사항 (선택)
📎 참고 자료