Repository navigation
[Feat/#86] KConnect OAuth 클라이언트 구현 - #91
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 49 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: billilge/stream-server/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (24)
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 |
| form.add("grant_type", "authorization_code"); | ||
| form.add("code", command.code()); | ||
| form.add("redirect_uri", command.redirectUri()); | ||
| form.add("code_verifier", command.codeVerifier()); |
There was a problem hiding this comment.
PKCE가 redirect구간을 지키고 confidential client에서도 넣는 이유는 code injection 방어때문이라고 이해했는데, 이러한 이유로 추가 하신것인지 궁금합니다! 아니면 KConnect가 필수로 요구하는걸까요?
There was a problem hiding this comment.
이해하신 부분도 맞지만 kconnect가 필수로 요구하는 부분도 맞다고 생각하시면 될 거 같습니다!
jjunh33
left a comment
There was a problem hiding this comment.
확인했습니다. client_secret을 이용한 기존 OAuth 로그인 플로우에서, 토큰 발급시 PKCE로 랜덤 문자열을 해시한 값을 키로 사용해 이중으로 검증하는 플로우로 이해했습니다!
#️⃣연관된 이슈
feat/#84-member-oauth-profile(코드상 의존은 #88의OAuthClient포트뿐)🎯 해결하려는 문제가 무엇인가요?
OAuthClient의 KConnect(국민대 학생용 OAuth) 구현체를 추가합니다.❓ 왜 해결해야 하나요?
국민대 학생 로그인 수단이 KConnect입니다. 또 KConnect 측에서 API 명세를 공개하지 말아 달라고 요청해서, 주소·경로·응답 필드를 코드에 두지 않아야 합니다(이 저장소는 public).
⭐ 어떻게 해결했나요?
oauth.kconnect.*): 코드에는 범용 "code 교환 + JSON 매핑"만 남았습니다..env.example에는 자리표시자만 있고 실제 값은 팀 내부 문서에 있습니다.KConnectClientConfig의 RestClient 빈)invalid_grant(code 만료·재사용·verifier 불일치) → 401INVALID_AUTHORIZATION_CODEinvalid_client등 그 밖의 4xx →IllegalStateException→ 500 + error 로그(서버 설정 오류라 알아야 함)OAUTH_PROVIDER_UNAVAILABLE🧩 이 PR의 한계 & 트레이드오프
⛓️ 기존 기능에 미치는 영향
infrastructure:client가core:domain:auth에 의존합니다.KCONNECT_*를 Coolify dev/prod에 등록해야 합니다(.env.example참고). 등록하지 않아도 기동은 됩니다.🔀 Edge Case & 실패 시나리오
📋 검토한 대안과 선택 이유
💬 리뷰 포인트