Reload the TLS certificate without a restart

Đang mở
#438 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
backend, security

Hướng nghiên cứu

Start with cmd/fanout/main.go and internal/server/http.go to trace how TLS is configured, then read internal/server/clientca.go and the TLS guide at site/src/content/docs/docs/guides/tls.mdx. Check the existing server tests for certificate loading and connection behavior. Done when the acceptance criteria pass, including keeping the last good certificate on invalid or mismatched file updates, and the TLS guide explains the client CA restart requirement.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What

Fanout reads FANOUT_TLS_CERT_FILE and FANOUT_TLS_KEY_FILE once, through ListenAndServeTLS, so a renewed certificate needs a restart. A restart interrupts ingest on a single-node product, and anyone renewing with certbot or a similar tool hits this at every renewal.

Serve the certificate through a tls.Config.GetCertificate callback that picks up changed files, with no new settings.

Acceptance criteria

  • A new handshake uses the renewed certificate after the files change, with no restart
  • Existing connections, including long-lived gRPC streams, are not dropped by a reload
  • A partial or invalid pair on disk keeps the last good certificate and logs an error that names the path, never file contents
  • A cert and key written at slightly different times never produce a mismatched pair
  • Startup still fails on an unreadable or invalid pair
  • TLS 1.3, ALPN h2, and FANOUT_TLS_CLIENT_CA_FILE behave as before
  • The file check does not add file reads to every handshake without a bound
  • TLS guide updated, including that the client CA bundle still needs a restart

References

  • cmd/fanout/main.go (ListenAndServeTLS)
  • internal/server/http.go
  • internal/server/clientca.go
  • site/src/content/docs/docs/guides/tls.mdx

One pull request. Use the latest stable version of any dependency added, verified against its registry and pinned exactly.

Ngôn ngữ chính
Go
Star
11
Fork
0
Merge trung bình
7 giờ 5 phút
Pull request đã merge (30 ngày)
112

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của labstack/fanout

Tất cả issue của labstack/fanout

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.