Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTR 기반 refresh token 발급 및 관리 #64

Closed
5 tasks
minjo-on opened this issue Jan 10, 2025 · 0 comments · Fixed by #65
Closed
5 tasks

RTR 기반 refresh token 발급 및 관리 #64

minjo-on opened this issue Jan 10, 2025 · 0 comments · Fixed by #65
Assignees
Labels
feature New feature or request

Comments

@minjo-on
Copy link
Contributor

Describe

RTR(Refresh Token Rotation)을 기반으로 리프레시 토큰 발급 및 관리 기능을 구현합니다. 이를 통해 기존의 정적 리프레시 토큰 사용에서 발생할 수 있는 보안 취약점을 개선하고, 사용자가 액세스 토큰을 갱신할 때마다 리프레시 토큰을 동적으로 갱신하는 방식을 적용합니다. 이를 통해 JWT 기반 인증 체계의 보안성을 강화하고 사용자 세션 관리 효율성을 높입니다

Tasks

  • 1. RTR 기본 구조 설계

    • Redis를 활용한 리프레시 토큰 저장 및 관리 구조 설계.
    • 기존 인증 로직과의 호환성 검토.
  • 2. JWT Provider 수정

    • generateTokenvalidateToken 메서드에 RTR 로직 통합.
    • 토큰 만료 시간 및 클레임(Custom Claims) 설정 최적화.
  • 3. Redis 기반 리프레시 토큰 관리

    • 리프레시 토큰 발급 시 Redis에 저장.
    • 토큰 갱신 시 기존 토큰 삭제 및 신규 토큰 등록.
    • Redis의 TTL(Time-To-Live) 설정을 통한 만료 관리.
  • 4. API 수정 및 추가

    • 로그인 API 수정: 새로운 리프레시 토큰 발급 로직 반영.
    • 토큰 갱신 API 추가: 액세스 및 리프레시 토큰 갱신 로직 구현.
  • 5. 예외 처리 및 보안 강화

    • Redis에서 토큰이 존재하지 않을 경우의 예외 처리.
    • 위조된 리프레시 토큰 사용 시 로그 기록 및 대응.

ETC

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant