Skip to content

fix(domain): CONNECTED 후에도 HTTPS 뱃지가 뜰 때까지 재검증 (#6) - #295

Merged
dldnsgkr merged 1 commit into
developfrom
unhak/domain-https-badge-recheck
Sep 6, 2026
Merged

fix(domain): CONNECTED 후에도 HTTPS 뱃지가 뜰 때까지 재검증 (#6)#295
dldnsgkr merged 1 commit into
developfrom
unhak/domain-https-badge-recheck

Conversation

@dldnsgkr

@dldnsgkr dldnsgkr commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

문제 (배포 e2e 발견 #6)

DomainVerificationWorkerVERIFYING 도메인만 검증하고 CONNECTED 후엔 재검증을 안 함. EC2(Caddy on-demand TLS)는 첫 https 요청 때 인증서를 발급하므로, 바인딩 직후 프로브가 미발급으로 httpsEnforced=false → 그대로 굳음. 사용자가 화면에서 "검증 재시도" 를 눌러야만 HTTPS 뱃지가 떴다. 실제 https 는 되는데 "붙였는데 HTTPS 없네" 창이 생김.

수정

  • CONNECTED 지만 httpsEnforced=false 인 도메인을 재검증. 재검증 프로브(https 요청)가 Caddy 인증서를 warming → 다음 주기엔 httpsEnforced=true 가 되고 목록에서 빠짐. 12주기(12분) 안에 뱃지가 저절로 뜬다.
  • 무한 프로브 방지: 생성 후 warming 창(30분) 안에서만. 그 안에 안 뜨면 수동 재검증/실제 문제로 남김.
  • 재검증은 "검증 완료" 로그 안 남김(이미 CONNECTED — 주기 스팸 방지).
  • targeted 쿼리 findByStatusAndHttpsEnforcedFalse...(배치가 true 로 채워져 false 를 놓치지 않게).

검증

  • 테스트: 창 안 CONNECTED+false → 재검증, 창 밖 → 안 함(무한 방지). domainbinding.* 통과.

🤖 Generated with Claude Code

DomainVerificationWorker 가 VERIFYING 도메인만 검증하고 CONNECTED 후엔 재검증을 안 해서,
EC2(Caddy on-demand TLS) 도메인은 바인딩 직후 httpsEnforced=false 로 굳었다 — Caddy 는 첫
https 요청 때 인증서를 발급하는데, 그 시점엔 아직 미발급이라 프로브가 false 였다. 그래서
사용자가 화면에서 "검증 재시도" 를 눌러야만 HTTPS 뱃지가 떴다(배포 e2e 발견 #6). 실제 https 는
되는데 화면엔 "붙였는데 HTTPS 없네" 창이 생겼다.

- CONNECTED 지만 httpsEnforced=false 인 도메인을 재검증한다(findConnectedPendingHttps).
  재검증 프로브(HttpsProbeClient)가 https 요청을 보내 Caddy 인증서를 warming 하므로, 다음
  주기엔 httpsEnforced=true 가 되고 이 목록에서 빠진다. 즉 1~2주기 안에 뱃지가 저절로 뜬다.
- 무한 프로브 방지: 생성 후 warming 창(30분) 안에서만 재검증. 그 안에 안 뜨면 수동 재검증/실제
  문제로 남긴다. 재검증은 "검증 완료" 로그를 안 남긴다(이미 CONNECTED — 주기 스팸 방지).
- 쿼리: findByStatusAndHttpsEnforcedFalseOrderByCreatedAtAsc(targeted — 배치가 true 로 채워져
  false 를 놓치지 않게).

테스트: 창 안 CONNECTED+false → 재검증, 창 밖 → 재검증 안 함(무한 방지).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHX8hzKT3JsTTRRvdUkL5K
@dldnsgkr
dldnsgkr merged commit b2622f9 into develop Sep 6, 2026
1 check passed
@dldnsgkr
dldnsgkr deleted the unhak/domain-https-badge-recheck branch September 6, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant