[FEATURE] SecurityConfig 역할별 API 엔드포인트 접근 권한 설정#43
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughAccess 토큰에 Changes역할 기반 JWT 및 엔드포인트 접근 제어
Sequence Diagram(s)sequenceDiagram
participant Client
participant JwtTokenFilter
participant JwtTokenProvider
participant SecurityContext
rect rgba(100, 150, 255, 0.5)
Note over Client,SecurityContext: 인증 처리 흐름 (변경 후)
Client->>JwtTokenFilter: HTTP 요청 (Authorization: Bearer token)
JwtTokenFilter->>JwtTokenProvider: getAccessTokenPayload(token)
JwtTokenProvider-->>JwtTokenFilter: AccessTokenPayload(userId, role)
JwtTokenFilter->>SecurityContext: UsernamePasswordAuthenticationToken(userId, ROLE_{role})
end
rect rgba(100, 200, 150, 0.5)
Note over Client,SecurityContext: 엔드포인트 접근 제어
SecurityContext-->>Client: /api/v1/instructors/** → INSTRUCTOR만 허용
SecurityContext-->>Client: /api/v1/designers/** → DESIGNER만 허용
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25분 Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Jong0128
left a comment
There was a problem hiding this comment.
수고하셨습니다!
바로 merge 하셔도 될꺼같습니다!
늦어서 죄송합니다 😢
🚀 Related issue
Closes #41
#️⃣ Summary
SecurityConfig를 통해 강사/디자이너 역할별로 API 엔드포인트 접근 권한을 제한🔧 Changes
ROLE_INSTRUCTOR,ROLE_DESIGNER기반 역할 부여/api/v1/instructors/**,api/v1/designers/**접근 제어 추가📸 Test Evidence
💬 Reviewer Notes
Summary by CodeRabbit
릴리스 노트
New Features
Bug Fixes
Refactor