Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import com.Timo.Timo.domain.calendar.google.enums.RevocationStatus;
import com.Timo.Timo.global.common.BaseTimeEntity;
import com.Timo.Timo.global.crypto.AesGcmConverter;
import jakarta.persistence.Column;
import jakarta.persistence.Convert;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
Expand All @@ -26,6 +28,7 @@ public class GoogleTokenRevocationOutbox extends BaseTimeEntity {
@Column(name = "id")
private Long id;

@Convert(converter = AesGcmConverter.class)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

요 컨버터가 요기에만 없었더라고요! 확인 감사합니당

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

p3) 배포 전 확인 사항에 PENDING이 0개 될 때까지 기다렸다가 배포한다고 적어주셨는데 찾아보니 좀 생각해볼만한 상황이 있을것 같아 코멘트 남깁니다!

지금 deploy.sh가 블루그린 방식이라 새 컨테이너 기동 → health check(최대 180초) → nginx 전환 → 10초 뒤 이전 컨테이너 정지 순서로 진행되고 있는데 그 사이에는 이전 버전 서버가 계속 트래픽을 받고 있어서 회원 탈퇴나 연동 해제가 들어오면 평문 PENDING 행이 새로 생길 수 있다고 합니다. 그리고 그동안 두 컨테이너의 GoogleTokenRevocationScheduler가 같이 돌고 있어서 새 서버 스케줄러가 findTop50ByStatus로 그 평문 행을 읽는 순간 복호화 예외로 배치 전체가 실패하고 그 행이 PENDING으로 계속 남아 있으니까 이전 컨테이너가 내려간 뒤에도 매분 계속 실패할수 있다고 해요

배포가 끝난 뒤(이전 컨테이너 정지 후)에 PENDING 행을 한 번 더 확인하면 좋을것 같습니다

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

converter를 뒤늦게 달아서 생기는 문제네요.... 코드 추가는 필요 없을 것 같고 db에서 쿼리로 조회 후에 pending 행들은 수동으로 지우는 작업이 진행되면 좋을 것 같습니다. (아마 지금 탈퇴하는 사용자가 없어서 거의 없을 것 같아요!)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

꼼꼼한 리뷰들 감사드립니당
배포 후 이전 컨테이너 정지 후 PENDING이 남아 있으면 조회 후 수동으로 정리하도록 하겠습니다

@Column(name = "token", nullable = false, length = 2048)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

p3) 이번 수정으로는 새로 쌓이는 행만 암호화되고 이미 쌓여 있는 COMPLETED/FAILED 행의 token은 평문 그대로 DB에 남아 있을 것 같아요. 스케줄러는 PENDING만 읽어서 복호화 문제는 없겠지만 FAILED는 폐기에 실패한 토큰이라 아직 유효할 수도 있어서 이슈에서 말씀하신 노출 위험이 기존 행에는 그대로 남아 있는 것 같습니당

배포 후에 기존 평문 행도 정리(FAILED는 수동으로 revoke 후 삭제 등)하는 작업도 한번 확인해보시면 좋을것 같아요

@Jy000n Jy000n Nov 23, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

넵넵 감사합니다
배포 후 COMPLETED는 삭제하고, FAILED은 수동 revoke 후 삭제 작업 확인해서 진행하도록 하겠습니다!!

private String token;

Expand Down
Loading