Conversation
There was a problem hiding this comment.
Code Review
This pull request increases the JWT access token expiration time from 1 hour to 4 days in the application configuration. A security concern was raised regarding this change, as such a long duration significantly increases the window of opportunity for an attacker if a token is compromised. It is recommended to revert the access token duration to a shorter period and utilize refresh tokens for maintaining user sessions.
|
|
||
| jwt: | ||
| access-time: 3600000 # 1시간 | ||
| access-time: 345600000 # 4일 |
There was a problem hiding this comment.
액세스 토큰의 유효 기간을 4일로 설정하는 것은 보안상 위험이 클 수 있습니다. 토큰이 탈취될 경우, 공격자가 4일이라는 긴 시간 동안 사용자 계정에 접근할 수 있게 됩니다.
일반적으로 액세스 토큰은 수명 주기를 짧게(예: 15분 ~ 1시간) 가져가고, 리프레시 토큰을 사용하여 새로운 액세스 토큰을 발급받는 '토큰 리프레시' 방식을 사용합니다. 이렇게 하면 액세스 토큰이 탈취되더라도 피해를 최소화할 수 있습니다.
로그인 유지 기능은 리프레시 토큰을 통해 구현하고, 액세스 토큰의 유효 기간은 원래대로 1시간으로 되돌리거나 더 짧게 설정하는 것을 강력히 권장합니다.
access-time: 3600000 # 1시간
로그인 유지 개선을 위해 액세스 토큰 유효기간 1시간 → 4일로 변경