Repository navigation
docs(infra): nginx TLS 판정 정정 + 전역 변경 기록 - #253
Merged
Merged
Conversation
PR #252 본문과 설정 주석에 틀린 내용이 있어 바로잡는다. **정정 1 — "사이트 블록 변경 후에도 TLS 1.0/1.1 수락"은 오판이었다.** `openssl s_client` 출력의 `Protocol : TLSv1` 줄을 "수락"으로 읽었는데, 그 줄은 클라이언트가 **시도한** 버전이라 실패해도 찍힌다. 올바른 신호는 협상된 암호 (`Cipher is (NONE)` + `alert 70`)다. 같은 버그로 두 번 오판했다. **정정 2 — 다만 "원래 수락했다"는 맞았다.** 변경 전 설정(TLSv1 TLSv1.1 허용)을 격리 컨테이너에 그대로 재현해 확인했다: `New, TLSv1.0, Cipher is ECDHE-RSA-AES256-SHA` 로 실제 협상됐다. **전역 변경 기록.** ssl_protocols 는 SNI 이전에 결정돼 같은 443 소켓을 공유하는 server 들 중 default server 값이 전체에 적용된다. 이 호스트는 443 에 4개 사이트가 물려 있어 server 블록만으로는 효과가 없었고 /etc/nginx/nginx.conf 를 바꿨다 (백업 nginx.conf.bak-20260927-132844). **5개 사이트 전부에 적용된다.** 적용 후 확인: TLS1.0/1.1 거절, 1.2/1.3 정상, 5개 사이트 응답 기준선과 동일. 그 외: - TLS 버전 확인 방법을 README 에 적었다. 최신 OpenSSL 은 TLS1.0/1.1 을 제안조차 하지 않으므로 `-cipher DEFAULT@SECLEVEL=0` 없이는 서버 설정과 무관하게 실패한다. - `location /ai/` 문자열을 주석에서 뺐다 — grep 으로 제거 여부를 확인하려는 사람이 주석을 세게 된다(실제로 한 번 헷갈렸다). - 파일 머리말의 "전역은 건드리지 않았다" 를 사실에 맞게 고쳤다. - infra/CLAUDE.md 에 backup/·nginx/ 디렉토리와 운영 백업 구현 사실을 반영했다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
왜
PR #252 본문과 설정 주석에 틀린 내용이 있어 바로잡습니다. 적용 후 검증하면서 제 판정 방법이 잘못됐다는 걸 발견했습니다.
정정 1 — "사이트 블록 변경 후에도 TLS 1.0/1.1 수락" 은 오판
openssl s_client출력의 이 줄을 "수락"으로 읽었습니다:그런데 이 줄은 클라이언트가 시도한 버전이라 실패해도 찍힙니다. 같은 요청의 실제 결과는 거절이었습니다:
alert 70= protocol_version 거부,Cipher is (NONE)= 협상 실패. 올바른 신호는 협상된 암호입니다.정정 2 — 다만 "원래 수락했다" 는 맞았습니다
근거가 부실했으므로 다시 확인했습니다. 변경 전 설정(
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3)을 격리 컨테이너에 그대로 재현:실제로 협상됐습니다. 결론은 맞았고 근거만 틀렸던 셈입니다.
전역 변경 기록 (이미 적용됨)
ssl_protocols는 SNI 이전에 결정되므로, 같은443소켓을 여러server가 공유하면 default server 의 값이 전체에 적용됩니다. 이 호스트는 443 에 4개 사이트가 물려 있어 server 블록만으로는 효과가 없었습니다.5개 사이트 전부에 적용됩니다. 백업
nginx.conf.bak-20260927-132844.적용 후 확인 (올바른 방법으로):
alert 70, cipher 미협상)ECDHE-RSA-AES256-GCM-SHA384TLS_AES_256_GCM_SHA384(기본 협상)그 외
-cipher 'DEFAULT@SECLEVEL=0'없이 테스트하면 서버 설정과 무관하게 항상 실패합니다. 이 함정 때문에 처음에 반대로 읽기도 했습니다.location /ai/문자열을 주석에서 뺐습니다 —grep -c "location /ai/"로 제거 여부를 확인하면 주석이 세어져 1이 나옵니다(실제로 한 번 헷갈렸습니다). 이제grep -cE '^\s*location'이 4를 반환하고 문자열 매치는 0입니다.infra/CLAUDE.md에backup/·nginx/디렉토리와 운영 백업 구현 사실을 반영했습니다(§4.4 가 아직 "운영 단계에서는 cron 기반 dump" 라는 계획형 문장이었습니다).영향 범위
문서·주석만 변경입니다. nginx 설정의 지시자는 바뀌지 않습니다(서버와 diff 확인 완료).
🤖 Generated with Claude Code