feat: HTTPS via Caddy + 문서 구조 재정비 - #1
Open
Sangwon91 wants to merge 1 commit into
Open
Conversation
- docker-compose: add caddy:2 service (80/443), lakefs becomes internal-only (expose 8000, no host port). Removes the old 48000 plaintext exposure. - Caddyfile: automatic Let's Encrypt via ACME HTTP-01, env-driven domain. - .env.example: add LAKEFS_DOMAIN, ACME_EMAIL, LAKEFS_NAS_PATH. - .gitignore: ignore caddy_data/ caddy_config/. - README: rewrite as HTTPS-first quickstart with pointers to docs/. - docs/SPEC.md: architecture, security model, threat model, data model. - docs/OPERATIONS.md: deploy steps, Squarespace DNS, backup, credential rotation, troubleshooting. - docs/lakectl-manual.md: client-side guide (rebuilt from old lakefs-manual.md with broken code blocks fixed and endpoints set to https://<LAKEFS_DOMAIN>). - Remove lakefs-manual.md (moved into docs/). Background: dartworklabs/company-analysis#118 (HTTP plaintext + private IP exposure of the lakeFS endpoint used by nightly fetch).
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.
배경
http://168.131.138.98:48000평문 endpoint로 운영 중이던 lakeFS 서버에 HTTPS를 도입한다. 동기는 dartworklabs/company-analysis#118 — nightly fetch GHA가 매일 외부 인터넷을 경유해 평문으로 access key를 보내고 있어 MITM 위험.변경 요약
인프라
docker-compose.yml:caddy:2서비스 추가 (80/443).lakefs는expose: 8000만 — 호스트 포트 매핑 제거. 외부 접근은 Caddy를 통해서만.Caddyfile: ACME HTTP-01로 Let's Encrypt 자동 발급/갱신.{$LAKEFS_DOMAIN}/{$ACME_EMAIL}환경변수 보간..env.example:LAKEFS_DOMAIN,ACME_EMAIL,LAKEFS_NAS_PATH추가..gitignore:caddy_data/,caddy_config/(인증서 영속 볼륨용 mount-via-volume이라 실제 영향은 적지만 bind mount 변경 대비).문서
README.md: HTTPS-first 빠른 시작으로 재작성. 세부 내용은docs/로 분리.docs/SPEC.md(NEW): 아키텍처 다이어그램, 컴포넌트별 결정, 보안 모델, 위협 모델, 데이터 모델, 가용성/복구.docs/OPERATIONS.md(NEW): 최초 배포, Squarespace DNS A record 추가 절차, 일상 운영, 백업 정책, 자격증명 회전, 트러블슈팅 (ACME 실패, ISP 80/443 차단, 디스크 풀 등).docs/lakectl-manual.md(NEW, 기존lakefs-manual.md대체): 코드 블록 띄어쓰기 깨진 부분 수정, endpoint를https://<LAKEFS_DOMAIN>로 갱신.lakefs-manual.md삭제.호환성
기존
:48000호스트 포트는 제거. 기존 클라이언트는 모두endpoint_url을https://<LAKEFS_DOMAIN>로 갱신해야 한다 (사실상 1-2곳 — 운영자 로컬 + GH Actions secret).배포 시 필요한 작업 (이 PR 머지 후)
서버에서:
DNS:
lakefs.<domain>A record → 서버 공인 IP 추가 (절차:docs/OPERATIONS.md§2)전제 조건:
docs/OPERATIONS.md§6.4 참조 — Cloudflare Tunnel 우회 필요.Test plan
.env채워서docker compose up -d정상 부팅certificate obtained successfullycurl https://<LAKEFS_DOMAIN>/_health200nc -zv localhost 48000실패 (외부 직접 노출 차단 확인)endpoint_url을 https로 갱신 후lakectl repo list정상후속 작업 (이 PR 범위 밖)
LAKEFS_ENDPOINT_URLGH secret rotate (company-analysis repo)docs/OPERATIONS.md§4)