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

보안이 강화된 JWT 비밀키 발급, 비밀키로 서명로직 변경 #21

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

youngreal
Copy link
Member

No description provided.

@youngreal youngreal added the bug Something isn't working label Aug 23, 2024
@youngreal youngreal requested a review from min-0 August 23, 2024 13:47
@youngreal youngreal self-assigned this Aug 23, 2024
@youngreal youngreal linked an issue Aug 23, 2024 that may be closed by this pull request
this.accessTokenExpiredTime = accessTokenExpiredTime;
this.refreshTokenExpiredTime = refreshTokenExpiredTime;
this.secretKey = Keys.hmacShaKeyFor(Decoders.BASE64URL.decode(secretKeyString));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SecretKey라는 인터페이스를 사용해 해당 코드로 아래 수정된 코드들을 간편하게 된 것인가요
아니면 SecretKey 인터페이스 사용으로 보안이 더 강화된 것인가요 ?!
또는 둘 다..?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 이부분은 문제맥락을 뚜렷하게 설명 안드린것같네요
기존에 주셨던 JWT 비밀키가 보안문제가 있어 아예 토큰이 안만들어졌습니다. 그래서 길이를 좀더 늘려서 비밀키를 새로 생성해서 변경했어요.
https://green-bin.tistory.com/49

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 변경점이랑은 크게 상관이 없다고 볼수있습니다 JWT 비밀키만 임의로 생성해서 환경변수값을 변경했어요

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오호 .. 설명 감사함니당 ~

@youngreal youngreal merged commit 8e23da5 into main Aug 26, 2024
1 check passed
@youngreal youngreal deleted the fix/#20 branch August 28, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JWT Secret KEY 보안 취약점 개선
2 participants