Obtain and renew certificates automatically with ACME

Đang mở
#439 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
48/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

Hướng nghiên cứu

Start with cmd/fanout/main.go, internal/server/http.go, and internal/config/config.go to trace TLS configuration and how the HTTP, MCP, OTLP/HTTP, and gRPC services share the listener. Check the existing TLS tests and identify how to run a local ACME test server. Done means the acceptance criteria pass, including renewal, error handling, and the documentation updates.

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

Mô tả

What

Direct TLS requires bringing your own certificate today, so most public installs need Caddy or nginx in front. Add built-in ACME so one setting gives a single binary real HTTPS.

Use golang.org/x/crypto/acme/autocert with the TLS-ALPN-01 challenge, which runs on the existing port 443 listener and needs no port 80. Settings are something like FANOUT_TLS_ACME_DOMAIN and FANOUT_TLS_ACME_EMAIL. Certificates are cached under the data directory.

Acceptance criteria

  • With the ACME settings and a publicly reachable :443, Fanout obtains a certificate and serves HTTPS, API, MCP, OTLP/HTTP, and gRPC on the one listener
  • Certificates renew with no restart and no dropped connections
  • The host policy accepts only the configured domain
  • The cached account key and certificates are stored with owner-only permissions and survive restarts
  • Startup fails with an error naming the settings when ACME is combined with FANOUT_TLS_CERT_FILE, FANOUT_TLS_KEY_FILE, or FANOUT_TLS_CLIENT_CA_FILE; requiring client certificates would fail the ACME challenge handshake
  • Startup fails with a clear error when the listener is not on port 443
  • A failed issuance is logged with the reason and retried with backoff, without rate-limit loops
  • Tests run against a local ACME test server, with no calls to a public certificate authority
  • Configuration reference, TLS guide, and backup docs updated, including that the cache belongs to the data directory

References

  • cmd/fanout/main.go
  • internal/server/http.go
  • internal/config/config.go
  • site/src/content/docs/docs/guides/tls.mdx
  • RFC 8737: ACME TLS-ALPN-01

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.