feat: 헤더 통일 + 서비스별 라우팅 분리 - #3
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthrough게이트웨이의 라우팅 및 인증 관련 문서와 설정을 업데이트했습니다. README에 Spring Security OAuth2 Resource Server(Keycloak JWT 검증), Eureka 클라이언트, 요청 라우팅 규칙 및 UserContextFilter 동작(클레임을 특정 헤더로 변환, name 클레임 URL-인코딩, 기존 사용자 헤더 초기화 및 재적용, 인증 없는 요청 허용)이 추가되었습니다. UserContextFilter에서 사용자 역할 헤더 이름을 Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/main/resources/application.yaml`:
- Around line 32-35: The route with id "hub-inventory-service" currently points
to "lb://HUB-SERVICE" which breaks per-service routing separation; update the
route's uri to the inventory-specific service (e.g.,
"lb://HUB-INVENTORY-SERVICE" or the correct inventory service logical name)
while keeping the predicates (Path=/api/hub-inventories/**,
/internal/hub-inventories/**) unchanged; also search for any usages of
"hub-inventory-service" or "HUB-SERVICE" in routing config and tests and update
them to the inventory service name to keep configs consistent.
- Around line 17-55: Security is currently disabled at the gateway because
SecurityConfig uses anyExchange().permitAll(); change the security configuration
so only explicit public endpoints (e.g., /api/auth/**, /api/users/signup) are
allowed via permitAll() and all other routes require authentication by replacing
the global anyExchange().permitAll() with a matcher-based rule that permits the
specific public Path predicates and calls authenticated() (or requires
authentication) for everything else; look for SecurityConfig and the
anyExchange().permitAll() usage and update it to enumerate public paths and
default to authenticated().
- Line 11: The configured default issuer-uri in application.yaml (issuer-uri:
${ISSUER_URI:http://localhost:13300/realms/my-realm}) uses port 13300 which
mismatches the Keycloak mapping in docker-compose-dev.yml (3300:8080); update
the default ISSUER_URI value to use port 3300 (e.g.,
http://localhost:3300/realms/my-realm) or alternatively add a README note
requiring the ISSUER_URI env var for local dev so JWT verification won’t fail;
ensure you modify the issuer-uri line in application.yaml and/or add the
documentation entry referencing ISSUER_URI and the docker-compose-dev.yml
Keycloak port mapping.
🪄 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
Run ID: b76de6c4-8307-4267-8fed-b4fb922ee0d2
📒 Files selected for processing (3)
README.mdsrc/main/java/com/loopang/gateway/config/UserContextFilter.javasrc/main/resources/application.yaml
작업 내용
Closes [Task] Gateway 헤더 통일 + 공개 경로 설정 #2
Summary by CodeRabbit
릴리스 노트
설명서
개선사항